Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to run build jobs in Jenkins with minimal cpu usage. I've tried this:

  1. Created the directory "jenkinsJdk".Jenkins is configured to use this dir as JDK "testJdk". A sample job uses "testJdk" for building.
  2. The directory "jenkinsJdk" contains symlinks (ln -s) to everything in "/usr/lib/jvm/java-6-openjdk-amd64".
  3. The only 2 files without a symlink are "./bin/java" and "./bin/javac". Both are bash scripts that should only wrap java/javac with setting a nice level. So for "./bin/java":

    # nice -n 5 'java $@'
    java '$@'
    

Effect: The first line didn't work, so I'm trying to just wrap java for now. But what happens is Jenkins creating about 28000 java 'tasks' (seen via htop) until linux stops it (--> "/jenkinsJdk/java/bin/java: Cannot fork").

Invoking the wrapper for other java programs with "./java somePackage.SomeClass" works fine from bash.

My guess it that it has to be something about how Jenkins invokes the java binary, but I've no clue what I'm doing wrong. Any hints?

share|improve this question
    
try it with /bin/nice instead of the shell builtin –  Michael Martinez Oct 16 '13 at 0:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.