

ASK HN: 1 core for a 16 core VPS server, is it dedicated or shared? - ForFreedom

I was having a discussion with a VPS web host ( a well known web host).  I asked them is them about the usage of the core.  They said that if I choose a 1 core VPS it will be dedicated to me.  To my understanding that cores on a VPS are never reserved for &quot;ONE&quot; user. So if they have 50 different customers would they allot ONE 16 core bare metal box if 1 core is reserved for one customer?<p>We went on to chat for one hour, and I think they avoided to answer my question or the person on the live chat had no idea what I was asking.<p>So my question here is if there a bare metal box and the max is 16 core for a VPS server can the web host dedicate 1 core to each user or the core is shared?
======
gus_massa
Perhaps they can use processor affinity to put each user in one core (
[https://en.wikipedia.org/wiki/Processor_affinity](https://en.wikipedia.org/wiki/Processor_affinity)
).

Sometimes this is useful to make single thread programs fasters, because it
avoids the necessity to "transfer" the cache form the old core to the new
core. ( [http://mailinator.blogspot.com.ar/2010/02/how-i-sped-up-
my-s...](http://mailinator.blogspot.com.ar/2010/02/how-i-sped-up-my-server-by-
factor-of-6.html) the article is old (2010) but interesting)

I never tried this in a situation like yours, so I don't know if this is
useful in your case.

~~~
ForFreedom
Interesting article from 2010. So what you are saying is that they can
dedicate one core to multiple users(who hosts multiple websites) using
processor affinity?

------
coldtea
> _So my question here is if there a bare metal box and the max is 16 core for
> a VPS server can the web host dedicate 1 core to each user or the core is
> shared?_

Yes, they can dedicate 1 core (or more) to a user. They just pin the VPS
processes to specific cores per user.

Xen allows this for example: "vCPU Pinning for guests - You can dedicate a
physical cpu to a particular virtual cpu or a set of virtual cpus."

What exactly do you find hard to believe?

~~~
ForFreedom
That they can assign a core to a particular user. So assume the VPS is a 16
core, according to your statement if they have 16 clients, the web host can
allot 16 clients only?

~~~
coldtea
> _That they can assign a core to a particular user._

How's that hard to believe? You can even assign a single particular process
(e.g. nginx) to a core (or a range of cores) yourself in your own linux
laptop.

Assigning a virtual CPU to a physical core is no more difficult with modern
supervisors.

> _So assume the VPS is a 16 core, according to your statement if they have 16
> clients, the web host can allot 16 clients only?_

No, they can also allot 1,000 clients, which would then be sharing cores.

But IF they pin each of their clients to a single core, then yes, they can
only have up to 16 clients (or less) for a 16-core server.

And they can also combine those two options: allot 4 cores to 4 customers (one
per core), and the remaining 12 cores to 20-30 other customers...

------
ForFreedom
[update] I shall post the chat transcript if required.

