Hello,
I am trying to understand the VIRT field that shows in the TOP command output. I have a users application that appears to be leaking memory. I see that the field VIRT in the top output is showing 55.8g.
The question is where is that getting stored? The disk does not appear to have that much space used on it. An the system only has 24GB of ram. Is this a combination of RAM and DISK? Here is some examples.
ok...in that case, what is the real interpretation of virtual memory value shown with top command ?
man page says:
PHP Code:
VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out. (Note: you can define the STATSIZE=1 environment variable and
the VIRT will be calculated from the /proc/#/state VmSize field.)
Virtual memory is virtual. If the application doesn't actually use it, it doesn't get stored anywhere at all.
You might be confusing with allocated memory.
Virtual memory as reported by top is the sum of memory present either on disk (mostly SWAP) or on RAM (RES).
You might be confusing with allocated memory.
Virtual memory as reported by top is the sum of memory present either on disk (mostly SWAP) or on RAM (RES).
I beg to differ:
My process certainly does not have 1027M resident. It doesn't have it on disk, either -- having not used any of that gig of ram, none of it is actually paged in, resident, or even backed in any form. Other systems might demand sufficient swap to back it but not Linux, which by default has virtual swap.
On a 64-bit system you can also inflate that value by plunking in your entire hard disk as a memory segment via mmap. 300G virtual. I suppose that would count as on disk though.
Last edited by Corona688; 09-30-2011 at 02:50 AM..
I stand corrected. Top correctly reports allocated memory including overcommitted one.
The top original manual page (top(1) - The UNIX and Linux Forums ) is confusing as this 1 GiB is not made of pages that have been swapped out but pages that were never used in in the first place.
My process certainly does not have 1027M resident. It doesn't have it on disk, either -- having not used any of that gig of ram, none of it is actually paged in, resident, or even backed in any form. Other systems might demand sufficient swap to back it but not Linux, which by default has virtual swap.
Linux doesn't have "virtual swap", but by default Linux does overcommit swap space - IMO a REALLY, REALLY BAD IDEA.
Because eventually it's going to get used. Which means the OOM killer is going to wake up and start randomly killing processes, aiming for heavy memory users.
You know - the processes like web servers and databases that are the actual reason you're using the computer in the first place.
"Works most of the time, then goes BOOM!" is an awfully low reliability standard.
Quote:
On a 64-bit system you can also inflate that value by plunking in your entire hard disk as a memory segment via mmap. 300G virtual. I suppose that would count as on disk though.
That wouldn't usually need swap space because the backing store for the virtual memory would be your hard disk you mmap()'d, but you could probably map it in such a way that if you were to write to it, the changed pages would require swap backing. Maybe by mmap()'ing a read-only file descriptor read/write?
So, I would ask you a piece of advice about which books or titles could give me comprehensive information about virtual memory in UNIX. Especially, I would found out that virtual address translation corresponds structures of kernel!
Thanks! (2 Replies)
Hi,
Can anyone please help me workout how much virtual memory I have running on a T2000 running Solaris 10. Thanks
# df -h
swap 3.5G 1.0M 3.5G 1% /etc/svc/volatile
swap 3.5G 208K 3.5G 1% /tmp
swap 3.5G 56K ... (2 Replies)
Hi All,
Does anyone know what the best commands in the UNIX command line are for obtaining this info:
current CPU usage
memory usage
virtual memory usage
preferably with date and time parameters too?
thanks
ocelot (4 Replies)
Hi,
Would any one be so kind to explain me :
are ulimits defined for each user seperately ? When ?
Specialy what is the impact of :
max locked memory
and
virtual memory
on performance of applications for a user.
Many thanks.
PS :
this is what I can see in MAN :
ulimit ]
... (5 Replies)
Hi!
I work with HP-UX and I have to monitorize the use of virtual memory for different processes.
(java processes for Tibco Adapter) And if these processes exceed a limit send a message to the syslog.
I donīt know how to monitorize this...
Should I do a script? or use an aplication, for example... (3 Replies)
Hi,
First of all I appreciate this group very much for its informative discussions and posts.
Here is my question.
I have one process whose virtual memory size increases linearly from 6MB to 12MB in 20 minutes. Does that mean my process has memory leaks?
In what cases does the... (4 Replies)