Project

General

Profile

Actions

Bug #5620

closed

Rudder need twice as much memory as configured for Java to exec external commands with old jdks

Added by François ARMAND about 10 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
2
Category:
Performance and scalability
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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

Actions

Also available in: Atom PDF