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 with > Setting 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 -Xmx
In 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. 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. Thanks, Shawn