lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <>
Subject Re: Solr memory consumption
Date Wed, 01 Jun 2011 17:16:29 GMT
PermSize and MaxPermSize don't need to be higher than 64M.  You should read on 
JVM tuning. The permanent generation is only used for the code that's being 

> So what should i do to evoid that error?
> I can use 10G on server, now i try to run with flags:
> java -Xms6G -Xmx6G -XX:MaxPermSize=1G -XX:PermSize=512M -D64
> Or should i set xmx to lower numbers and what about other params?
> Sorry, i don't know much about java/jvm =(
> Wednesday, June 1, 2011, 7:29:50 PM, you wrote:
> > 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.

View raw message