On 12/22/2010 2:56 AM, stockii wrote:
Hello.
I have a RAM problem during a optimize.
When is start an delta or full import, solr using only this ram which i
allocate to him.
eg.: java -jar -Xmx2g start.jar
when solr is fetching the rows from database the using of ram ist okay. But
when solr begin to otimize, solr want all of the available ram
?!?!?!?!?!?
why is it so. the used Ram jumpes into the sky and only 40 MB Ram is free,
of 8 GB !!! how can i limit this ?
Is it Solr that's using all the RAM, or the OS disk cache? I have found
other messages from you that say you're on Linux, so going with that
assumption, you can see everything if you run the 'top' command and
press shift-M to sort it by memory usage. Solr (java) should be at the
top of the list, and the RES (or maybe RSS, depending on flavor) column
will tell you how much RAM it's using. Having only 40MB free memory is
typical for a Linux system.
Above the process list are a bunch of indicators that give you the
overall RAM usage. The number on the bottom right is "cached." This
refers to the OS disk cache, and it probably has the bulk of your
usage. Below is what my screen looks like. Solr is using 1.4GB of RAM
(out of 2.5GB possible), the disk cache is using 7.5GB, and I have less
than 30MB free.
top - 15:20:04 up 34 days, 16 min, 1 user, load average: 0.00, 0.00, 0.00
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, 9407424k used,29760k free, 165464k buffers
Swap: 1048568k total, 68k used, 1048500k free, 7527788k cached
PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND
22928 ncindex 20 0 2574m 1.4g 9m S 0.0 15.1 432:36.91 java
21319 root 15 0 90136 3424 2668 R 0.0 0.0 0:00.01 sshd
If it's your disk cache that's using up most of your memory, it's
perfectly normal. Solr is not to blame for it, and you do not want to
change it. If you're worried about memory usage because you have
performance issues, I can try to narrow it down for you. That will
require more information, starting with your 'top' output, total index
size, and if you're using distributed search, how big each shard is. I
am likely to ask for further information beyond that.
Shawn