Project

General

Profile

Bug #5620

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

Added by François ARMAND almost 4 years ago. Updated over 1 year ago.

Status:
Rejected
Priority:
2
Category:
Performance and scalability
Target version:
Target version (plugin):
Severity:
User visibility:
Effort required:
Pull Request:
Priority:

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

History

#1 Updated by François ARMAND almost 4 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

#2 Updated by Nicolas CHARLES almost 4 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

#3 Updated by François ARMAND almost 4 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

#4 Updated by Benoît PECCATTE over 3 years ago

  • Status changed from 8 to New

#5 Updated by Benoît PECCATTE about 2 years ago

  • Target version set to 2.11.21

#6 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 2.11.21 to 2.11.22

#7 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 2.11.22 to 2.11.23

#8 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 2.11.23 to 2.11.24

#9 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 2.11.24 to 308

#10 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 308 to 3.1.14

#11 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 3.1.14 to 3.1.15

#12 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 3.1.15 to 3.1.16

#13 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 3.1.16 to 3.1.17

#14 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.17 to 3.1.18

#15 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.18 to 3.1.19

#16 Updated by Benoît PECCATTE over 1 year ago

  • Status changed from New to Rejected

We now depend on jdk8 which can workaround this problem.

Also available in: Atom PDF