Are you seeing a real problem here, besides just being alarmed by the big numbers from top?
Consumption of virtual memory by itself is basically harmless, as long as you're not running up against any of the OS limits (and, you're running a 64 bit JVM). This is just "top" telling you that you've mapped large files into the virtual memory space. It's not telling you that you don't have any RAM left... virtual memory is different from RAM. In my tests, generally MMapDirectory gives faster search performance than NIOFSDirectory... so unless there's an actual issue, I would recommend sticking with MMapDirectory. Mike McCandless http://blog.mikemccandless.com On Fri, Dec 9, 2011 at 11:54 PM, Rohit <ro...@in-rev.com> wrote: > Hi All, > > > > Don't know if this question is directly related to this forum, I am running > Solr in Tomcat on linux server. The moment I start tomcat the virtual memory > shown using TOP command goes to its max 31.1G and then remains there. > > > > Is this the right behaviour, why is the virtual memory usage so high. I have > 36GB of ram on the server. > > > > Tasks: 309 total, 1 running, 308 sleeping, 0 stopped, 0 zombie > > Cpu(s): 19.1%us, 0.2%sy, 0.0%ni, 79.3%id, 1.2%wa, 0.0%hi, 0.2%si, > 0.0%st > > Mem: 49555260k total, 36152224k used, 13403036k free, 121612k buffers > > Swap: 999416k total, 0k used, 999416k free, 5409052k cached > > > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > > 2741 mysql 20 0 6412m 5.8g 6380 S 182 12.3 108:07.45 mysqld > > 2814 root 20 0 31.1g 22g 9716 S 100 46.6 375:51.70 java > > 1765 root 20 0 12.2g 285m 9488 S 2 0.6 3:52.59 java > > 3591 root 20 0 19352 1576 1068 R 0 0.0 0:00.24 top > > 1 root 20 0 23684 1908 1276 S 0 0.0 0:06.21 init > > > > Regards, > > Rohit > > >