Good call, setting
8 causes the JDK runtime
availableProcessors() to return 8. E.g.
- name: neo4j
(note that setting the env variable
-XX:ActiveProcessorCount=8 also achieves the same thing)
However, the same can't be said for memory. Despite setting the memory request to 10G and limit to 16G,
Runtime.getRuntime().maxMemory() returns only
512.0 MiB. Is there a way to set initial and max heap size via environment variables? If possible, I'd like to avoid having to maintain a custom
neo4j.conf file in a k8 ConfigMap. It appears that in many cases, config settings can be overwritten as env variables when snaked cased and prepended with
NEO4J_dbms_directories_plugins). However, setting
10G mangles the output and throws the error
Invalid initial heap size: -Xms10G 512M.
Any thoughts on getting around this? The mangling of the heap initial/max size looks like a bug, but as I didn't see it documented anywhere, it might not be an official feature (would be useful though). In the meantime, I'll probably specify neo4j.conf as a ConfigMap.
Thanks for the pointer on resources.requests.limits.
(changed the thread title to better reflect the questions)