Red Hat ENTERPRISE LINUX 5.4 - SYSTEMTAP BEGINNERS GUIDE Technické informace Strana 140

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 240
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 139
126 System Analysis and Tuning Guide
Anonymous and file cache.
No limits for kernel memory.
Maybe in another subsystem if needed.
For more information, see /usr/src/linux/Documenta
tion/cgroups/memory.txt.
Blkio (Resource Control)
The blkio (Block IO) controller is now available as a disk I/O controller. With the
blkio controller you can currently set policies for proportional bandwidth and for
throttling.
These are the basic commands to configure proportional weight division of band-
width by setting weight values in blkio.weight:
# Setup in /sys/fs/cgroup
mkdir /sys/fs/cgroup/blkio
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
# Start two cgroups
mkdir -p /sys/fs/cgroup/blkio/group1 /sys/fs/cgroup/blkio/group2
# Set weights
echo 1000 > /sys/fs/cgroup/blkio/group1/blkio.weight
echo 500 > /sys/fs/cgroup/blkio/group2/blkio.weight
# Write the PIDs of the processes to be controlled to the
# appropriate groups
command1 &
echo $! > /sys/fs/cgroup/blkio/group1/tasks
command2 &
echo $! > /sys/fs/cgroup/blkio/group2/tasks
These are the basic commands to configure throttling or upper limit policy by
setting values in blkio.throttle.read_bps_device for reads and
blkio.throttle.write_bps_device for writes:
# Setup in /sys/fs/cgroup
mkdir /sys/fs/cgroup/blkio
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
# Bandwidth rate of a device for the root group; format:
# <major>:<minor> <byes_per_second>
echo "8:16 1048576" > /sys/fs/cgroup/blkio/
blkio.throttle.read_bps_device
For more information about caveats, usage scenarios, and additional para-
meters, see /usr/src/linux/Documentation/cgroups/blkio-
controller.txt.
Zobrazit stránku 139
1 2 ... 135 136 137 138 139 140 141 142 143 144 145 ... 239 240

Komentáře k této Příručce

Žádné komentáře