Skip to main content

Elasticsearch resources

The search cluster needs more memory than the chart's preset due to observed out-of-memory errors and degraded search performance when using the default values. The default preset was insufficient for the workload generated by Mastodon, leading to frequent restarts and slow query responses. After monitoring resource usage and performance, we increased the master node's memory request to 768Mi and set a limit of 1.5 GiB to provide enough headroom for peak loads while avoiding excessive resource allocation. The heap size was set to 512m to balance JVM performance and container memory constraints. These values were chosen based on empirical testing and resource availability in the cluster.

# k8s/applications/web/mastodon/elasticsearch/values.yaml
master:
resources:
requests:
memory: 768Mi
limits:
memory: 1.5Gi
heapSize: 512m
resourcesPreset: none