Am 28.11.2016 um 00:00 schrieb Shawn Heisey:
On 11/27/2016 12:51 PM, Florian Gleixner wrote:On 22.11.2016 14:54, Max Bridgewater wrote:test cases were exactly the same, the machines where exactly the same and heap settings exactly the same (Xms24g, Xmx24g). Requests were sent withSetting heap too large is a common error. Recent Solr use the filesystem cache, so you don't have to set heap to the size of the index. The avalible RAM has to be able to run the OS, run the jvm and hold most of the index data in filesystem cache. If you have 32GB RAM and a 20GB Index, then set -Xms never higher than 10GB. I personally would set -Xms to 4GB and omit -XmxIn my mind, the Xmx setting is much more important than Xms. Setting both to the same number avoids any need for Java to detect memory pressure before increasing the heap size, which can be helpful.
From https://cwiki.apache.org/confluence/display/solr/JVM+Settings"The maximum heap size, set with -Xmx, is more critical. If the memory heap grows to this size, object creation may begin to fail and throw OutOfMemoryException. Setting this limit too low can cause spurious errors in your application, but setting it too high can be detrimental as well."
you are right, Xmx is more important. But setting Xms to Xmx will waste RAM, that the OS can use to cache your index data. Setting Xmx can avoid problems in some situations where solr can eat up your filesystem cache until the next GC has been finished.
Without Xmx, Java is in control of the max heap size, and it may not make the correct choice. It's important to know what your max heap is, because chances are excellent that the max heap *will* be reached. Solr allocates a lot of memory to do its job.
If you know the maximum size you ever will need, setting Xmx is good.
signature.asc
Description: OpenPGP digital signature