Skip to content

Commit 23ce259

Browse files
committed
memory explanation/corrections
1 parent 54a1ebb commit 23ce259

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

helm/values.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -503,26 +503,27 @@ solr:
503503
## @param solr.javaMem Java heap memory settings for solr - see below for recommendations...
504504
## IMPORTANT:
505505
## - Using the (recommended) default value of MaxRAMPercentage=50 will assign half of the
506-
## available memory to the Java heap, and half to the OS and other processes. One of those "other
507-
## processes" is Lucene, which uses MMapDirectory to load the entire index into memory (if
508-
## possible. If not, we get swapping/slowness).
506+
## available memory to the Java heap, and half to the OS and other processes.
507+
## - One of those "other processes" is Lucene, which uses MMapDirectory to load the entire index
508+
## into memory (if possible. If not, we get disk swapping/slowness).
509+
##
509510
## We therefore recommend the following process for setting solr memory requests & limits:
510511
## 1. Determine the size of your index on disk:
511512
## - web ui: http://localhost:8983/solr/#/~cloud?view=nodes (under "Disk Usage"), or
512513
## - curl http://localhost:8983/solr/admin/metrics?prefix=INDEX.merge.&wt=json&indent=true
513514
## - If you don't yet have an index, estimate its size, then come back and adjust as needed.
514-
## (as an example, the cn-sandbox index was about 4.2GB for 800,000 objects)
515-
## 2. Round this value up in order to leave some headrooom for other OS and non-heap-Java usage.
516-
## Be generous - e.g. if index is 4.2GB, round up to 8Gi.
517-
## 3. Calculate the total RAM needed: Total = 100 * (non-heap RAM)/(100 - MaxRAMPercentage)
518-
## for example, if non-heap RAM was calculated at 8Gi above, and MaxRAMPercentage=50, then
515+
## (As an example, we've seen index sizes around 4.2GB for 800,000 objects)
516+
## 2. Round this value up, to leave some headrooom for other OS and non-heap-Java usage. Be
517+
## generous - e.g. if index is 4.2GB, round up to 8Gi.
518+
## 3. Calculate the total RAM needed: Total = 100 * non-heap-mem/(100 - MaxRAMPercentage)
519+
## For example, if non-heap memory was calculated at 8Gi above, and MaxRAMPercentage=50, then
519520
## the total RAM requirement will be: 100 * 8Gi/(100 - 50) = 16Gi.
520-
## 4. Set BOTH solr.resources.requests.memory AND solr.resources.limits.memory to this value
521-
## (since Solr seems to calculate MaxRAMPercentage against the lower "Request" value)
521+
## 4. Set solr.resources.limits.memory to this value
522522
##
523523
## IMPORTANT: The default bitnami solr chart resource values are set to "medium" (max mem 1536Mi),
524-
## which is insufficient to support any significant usage without containers being OOMKilled as
525-
## memory usage grows. We strongly recommend overriding both requests and limits for sole memory.
524+
## which may not be sufficient to avoid containers being OOMKilled as memory use grows under load.
525+
## We strongly recommend overriding solr.resources.limits.memory; 8-16Gb is common, according to:
526+
## https://solr.apache.org/guide/solr/latest/deployment-guide/jvm-settings.html
526527
##
527528
javaMem: "-XX:MaxRAMPercentage=50"
528529

0 commit comments

Comments
 (0)