CPU Caps Alpha Release and Zones

Andrei just released a public Beta of his latest project– CPU Caps,
which is a new and very useful resource management feature for Solaris, and for zones.

Unlike CPU shares, CPU caps let you naturally limit CPU usage for a project or for a zone. My favorite part is that you talk to the system about these caps in terms of percentage of a CPU. So, a cap of “150” means “150%” or “never use more than 1 and 1/2 CPUs”. Here’s how to set a cap for a zone:

# zonecfg -z myzone
zonecfg:myzone> add rctl
zonecfg:myzone:rctl> set name=zone.cpu-cap
zonecfg:myzone:rctl> add value (priv=privileged,limit=150,action=deny)
zonecfg:myzone:rctl> end
zonecfg:myzone> exit

(As an aside, I think we need to make this syntax in zonecfg much easier, both for shares and caps. This is 6222025 RFE: make cpu shares a global property)

Another advantage of CPU caps is that they are active for all scheduling classes
except for “RT” (realtime). We’re really excited to have this feature (which hopefully will integrate soon) since we think it will make resouce management configurations for
zones quite a bit simpler in many cases.

The CPU Caps website includes complete directions on how to try this feature out.

Technorati Tag: ,

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s