Oracle Blog

Web-Notizen von Stefan Hinker

CPU-DR for Zones

In my last entry, I described how to change the memory configuration of a running zone. The natural next question is of course, if that also works with CPUs that have been assigned to a zone. The answer, of course, is "yes".

You might wonder why that would be necessary in the first place. After all, there's the Fair Share Scheduler, that's extremely capable of managing zones' CPU usage. However, there are reasons to assign dedicated CPU resources to zones, licensing is one, SLAs with specified CPU requirements another. In such cases, you configure a fixed amount of CPUs (more precisely, strands) for a zone. Being able to change this configuration on the fly then becomes desirable. I'll show how to do that in this blog entry.

In general, there are two ways to assign exclusive CPUs to a zone. The classic approach is by using a resource pool with an associated processor set. One or more zones can then be bound to that pool. The easier solution is to use the parameter "dedicated-cpu" directly when configuring the zone. In this second case, Solaris will create a temporary pool to manage these resources. So effectively, the implementation is the same in both cases. Which makes it clear how to change the CPU configuration in both cases: By changing the pool. If you do this in the classical approach, the change to the pool will be persistent. If working with the temporary pool created for the zone, you will also need to change the zone's configuration if you want the change to survive a zone restart.

If you configured you zone with "dedicated-cpu", the temporary pool (and also the temporary processor set that goes along with it) will usually be called "SUNWtmp_<zonename>". If not, you'll know the name of the pool... In both cases, everything else is the same:

Let's assume a zone called orazone, currently configured with 1 CPU. It's to be assigned a second CPU. The current pool configuration is like this: