mesos / kafka

Apache Kafka on Apache Mesos
Apache License 2.0
414 stars 140 forks source link

Document decision points for choosing --mem and --heap thresholds #238

Open timcharper opened 8 years ago

timcharper commented 8 years ago

Our understanding of the framework is that you can provide two memory configuration values, --mem and --heap. From groking the code, it appears that --mem is used to allocate RAM from Mesos (which, by default, is not enforced, --cgroups_limit_swap being disabled in mesos-slave by default), and --heap is used to specify memory constraint for the JVM itself.

These values being set orthogonally, it seems at the very least one should set --heap <= --mem. However, it begs the question, by how much? Is off-heap storage being used by the Kafka brokes? Is it intelligently detecting the gap between MESOS memory allotted and JVM heap constraint, and then dedicating the difference to RocksDB or something?