Bug #5620
closedRudder need twice as much memory as configured for Java to exec external commands with old jdks
Description
So,
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:
- http://bryanmarty.com/2012/01/14/forking-jvm/
for a description of the problem and common option, and:
- http://www.oracle.com/technetwork/server-storage/solaris10/subprocess-136439.html#ref7
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
Updated by François ARMAND about 10 years ago
- Category set to Performance and scalability
- Status changed from New to 8
- Assignee set to François ARMAND
- Priority changed from N/A to 2
Updated by Nicolas CHARLES about 10 years ago
I think here the issue is that cf-promises uses too much RAM (see #5621), so it's not java that is eating it, but the process runed by java
Updated by François ARMAND about 10 years ago
- Subject changed from Rudder need twice as much memory as configured for Java to Rudder need twice as much memory as configured for Java to exec external commands with old jdks
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.21 to 2.11.22
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.22 to 2.11.23
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.23 to 2.11.24
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.24 to 308
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 308 to 3.1.14
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.14 to 3.1.15
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.15 to 3.1.16
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.16 to 3.1.17
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.17 to 3.1.18
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by Benoît PECCATTE almost 8 years ago
- Status changed from New to Rejected
We now depend on jdk8 which can workaround this problem.