On 11/30/2010 3:49 PM, Robert Petersen wrote:
That raises another question: top can show only 20 GB free out of 64
but the tomcat/solr process only shows its using half of that. What is
using the rest? The numbers don't add up...
Chances are that it's your operating system disk cache. Below is the
headers and first couple of lines from top output on one of my Solr
servers, sorted by memory usage:
top - 20:15:30 up 12 days, 5:10, 1 user, load average: 0.01, 0.04, 0.01
Tasks: 68 total, 2 running, 66 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si,
0.0%st
Mem: 9437184k total, 9410648k used, 26536k free, 192932k buffers
Swap: 1048568k total, 68k used, 1048500k free, 7490956k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1935 ncindex 18 0 2654m 1.3g 9m S 3.0 14.9 337:27.27 java
19039 root 15 0 90132 3688 2948 R 0.0 0.0 0:00.00 sshd
I have less than 26MB free out of 9GB. Solr has a resident size of only
1.3g, the next largest process is sshd at 3688k. Most of the memory is
being used by the disk cache - 7490956k cached. The index on this
system is over 14GB, so it cannot fit entirely in memory.
If I suddenly needed to start a large process, Linux would immediately
give up part of its disk cache.
Shawn