Skip to main content

MarkLogic Server on Kubernetes

Set huge pages for MarkLogic StatefulSet

The use of huge pages in a namespace is controlled with ResourceQuota similar to other compute resources like cpu or memory using the hugepages-<size> token.

Note

Huge pages do not support overcommit

In the values.yaml file, huge pages can be set:

## Manage HugePages 
## ref: https://v1-23.docs.kubernetes.io/docs/tasks/manage-hugepages/scheduling-hugepages/
hugepages:
  enabled: true
  mountPath: /dev/hugepages


resources:
# Marklogic pods' resource requests and limits
# ref: https://kubernetes.io/docs/user-guide/compute-resources/
  limits:
    hugepages-2Mi: 1Gi
    memory: 8Gi
  requests:
    memory: 8Gi
Check the error log

After setting the huge pages, check the error log to verify that the huge pages are detected. You should see an entry in the log indicating the number of huge pages detected:

2023-02-06 16:01:40.190 Info: Linux Huge Pages: detected 1280, using 1280, recommend 1280 to 1820
Check resource usage at the node level

To verify huge pages are working as expected, can check the resource usage,

Resource_Usage.png