mesos / logstash

Logstash on Mesos
Apache License 2.0
67 stars 25 forks source link

Purpose of LOGSTASH_HEAP_SIZE #96

Closed sadovnikov closed 8 years ago

sadovnikov commented 8 years ago

What is the purpose of LOGSTASH_HEAP_SIZE or --logstash.heapSize?

    private boolean isNotEnoughRAM(ClusterState clusterState, Protos.Offer offer) {
        return !hasEnoughOfResourceType(offer.getResourcesList(), "mem", executorConfig.getHeapSize() + logstashConfig.getHeapSize() + executorConfig.getOverheadMem());
    }

Isn't it confusing? Should we remove this parameter?

jhftrifork commented 8 years ago

Setting --logstash.heapSize=H means we set environment variable LS_HEAP_SIZE=Hm passed to the Logstash process. This LS_HEAP_SIZE is undocumented, but you can see here that it's used to set the -Xmx in the JAVA_OPTS for the Logstash process.

So --logstash.heapSize is the maximum size, in megabytes, of the memory allocation pool of the Logstash process.

However, it's unclear to me why this should be a user-configurable option. We the developers should know what the heap size limit should be.

sadovnikov commented 8 years ago

OK!! Now it actually makes sense!!

I got confused because there is also --executor.heap-size and they used somehow together to determining resource requirements of the executor. And there are FIXME comment in README.md.

Could you please update the description?

mwl commented 8 years ago

@sadovnikov Does #106 make it clearer?

jhftrifork commented 8 years ago

@mwl I think so - I basically copied over the description above into the README

sadovnikov commented 8 years ago

106 does make it clearer

mwl commented 8 years ago

Thanks @sadovnikov. #106 has been merged already.