linux 2.6.37 の新機能 "I/O throttling"
今まで (2.6.33 以降) も cgroup には blkio サブシステムがあったので,I/O のコントロールは可能でしたが,従来のは "IO weight controller" でした.
早速 2.6.37 カーネルを make して,マウントしてみました.I/O throttling を使うのにカーネル構築の際必要なオプションは
CONFIG_BLK_CGROUP=y CONFIG_BLK_DEV_THROTTLING=y
です.
# mkdir /blkio # mount -t cgroup -o blkio blkio /blkio # cd blkio # ls blkio.avg_queue_size blkio.io_wait_time blkio.weight blkio.dequeue blkio.reset_stats blkio.weight_device blkio.empty_time blkio.sectors cgroup.clone_children blkio.group_wait_time blkio.throttle.io_service_bytes cgroup.event_control blkio.idle_time blkio.throttle.io_serviced cgroup.procs blkio.io_merged blkio.throttle.read_bps_device notify_on_release blkio.io_queued blkio.throttle.read_iops_device release_agent blkio.io_service_bytes blkio.throttle.write_bps_device tasks blkio.io_service_time blkio.throttle.write_iops_device blkio.io_serviced blkio.time
とりあえずそれだけ.^^; (従来の "IO weight controller" も有効なので,そのためのファイルも混在しています)