Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Understanding virtual memory usage > swap + physical on Linux

We have the following process:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                         
10684 root       8 -15 89.6g  13g 1.1g S 406.9 21.8 316:34.89 java 

Is this amount of virtual memory ok, assuming the fact that we have only 64GB of RAM. Also here is the info about the physical memory:

Mem:  65995412k total, 64967388k used,  1028024k free,  3976288k buffers
Swap: 32764556k total,     1236k used, 32763320k free, 19534812k cached

As you can see there is only 1236k swapped.

We are wondering where are the missing 30GB+ RAM? Are they on disk?

How much virtual memory is ok for a particular process? What is the connection between virtual memory and RAM.

share|improve this question

marked as duplicate by Magellan, Bryan, John Gardeniers, MadHatter, Chris S Nov 20 '12 at 15:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Thank you, @Adrian. I missed this. Maybe my search approach was not good enough! :) – divaka Nov 19 '12 at 17:18
up vote 4 down vote accepted

The VIRT reflects to amount of Virtual Memory allocated by a process, not a real one. The address space of a process may contain certain areas mapped to corresponding files which are not located in RAM.

At least the program executable and shared libraries are mapped to the virtual address space of a process. During the program execution the process may map other files to its address space and sometimes its size may be large (images, movies, databases) - even larger than the available amount of RAM - it is limited by total amount of addressable memory on the current processor architecture.

Also Linux uses optimistic memory allocation strategy. It means even if a process calls malloc() the physical memory allocation may be deferred until the page will be used. It means the process may allocate more RAM than available.

Also Linux can sparse identical pages in the memory. If two process use same pages in the memory the kernel can map both virtual page into one real (and release the second).

So, yes, it is normal when a process allocates more Virtual Memory than amount of available physical memory.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.