Sponsored Content
Top Forums Programming How to decrease virtual size of a process after cleaning all containers and using malloc_trim (0)? Post 302937983 by umen on Wednesday 11th of March 2015 06:43:39 AM
Old 03-11-2015
How to decrease virtual size of a process after cleaning all containers and using malloc_trim (0)?

Hello all
i have simple server running on linux redhat 6.1
it is build with c++
in the server i have huge std vector that holds pointers to cache objects
those cache objects holds allot of data from the DB
any way ...
in some point in time there is simple API that suppose to clean the vector
i do simple iteration over the std vector and delete the object pointers and in the end i also clean() the vector
and after all of this i execute : malloc_trim (0) that returns 1
the problem is that the virtual size of a process never decrease
BUT only the resident size do decrease fine .
the big problem when i like to load the cache again , the virtual size of a process get doubled .

how do i decrease virtual size of a process in c++/c ?
thanks
 

10 More Discussions You Might Find Interesting

1. Programming

Will exe file size decrease while using inline function

using namespace std; void g(); class A { public : A() { g();g();g(); cout << "Constructor of A"<< endl ;} }; inline void g(){ cout << "vijay" <<endl; } int main() { A a; } when i use inline i get size 303488 Aug 31 12:05 a.out* when not using inline i get size 303572 Aug 31... (1 Reply)
Discussion started by: vijaysabari
1 Replies

2. UNIX for Dummies Questions & Answers

how can i get The total size of the process in virtual memory om GB or MB

Hello all im using the ps -ef "args vsz" | some.exe but the result is in kb , is there some kind of way or flag ( didnt found in the ps man ) to convert me this data to GB or MG in human readable format ? Thanks (1 Reply)
Discussion started by: umen
1 Replies

3. UNIX for Dummies Questions & Answers

how to Decrease priority of a particular process in time of process creation

how to decrease priority of a particular process in time of process creation... and also how to decrease priority of a particular process after process creation.. can any one please help me out... (2 Replies)
Discussion started by: Ramkum
2 Replies

4. Shell Programming and Scripting

How to decrease the font size in Mailx

Hi all, I am using echo "$EMAILMESSAGE" | mailx -s "$SUBJECT" -b $CC "$TO" I am receiving the mail but seems to big in font size. Is there any option mailx to decrease the size of the mail generated. Thanks, (1 Reply)
Discussion started by: shellscripter
1 Replies

5. Programming

Find Virtual address space size for process

Hi, I am looking to work on unix systems which include (hp-ux, ibm aix, solaris and linux). I want to get the total virtual address space of a process, the used virtual memory i am able to get without any problem. I have tried using getrlimit and getrlimit64, but that gives only ... (4 Replies)
Discussion started by: uiqbal
4 Replies

6. UNIX for Advanced & Expert Users

Process self-exec and virtual memory size

Hello all, To do a self-exec or self-restart of a process when it crosses the threshold memory limit, I use the value of virtual memory size field from /proc/$pid/stat file and do a self-exec. According to man 5 proc vsize %lu Virtual memory size in bytes. I just want to... (2 Replies)
Discussion started by: matrixmadhan
2 Replies

7. AIX

Why using "%" of Paging size increases & how to decrease this percentage?

Hi I have found a problem on my AIX 5.1 server. day by day the paging size is increasing,what is the reason behind it and if percentage is at 100 what will happen. Oracle 9i is running on my server. PAGING SPACE size,mb 5632 % used 14.6 % free 85.3 How can i decrease the using... (6 Replies)
Discussion started by: dearsumon
6 Replies

8. Fedora

How to increase/Decrease Local Virtual consoles?

I m tring to figure out the option where i can increase/Decrease the count for local virtual consoles(vtys). I can able to take upto 6 vtys using (left alt+(F1-F6)) But is there any way i can increase the count ? One more query even though i can only take tty upto tty6 why there are tty... (2 Replies)
Discussion started by: pinga123
2 Replies

9. UNIX for Dummies Questions & Answers

Decrease buffer size

Hi, I am using the below command to get the output in a file called "Logs.txt" tail -f filename | egrep -i "cpu | hung " >> Logs.txt The problem is the Logs.txt file gets updated only after the buffer is 8Kb, but i want to update the file immediately and not wait for the buffer to get 8kb. Is... (8 Replies)
Discussion started by: @bhi
8 Replies

10. AIX

[ASK] decrease/shrink the size of filesystem

Hello, I would like to reduce the size of filesystem online. We can do online for increase without any problem. So any risk can be occurred with the decrease? This is not an issue, just a discussion for decrease/shrink space with chfs command. My AIX system is version 6.1 and the filesystem... (2 Replies)
Discussion started by: Phat
2 Replies
XNBD-BGCTL(1)						      General Commands Manual						     XNBD-BGCTL(1)

NAME
xnbd-bgctl -- Control a server running xnbd-server(8) through its control socket SYNOPSIS
xnbd-bgctl [--cache-all] [--cache-all2] [--query] [--reconnect REMOTE_HOST REMOTE_PORT] [--shutdown] [control_socket] DESCRIPTION
With the xmbd-bgctl command you can connect to a xnbd-server control channel and instruct it to act as directed. You may pass an argument to the control program which is then forwarded, on your behalf, to the server instance. OPTIONS
The following options are supported: --cache-all If the remote xnbd-server acts as proxy server, this command intstructs the controlling xnbd-server instance to cache all blocks on its associated block disk. Upon completion the controlled xnbd instance holds all data from the origin instance and it is no longer necessary to act as proxy. --cache-all2 This command is identical to cache-all but detaches the process from the terminal and is hence using a dedicated connection for data transfer. --query This command retrieves completion statistics from the proxy server instance. It returns the number of cached blocks on the server. --reconnect This command recovers from a lost connection by re-establishing connectivity with the origin server. This command expects two additional arguments, the REMOTE_HOST, and the REMOTE_PORT you want to connect to, to recover from a disconnected session. --shutdown This command stops the proxy server and restarts the target server. All client sessions are preserved. POSITIONAL ARGUMENTS
The following positional options are supported: CONTROL_SOCKET The Unix domain socket, the xnbd-server(8) program is listening on. SEE ALSO
xnbd-server (8). AUTHOR
The NBD kernel module and the NBD tools have been written by Pavel Macheck (pavel@ucw.cz) and is now maintained by Paul Clements. (Paul.Clements@steeleye.com). The xNBD userland (client and server) have been written by Takahiro Hirofuchi (t.hirofuchi@aist.go.jp) This manual page was written by Arno Toell (debian@toell.net) for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. XNBD-BGCTL(1)
All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy