On 3/8/2023 9:24 AM, HariBabu kuruva wrote:
I have set the Heap memory as -Xms 1g -Xmx 40g in the Production
environment.

But when i see the Heap memory in the Solr UI. I can see the Max Heap below.

Max: 3.8Gb
Used: 2.2Gb

The other answers you've gotten are good. This is mostly just a little more detail.

If you really do have the spaces before the 1g and 40g, then those values are probably not being honored as Jan said.

If you don't have the spaces, then Java will start with the heap size at 1GB, and only increase it if there is enough memory pressure. One thing that I don't know is whether Java will use the 32 bit pointers with the Xmx at 40g. It probably won't, so I expect that memory usage would be more efficient if you set the max heap to 31g.

With a heap size at 32GB or larger, Java has to use 64 bit pointers, and that will make it use quite a bit more memory because Solr creates a LOT of objects.

As Dave said, if you use Xms and Xmx, then they should be set to the same value. And the value should be less than 32GB for efficiency.

If you use the SOLR_HEAP environment variable in the include script, then both Xms and Xmx will be set to the provided value.

Thanks,
Shawn

Reply via email to