I'm running a heavy java process on my rhel. It had 8GB of RAM and 1 core for CPU. With the help top
and htop
I saw there was not enough CPU available for this process.
I added 3 extra cores in VMware and rebooted. If I execute nproc
I see 4 so there are now 4 cores on the server.
I restart the java process but it's not going faster. I read that top could show till 400% if you have 4 cores. (each core till 100%). When I execute top
I see 100%. I suspect one core is in full use and the 3 other ones aren't doing anything.
Is there a way to let this process or my server use all the cores available? I'm on a RHEL 7.2
You need to configure your JVMs to make use of multiple processors, as others have mentioned in the comments. This is an application issue, not an OS issue. I'm fairly certain the default is only to use one CPU. If you don't configure it specifically to use more, you will peg one CPU at 100% while the other three go nearly unused and your app suffers.