Are you in fact out of swap space, as the java error suggested?
The way JVM's work always, if you tell it -Xmx6g, it WILL use all 6g
eventually. The JVM doesn't Garbage Collect until it's going to run out
of heap space, until it gets to your Xmx. It will keep using RAM until
it reaches your Xmx.
If your Xmx is set so high you don't have enough RAM available, that
will be a problem, you don't want to set Xmx like this. Ideally you
don't even want to swap, but normally the OS will swap to give you
enough RAM if neccesary -- if you don't have swap space for it to do
that, to give the JVM the 6g you've configured it to take.... well, that
seems to be what the Java error message is telling you. Of course
sometimes error messages are misleading.
But yes, if you set Xmx to 6G, the process WILL use all 6G eventually.
This is just how the JVM works.
On 6/1/2011 12:15 PM, Denis Kuzmenok wrote:
Here is output after about 24 hours running solr. Maybe there is some
way to limit memory consumption? :(
test@d6 ~/solr/example $ java -Xms3g -Xmx6g -D64
-Dsolr.solr.home=/home/test/solr/example/multicore/ -jar start.jar
2011-05-31 17:05:14.265:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2011-05-31 17:05:14.355:INFO::jetty-6.1-SNAPSHOT
2011-05-31 17:05:16.447:INFO::Started SocketConnector@0.0.0.0:4900
#
# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 32744 bytes for ChunkPool::allocate.
Out of swap space?
#
# Internal Error (allocation.cpp:117), pid=17485, tid=1090320704
# Error: ChunkPool::allocate
#
# JRE version: 6.0_17-b17
# Java VM: OpenJDK 64-Bit Server VM (14.0-b16 mixed mode linux-amd64 )
# Derivative: IcedTea6 1.7.5
# Distribution: Custom build (Wed Oct 13 13:04:40 EDT 2010)
# An error report file with more information is saved as:
# /mnt/data/solr/example/hs_err_pid17485.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
#
Aborted
I run multiple-core solr with flags: -Xms3g -Xmx6g -D64, but i see
this in top after 6-8 hours and still raising:
17485 test 21 4 10.0g 7.4g 9760 S 308.2 31.3 448:00.75 java
-Xms3g -Xmx6g -D64
-Dsolr.solr.home=/home/test/solr/example/multicore/ -jar start.jar
Are there any ways to limit memory for sure?
Thanks