[libvirt] The design choice for how to enable block I/O throttling function in libvirt

Zhi Yong Wu zwu.kernel at gmail.com
Tue Aug 30 02:55:00 UTC 2011


HI, folks,

I am trying to enable block I/O throttling function in libvirt. But
currently i met some design questions, and don't make sure if we
should extend blkiotune to support block I/O throttling or introduce
one new libvirt command "blkiothrottle" to cover it or not. If you
have some better idea, pls don't hesitate to drop your comments.

If one new libvirt command "blkiothrottle" is introduced, I plan to
design its usage syntax as below:

virsh # help blkiothrottle
  NAME
    blkiothrottle - Set or display a block disk I/O throttle setting.

  SYNOPSIS
    blkiothrottle <domain> <device> [--bps <number>] [--bps_rd
<number>] [--bps_wr <number>] [--iops <number>] [--iops_rd <number>]
[--iops_wr <number>]

  DESCRIPTION
    Set or display a block disk I/O throttle setting.

  OPTIONS
    [--domain] <string>  domain name, id or uuid
    [--device] <string>  block device
    --bps <number>   total throughput limits in bytes/s
    --bps_rd <number>  read throughput limits in bytes/s
    --bps_wr <number>  write throughput limits in bytes/s
    --iops <number>  total operation limits in numbers/s
    --iops_rd <number>  read operation limits in numbers/s
    --iops_wr <number>  write operation limits in numbers/s


virsh #

2.) If blkiotune command is extended to enable block I/O throttling function.

virsh # help blkiotune
  NAME
    blkiotune - Get or set blkio parameters

  SYNOPSIS
    blkiotune <domain> [--weight <number>] [--config] [--live]
[--current] [--bps <number>] [--bps_rd <number>] [--bps_wr <number>]
[--iops <number>] [--iops_rd <number>] [--iops_wr <number>]

  DESCRIPTION
    Get or set the current blkio parameters for a guest domain.
    To get the blkio parameters use following command:

    virsh # blkiotune <domain>

  OPTIONS
    [--domain] <string>  domain name, id or uuid
    --weight <number>  IO Weight in range [100, 1000]
    --config         affect next boot
    --live           affect running domain
    --current        affect current domain

Welcome to your suggestions or comments about how to choose it. thanks.

-- 
Regards,

Zhi Yong Wu




More information about the libvir-list mailing list