27.12.2012 Views

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

idle <strong>The</strong> current idle percentage<br />

<strong>The</strong>se CPU hot plugging and unplugging values will be used in the next section. In the default<br />

setup, cpuplugd will only make changes to the virtual processor configuration. <strong>The</strong> auto<br />

adaptive adjustment of the memory using the cmm feature (module) is deactivated by default<br />

and also not available when running in a native LPAR environment.<br />

13.7.2 Generating a workload to see cpuplugd work<br />

You can now generate a workload to show how the cpuplugd will turn on CPUs.<br />

Important: Running the following command will generate significant CPU use. Verify there<br />

is not a mission-critical workload running on this z/<strong>VM</strong> LPAR, as this test may affect it.<br />

Also, be sure to kill the processes after seeing cpuplugd in action.<br />

Per<strong>for</strong>m the following steps:<br />

► Put ten looping jobs in the background with the following <strong>for</strong> loop:<br />

# <strong>for</strong> i in `seq 1 <strong>10</strong>`<br />

> do<br />

> bash -c "cat /dev/zero > /dev/null" &<br />

> done<br />

[1] 2441<br />

[2] 2442<br />

[3] 2443<br />

[4] 2444<br />

[5] 2445<br />

[6] 2446<br />

[7] 2447<br />

[8] 2448<br />

[9] 2449<br />

[<strong>10</strong>] 2453<br />

► See that the jobs are running (you can also use the top command):<br />

# pstree -G | grep cat<br />

+-sshd---sshd---bash---<strong>10</strong>*[bash---cat]<br />

► Now run lscpus every so often. <strong>The</strong> following example shows that, after a minute or so,<br />

cpuplugd has started five of the nine spare processors.<br />

# lscpus<br />

/sys/devices/system/cpu/cpu0<br />

1<br />

/sys/devices/system/cpu/cpu1<br />

1<br />

/sys/devices/system/cpu/cpu2<br />

1<br />

/sys/devices/system/cpu/cpu3<br />

1<br />

/sys/devices/system/cpu/cpu4<br />

1<br />

/sys/devices/system/cpu/cpu5<br />

1<br />

/sys/devices/system/cpu/cpu6<br />

0<br />

/sys/devices/system/cpu/cpu7<br />

0<br />

/sys/devices/system/cpu/cpu8<br />

212 <strong>The</strong> <strong>Virtualization</strong> <strong>Cookbook</strong> <strong>for</strong> RHEL 6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!