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.

► Observe the status of the cpuplugd service:<br />

# service cpuplugd status<br />

cpuplugd (pid 1574) is running...<br />

<strong>The</strong> output shows that cpuplugd starts by default in the current run level.<br />

► Wait a few minutes and run the lscpus script again:<br />

# lscpus<br />

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

1<br />

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

0<br />

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

0<br />

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

0<br />

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

0<br />

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

0<br />

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

0<br />

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

0<br />

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

0<br />

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

0<br />

<strong>The</strong> output shows that now only one of the ten virtual CPUs are active. <strong>The</strong> cpuplugd<br />

service turned off the other 9.<br />

► <strong>The</strong> cpuplugd configuration file is /etc/sysconfig/cpuplugd. Some middleware products<br />

recommend a minimum of two virtual processors. If the majority of your Linux servers will<br />

be running a workload which recommends two processors, changed the default <strong>for</strong><br />

CPU_MIN to 2. An exception would be when only a single physical processor is available.<br />

View the non-comments and lines that are not blank in the configuration file with the<br />

following command:<br />

# cd /etc/sysconfig<br />

# egrep -v '^$|^#' cpuplugd<br />

CPU_MIN="1"<br />

CPU_MAX="0"<br />

UPDATE="<strong>10</strong>"<br />

CMM_MIN="0"<br />

CMM_MAX="8192"<br />

CMM_INC="256"<br />

HOTPLUG="(loadavg > onumcpus + 0.75) & (idle < <strong>10</strong>.0)"<br />

HOTUNPLUG="(loadavg < onumcpus - 0.25) | (idle > 50)"<br />

MEMPLUG="0"<br />

MEMUNPLUG="0"<br />

<strong>The</strong> default rules <strong>for</strong> the plugging and unplugging of CPUs in the configuration file is as<br />

follow:<br />

HOTPLUG = "(loadavg > onumcpus +0.75) & (idle < <strong>10</strong>.0)"<br />

HOTUNPLUG = "(loadavg < onumcpus -0.25) | (idle > 50)"<br />

Where the variables in the statements have the following meaning:<br />

loadavg <strong>The</strong> current average CPU load<br />

onumcpus <strong>The</strong> number of CPUs that are online<br />

runable_proc <strong>The</strong> current number of processes that can be run<br />

Chapter 13. Miscellaneous recipes 211

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

Saved successfully!

Ooh no, something went wrong!