Discussion:
Does Datomic objectCacheMax look at cgroup mem limits?
Wes Morgan
2017-05-16 16:44:39 UTC
Permalink
This page: http://docs.datomic.com/system-properties.html

...says that the default value of the objectCacheMax property is "50% of VM
RAM." If the peer is running in a Docker container (for example), and there
is a cgroup memory limit set, does Datomic look at that for setting this
value? If not, does that seem like a reasonable feature request?

FWIW, Java 9 and 8u131 have the ability to set the default max heap based
on this (in Java 8u131+, you have to pass these flags to the java runtime:
-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-XX:MaxRAMFraction=1).
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Francis Avila
2017-05-16 19:04:46 UTC
Permalink
The "VM" here is the JVM, not the OS/hardware/hypervisor/etc. The object
cache uses Java heap, so "50% of VM ram" is 50% of the max JVM heap (on
Oracle/openjdk, the Xmx setting). There's no need for datomic to consult
cgroup settings if the JVM itself set its max heap with cgroup limits in
mind.
Post by Wes Morgan
This page: http://docs.datomic.com/system-properties.html
...says that the default value of the objectCacheMax property is "50% of
VM RAM." If the peer is running in a Docker container (for example), and
there is a cgroup memory limit set, does Datomic look at that for setting
this value? If not, does that seem like a reasonable feature request?
FWIW, Java 9 and 8u131 have the ability to set the default max heap based
-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-XX:MaxRAMFraction=1).
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...