224 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.0
15.Verify that the memory has returned:
# cat memory*/state
online
offline
offline
offline
# free -m
total used free shared buffers cached
Mem: 241 165 75 0 18 54
-/+ buffers/cache: 92 148
Swap: 761 0 761
This section has shown how to configure virtual machines with standby memory and how to
“hot-plug” the memory from Linux. Each of the four Linux virtual machines, LINUX01 through
LINUX04, default to 256 MB of memory and can be moved up to 1 GB. However, LINUX02
through LINUX04 require Linux to be shut down, the CP DEFINE STORAGE command to be
run, and Linux to be rebooted. LINUX01 can now have memory added while Linux is running.
This function can increase your server farm’s performance and availability.
13.7 Using the cpuplugd service
The cpuplugd service allows Linux to enable or disable CPUs and memory, based on a set of
rules. It can improve performance by setting the correct number of processors and amount of
memory for Linux systems depending on their current load. It can also prevent the Linux
scheduler from queue balancing in partial load situations.
More information about cpuplugd can be found in Linux on System z Device Drivers,
Features and Commands on Red Hat Enterprise Linux 6, which can be found on the web at
the following address:
http://www.ibm.com/developerworks/linux/linux390/documentation_red_hat.html
13.7.1 Determining the virtual CPUs being used
To determine the virtual CPUs that are being used, perform the following steps:
1. Start an SSH session to a Linux system and determine how many CPUs Linux has online.
Use a short bash script, lscpus, to save typing:
# cd /usr/local/sbin
# vi lscpus
#!/bin/bash
# script to list the number and status of virtual CPUs
for i in /sys/devices/system/cpu/cpu*
do
echo $i
cat $i/online
done
2. Save the file and the set it to be executable:
# chmod +x lscpus
3. Observe the status of the cpuplugd service:
# service cpuplugd status
cpuplugd (pid 1574) is running...
Commenti su questo manuale