Overall  memory on server is 24G, and 24G of swap, mostly all the time
swap  is  free and is not used at all, that's why "no free swap" sound
strange to me..


> There is no simple answer.

> All I can say is you don't usually want to use an Xmx that's more than
> you actually have available RAM, and _can't_ use more than you have 
> available ram+swap, and the Java error seems to be suggesting you are 
> using more than is available in ram+swap. That may not be what's going
> on, JVM memory issues are indeed confusing.

> Why don't you start smaller, and see what happens.  But if you end up 
> needing more RAM for your Solr than you have available on the server, 
> then you're just going to need more RAM.

> You may have to learn something about java/jvm to do memory tuning for
> Solr. Or, just start with the default parameters from the Solr example
> jetty, and if you don't run into any problems, then great.  Starting 
> with the example jetty shipped with Solr would be the easiest way to get
> started for someone who doesn't know much about Java/JVM.

> On 6/1/2011 12:37 PM, Denis Kuzmenok wrote:
>> 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.
>>
>>



Reply via email to