0

I understand that system load as reported by linux 'top' is the avg number of processes waiting for CPU time and you should thus take the number of CPU cores into account when interpreting the load. So a load of 4 on a 4 core system rougly equals a load of 1 on a single core system.

My question is: is this also true for virtual servers where CPU cores don't directly map on processors?

1 Answer 1

1

In a virtualized environment, from the viewpoint of the host, the virtual cpus of the guest vm are simply processes (or threads) of execution. The aren't needed to run on separate cpus, or with the exact number of the host cpus.

Although if the tasks emulating the virtual cpus of the guests are running one-to-one to the host cpus, thus there is exactly one thread of execution, bound to a single host cpu, then it has a big advantage: it enables for the guest vm to optimize its tasks as if it were on a non-virtualized environment.


The question of the load is practically a separate thing from that. The load means the average number of the runnable processes which can get a time slice on a task schedule. In simplified form, it means: "if a simple, single-threaded task tried to allocate so many cpu as it can, could get 1/load of the cpu." Thus, if the load is 5, then the "average" processes can get 20% of the cpu time. It is on a single cpu, for singlethreaded processes.

It doesn't matter if these cpus are virtual or not. In most virtualization scenarios, the host doesn't know anything about the processes of the guest, he can see only the cpus of the guest, as his threads. But it doesn't changes the definition of the system load, it doesn't matter if it is a virtualized system or a host.


From a practical viewpoint, this question has only a limited importance, because the practical problems which the professional systemadministrators face, have mostly only a few to do with a cpu notfall. In most cases, the problems are coming from the configurability, automatization and from the redundant availability of the system resources.

Virtualization goals to solve (or make our life happier) in the viewpoint of these problems, although there are very interesting exceptions as well (mainly in the academic or research/development sphere).

1
  • +1 good answer. I guess the only thing I'd add is that in a virtualized environment, guests now have the concept of an additional CPU percentage class, which is steal. This is in addition to the standard classes such as sys, user, int, iowait, etc. Steal refers specifically to CPU cycles that the guest requested, but the host could not (or chose not to) grant.
    – EEAA
    Jul 24, 2014 at 14:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .