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
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
-/+ buffers/cache: 98 654<br />
Swap: 761 0 761<br />
► You can also give the memory back by echoing offline to the state file:<br />
# echo offline > memory1/state<br />
# echo offline > memory2/state<br />
► Verify the memory has be returned:<br />
# cat memory*/state<br />
online<br />
offline<br />
offline<br />
offline<br />
# free -m<br />
total used free shared buffers cached<br />
Mem: 241 165 75 0 18 54<br />
-/+ buffers/cache: 92 148<br />
Swap: 761 0 761<br />
This section has shown how to configure virtual machines with standby memory and how to<br />
“hot-plug” the memory from Linux. Each of the four Linux virtual machines, LINUX01 -<br />
LINUX04 default to 256 MB of memory and can be moved up to 1 GB. However, LINUX02 -<br />
LINUX04 require Linux to be shutdown, the CP DEFINE STORAGE command to be run and Linux<br />
to be rebooted. LINUX01 can now have memory added while Linux is running. This function<br />
can increase your server farm’s per<strong>for</strong>mance and availability.<br />
13.7 Utilizing the cpuplugd service<br />
<strong>The</strong> cpuplugd service allows Linux to enable or disable CPUs and memory, based on a set<br />
of rules. It can improve per<strong>for</strong>mance by setting the correct number of processors and amount<br />
of memory <strong>for</strong> Linux systems depending on their current load. It can also prevent the Linux<br />
scheduler from queue balancing in partial load situations.<br />
More in<strong>for</strong>mation on cpuplugd can be found in the manual Linux on System z Device Drivers,<br />
Features and Commands on Red Hat Enterprise Linux 6 on the Web at<br />
http://www.ibm.com/developerworks/linux/linux390/documentation_red_hat.html<br />
13.7.1 Determining the virtual CPUs being used<br />
To start work with cpuplugd, per<strong>for</strong>m the following steps:<br />
► Start an SSH session to a Linux and determine how many CPUs Linux has online. Write a<br />
short bash script, lscpus, to save typing:<br />
# cd /usr/local/sbin<br />
# vi lscpus<br />
#!/bin/bash<br />
# script to list the number and status of virtual CPUs<br />
<strong>for</strong> i in /sys/devices/system/cpu/cpu*<br />
do<br />
echo $i<br />
cat $i/online<br />
done<br />
► Save the file and the set it to be executable:<br />
# chmod +x lscpus<br />
2<strong>10</strong> <strong>The</strong> <strong>Virtualization</strong> <strong>Cookbook</strong> <strong>for</strong> RHEL 6