News for hackers. Stuff that matters.
Re:Tuning JVM for a VM - Lessons Learned, Directly from VMware by rickette on Friday April 13, 2012 @01:53AM (#3835546)
It always amazed me that the JVM doesn't have any options to restrict CPU resources (something VMware does have). The only alternative I can think of is to use the unix taskset utility to limit JVMs to specific CPU cores. Anybody got experiece with a setup like this?

Limiting memory usage and file permissions with the JVM is indeed easy.

Re:Tuning JVM for a VM - Lessons Learned, Directly from VMware by sciurus on Friday April 13, 2012 @01:26PM (#3837798)
Create a cgroup hierarchy with the CPU subsystem attached, then put each JVM in its own cgroup in that hierarchy. By default, each JVM will get an equal amount of CPU time. A JVM can be given relatively more CPU time by increasing cpu.shares for its cgroup. You can similarly manage memory and i/o with the memory and blkio subsystems.

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6...

Re:Tuning JVM for a VM - Lessons Learned, Directly from VMware by guelo on Friday April 13, 2012 @02:25AM (#3835607)
Let the OS manage the CPUs, you can use nice if you need to prioritize.
Re:Tuning JVM for a VM - Lessons Learned, Directly from VMware by ntoshev on Friday April 13, 2012 @03:53AM (#3835817)
There is also cpulimit if you want to set hard limits.