jmxtrans/jmxtrans — pull request #106 by hjacobs (2013-12-08 17:07:12+00:00)
Title: LXC container support: Even for "java -version" we specify a heap size as Java might "guess" wrong...

...inside LXC containers with memory limit.

This is necessary on LXC containers with "low" memory limit compared to the hypervisor (in my case the hypervisor has 141GB RAM, but the LXC container is limited to 64GB).
As Java's algorithm for the default heap size only sees the hypervisor's main memory (141GB) it will fail allocating default heap size memory on the LXC container.