Closed lvh closed 8 years ago
cc @sirsean -- any opinions on that last paragraph?
FYI, this looks like:
kafka_1 | # There is insufficient memory for the Java Runtime Environment to continue.
kafka_1 | # Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.
I'm 100% on board with documenting that you need at least 2GB to run this thing, and doing that immediately.
I also very much like the idea of figuring out how to make memory use configurable -- when we go to production we're going to want to use more. But that's kind of a separate step from creating the larger VM's for the production environment.
And I don't know how valuable it is to figure out what we have to do to Kafka to get it to run in less RAM.
Okiedokie. #63 documents. It doesn't seem like Kafka would need 1G RAM for the basic things we're asking it to do in most dev setups. Obviously once you start throwing load at it... This would mean changing the Xms
JVM parameter.
The other thing to keep in mind is that unless you set Xmx
, lowering this limit does not affect how much memory the JVM will maximally try to allocate.
I think that simply solving #65 solves this for now. A bigger minimum preallocation for production Kafka setups, seems to be a bridge we should cross when we get there. Are you OK with closing this ticket and just leaving it with #65, @sirsean ?
Yeah, that's fine with me. :+1:
Currently, the Kafka JVM attempts to pre-allocate 1024MB all by itself. This is problematic because the standard docker-machine VM only has 1024MB total, so the malloc fails, so the Kafka container falls over immediately. This is unrelated to #45 as far as I can tell (other than that it's also about Kafka).
One way to mitigate this immediately would be to document it so that people can just adjust their VM. Medium-term it would make sense to get it to try and allocate less memory, since I'm assuming lots of people will be using the default. Longer-term it maybe useful to make that amount of memory configurable; I could certainly see how a production setup would want more than 1024MB.