sts098's picture

I have set up a lamp appliance on an ESXi server using the OVA VM format.  The OVA was configured with one CPU and 512 MB ram.  I am hoping to improve the performance of the VM.  The ESXi server I have has multiple processors and 128 GB ram.  

Can I simply shut down the VM and increase memory, CPU, cores on the vm?  Are there any changes needed in TurnkeyLinux appliance to fully take advantage of these increases?  

Jeremy Davis's picture

Linux initialises resources such as CPU and RAM at boot time, so you could literally move a physical hard drive with Linux installed from one PC to new PC and (assuming that the CPU architecture is compatible) it should just work! :)

So increasing RAM and CPU in a VM is no problem. Although you will need to reboot for the additional resources to be available.

FWIW, you can also increase the volume size too if you need more storage space. Although you will need to take a few more steps for the larger volume to be usable internally (note that blog post is extremely old, but it's still completely relevant).

sts098's picture

Thanks for the quick response.  One other question.  If I add CPU resources, they can be added as cores or CPUs.  Is it better to increase to 2 CPUs or two cores?  If I go to 4, 4 cores, 4 CPUs, or 2 and 2?  From a Linux standpoint, is one configuration better than another?     


Jeremy Davis's picture

TBH, I wasn't 100% sure, but have always assumed that it didn't really make any difference. Having said that, I have always tended to match (a subset) of the physical hardware. So in my case, I've always used a single socket and multiple cores (my server only has a single CPU with 8 cores).

But your question has prompted me to do some reading. It turns out that it can make a difference, but none of the factors are likely to be an issue with TurnKey and/or with 4 vCPUs - as per your post. So in your case, the answer is that it makes not difference.

The 3 factors where is can make a difference are:


Much to my surprise, it can actually make a performance difference. However, not until you get to a count of 9 vCPUs. Once your vCPU count is higher than 8, best performance is generally achieved via selecting a larger set of sockets rather than cores. E.g. 9 sockets with 1 core each, will perform multi-threaded CPU operations more efficiently than 1 socket with 9 cores.

Hot plugging additional vCPU resources

I assume it depends on the VM environment that you are using, but apparently it is possible to add additional sockets on the fly. I.e. you could "hot plug" new CPU socket to a VM (add it without restarting) and the VM would be able to use the additional resources straight away. TBH, I haven't tested this in general, nor whether it works with TurnKey, but at least in theory it should be possible apparently. In other words, if you want to add additional (v)CPU resources without restarting your server, you can only add sockets.


This one definitely doesn't apply to TurnKey (at least not unless you install some relevant software on top). Some software licensing restrictions/costs are done on a "per socket" basis. So if you install any software like that, you may be able to tweak your virtual hardware to match the licencing of existing software than you are (re)deploying and/or minimise the licencing costs of new software that you purchase.

Add new comment