0

I have a 512MB KVM Debian OS VPS running several game servers and several sql enabled websites.

Currently I have 1 vCPU core and it stays around 15% usage. If I were to get an extra vCPU core will the VPS know to utilize both cores automatically or do I have specify which programs run what and/or configure my programs to use multi-threading? Will an extra CPU core even matter if it is only 10% utilized?

penu
  • 169
  • 2
  • 7
  • 2
    That's a lot of stuff running on less RAM than a modern smartphone has. – jordanm May 03 '15 at 02:46
  • @jordanm top shows `Mem: 513028k total, 502200k used, 10828k free, 120712k buffers` So I think it's ok? (though its not running everything right now) – penu May 03 '15 at 02:48
  • Put it under load and see everything crash. Your RAM is OK for the time being because not all the sites nor DBs are used. I'd suggest you separate everything into its own server/VM, and even then, 512MB seems really low for an SQL-powered site (assuming the DB is hosted on the same server). –  May 03 '15 at 06:01

2 Answers2

0

Whatever performance problem you're experiencing (or planning to experience - because trust me, it will happen) is due to the RAM. Even for a single site and an SQL database, 512 MB of RAM is too low, let alone several sites and game servers.

Separate each service into its own server or VM (especially the game servers - I wouldn't trust them in terms of security so it's better to put them on a separate host you can quickly nuke without putting other data at risk if it gets compromised), and then see if you still get a performance issue.

To answer your question, when adding a second core the processes will automatically be shared across them, each process will still use only one but that'll definitely spread the PHP-FPM and/or game server processes across the two cores. But the CPU isn't the issue in this case.

-2

If you are running PHP on Apache, I don't think so. If you are running Tomcat like i am, then yes, Java threads will run on each CPU.

So it very much depends on what you are doing.

Of course, if you have a web server and database, then each should be able to run on a different CPU, and that should improve performance as well.

I am running 512Mb server on digital ocean, and that seems fine for servers. You forget how much 512Mb is, particularly if you are not running a desktop.

Dov
  • 109
  • 3
  • Thanks for the insight. I am running PHP/Apache but my host has a sale on cores so I thought why not if it would be helpful. – penu May 03 '15 at 02:57