←Older revision | Revision as of 12:57, 18 March 2014 | ||
Line 23: | Line 23: | ||
650MB of virtual space is a lot. If you moreover realize that [[hudson]] starts multiple [[Java]] [[VM]]s in parallel, it is easy to see that the system can't work. Indeed it did not: swap was full all the time, sometimes the [[VirtualBox]] machine rebooted, etc. | 650MB of virtual space is a lot. If you moreover realize that [[hudson]] starts multiple [[Java]] [[VM]]s in parallel, it is easy to see that the system can't work. Indeed it did not: swap was full all the time, sometimes the [[VirtualBox]] machine rebooted, etc. | ||
- | For a while I was searching for a solution. I tried to pass in '''-mx64M''' into every started process, but as far as I can tell, this is not easy. There does not seem to be any configuration file the ''java'' launcher reads (''jvm.cfg'' is not the one, one cannot specify there default command line arguments). | + | For a while I was searching for a solution. I tried to pass in '''-mx64M''' into every started process, but as far as I can tell, this is not easy. There does not seem to be any configuration file the ''java'' launcher reads (''jvm.cfg'' is not the one, one cannot specify there default command line arguments). Well, it is not documented, but there is: |
- | + | <source lang="bash"> | |
+ | _JAVA_OPTIONS="-Xmx64M -XX:MaxPermSize=32M" | ||
+ | export _JAVA_OPTIONS | ||
+ | </source> | ||
+ | |||
+ | So now, instead of specifying the parameter on command line, which is not practical you can put the above code snippet into ''/etc/profile.d/java.sh'' and all ''java'' processes will pick it up! Hopefully it will work now! | ||
+ | |||
+ | === The Previous Solutions === | ||
Then a friend of mine suggested to try official [[JDK]], not just [[OpenJDK]] variant. I hesitated for a while, but then I decided to try it. Here is the ''top'' output: | Then a friend of mine suggested to try official [[JDK]], not just [[OpenJDK]] variant. I hesitated for a while, but then I decided to try it. Here is the ''top'' output: |