#1 2015-10-06 13:28:13

mred
Trusted Member
Registered: 2015-10-02
Posts: 10

MultiCore (split core into two or more)

Would it be a very big trouble to split a given 1 vCPU (2+GHz) to 2 vCPUs of (1GHz) or even 4 x 500MHz?

Short reason: Java
Extended reason: I wanted to test my code on one of the VPSs (MEGA256 which should be really enough). Code checkout from SVN was ok. But the problem started with "mvn compile". As it started to download every dependency it needed, Java by its design uses all the CPU it can, and in short period "PROCESS KILLED".
The only possibility to limit Java process with cpu is to limit with which cores it can take. So if VPS would have 2 cores with half capacity, it would be possible to limit Java to use only one core (which means only half of CPU capacity would be used).

This improvement would mean that users could use their VPSs for more scenarios and on the other hand, other VPSs on the same machine would not feel 100% even for short time of one core load.

Offline

#2 2015-10-06 15:47:15

Nixtren
Trusted Member
Registered: 2015-07-17
Posts: 22

Re: MultiCore (split core into two or more)

You can use the program cpulimit to limit CPU usage smile

Offline

#3 2015-10-06 16:42:32

willie
Trusted Member
Registered: 2013-05-05
Posts: 405

Re: MultiCore (split core into two or more)

Unless the process had been running for quite a long time, that sounds like an OOM (out of memory) kill rather than some kind of cpu monitor.  I'd say do the compile on a bigger machine, then transfer the executable to the VPS.  Also if possible, can you configure the build script to launch fewer processes?  That would decrease the memory load.

Last edited by willie (2015-10-06 16:43:10)

Offline

#4 2015-10-06 21:13:19

RyanB
Trusted Member
From: Morphett Vale, SA
Registered: 2013-09-08
Posts: 868

Re: MultiCore (split core into two or more)

mred wrote:

Java by its design uses all the CPU it can

You're saying process is getting killed like it's a bad thing then..
Looking at the global perspective of all the other users on the node, I dare say they are happy  about this.

Who even uses Java these days, it's 2015 not 1999.

But as Nixtren and willie have some good ideas, i'll leave it to beaver!

Offline

#5 2015-10-08 05:06:26

yomero
Trusted Member
Registered: 2014-06-30
Posts: 222

Re: MultiCore (split core into two or more)

mred wrote:

Java by its design uses all the CPU it can

False.

Cpulimit is a good choice

RyanB wrote:

Who even uses Java these days, it's 2015 not 1999.

Most "enterprise" software is java.

Offline

#6 2015-10-08 17:05:55

DavidGestionDBI
Provider-Moderator
From: Montreal, Canada
Registered: 2015-01-10
Posts: 590
Website

Re: MultiCore (split core into two or more)

yomero wrote:
mred wrote:

Java by its design uses all the CPU it can

False.

Cpulimit is a good choice

RyanB wrote:

Who even uses Java these days, it's 2015 not 1999.

Most "enterprise" software is java.

Yes, I agree. However, they don't use NAT VPS at $3/y.... Mostly huge cluster depending of the application.


-----------
David B. |  Technical Director at Gestion DBI ||  Want to receive our promotions?
IT consulting and Hosting Provider | 24/7 Technical Support

Offline

#7 2016-01-13 20:15:29

jump84
Member
From: USA, Arusha, Tanzania
Registered: 2016-01-13
Posts: 1
Website

Re: MultiCore (split core into two or more)

Informative post.

Offline

Board footer