Rudder need twice as much memory as configured for Java to exec external commands with old jdks
We know how fork works on unixes. The implication is that when Rudder try to exec commands, like cf-promises, it will ask the system to allocate as much memory as what is given to the parent JVM. Of course, we don't want that.
It is a well know problem of Java, with no good solution, see:
for a description of the problem and common option, and:
for a detailed article about memory management regarding fork/vfork/spawn on different OS.
Also, JDK7 should not be subject to that problem on linux (http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6850720), and JDK8 swith from fork to vfork for all plateform (see the corresponding file in jvm 8 b13, corresponding to jdk8u5: http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/4cb2e8679b27/src/solaris/native/java/lang/UNIXProcess_md.c)
So, given that, we have the following option:
- do not use external command from the webapp. No fork, no proble. That means finding other solution for all the current used command
- require Java 7 at least for big configuration
- require overcommit setted to 1