VMware
VMware ESX Server 1.5
Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Disk Bandwidth Management

Disk Bandwidth Management

ESX Server provides dynamic control over the relative amount of disk bandwidth allocated to each virtual machine. You can control disk bandwidth separately for each disk. The system manages the allocation of disk bandwidth to virtual machines automatically based on allocation parameters and system load. This is done in a way that maintains fairness and tries to maximize throughput.

You may specify initial disk bandwidth allocation values for a virtual machine in its configuration file. You may also modify disk bandwidth allocation parameters dynamically using the VMware Management Interface, the console operating system's procfs interface or the Perl API.

Reasonable defaults are used automatically when you do not specify parameters explicitly. Information about current disk bandwidth allocations and other status is available via the management interface, the console operating system's procfs interface and the Perl API.

Allocation Policy

Allocation Policy

ESX Server uses a modified proportional-share allocation policy for controlling disk bandwidth per virtual machine. This policy attempts to control the disk bandwidth used by a virtual machine to access a disk while also trying to maximize throughput to the disk.

Disk bandwidth shares entitle a virtual machine to a fraction of the bandwidth to a disk. For example, a virtual machine that has twice as many shares as another for a particular disk is entitled to consume twice as much bandwidth to the disk, provided that they are both actively issuing commands to the disk.

Bandwidth consumed by a virtual machine is represented in consumption units. Every SCSI command issued to the disk effectively consumes one unit by default and additional units proportional to the size of the data transfer associated with the command.

Throughput to the disk is maximized through the use of a scheduling quantum for disk requests from a virtual machine to a disk. A virtual machine is allowed to issue a number of requests to a disk (the scheduling quantum) without being preempted by another virtual machine. The issuing of a multiple requests without preemption is applicable only if these requests access sequential sectors on the disk.

Managing Disk Bandwidth from the Management Interface

Managing Disk Bandwidth from the Management Interface

To change disk bandwidth settings from the management interface, you must be logged in as root and the virtual machine must be running. Click Monitor Resources on the Overview page, then click Edit Resources under the name of the virtual machine you want to change. You can edit both the number of shares for the virtual machine you are changing and the total number of shares used on the ESX Server computer.

Enter the desired settings, then click Save Changes.

Configuration File Options

Configuration File Options

If you edit a virtual machine's configuration file by hand, use the following formats to control disk bandwidth allocation for the virtual machine. You may edit the configuration file using a text editor on the console operating system or through the management interface. To use the text editor in the management interface, go to the virtual machine's Edit Configuration page and click Use Text Editor.

scsi0:1.name = <fsname>:<diskname>.dsk
This is the standard format for specifying the VMFS file underlying a virtual disk.

sched.disk.shares.<fsname> = <nshares>
This configuration option specifies that the initial disk bandwidth share allocation for a virtual machine for the disk containing the VMFS file system <fsname> to be <nshares> shares. The valid range of values for <nshares> is 0 to 100000, enabling a large range of allocation ratios. If the number of shares for a disk is not specified, the default allocation is 1000.

Note: It is important to use the same name when you specify the virtual disk name and the shares for that disk. If <fsname> is used to specify the name of a virtual disk, the same <fsname> must be used to specify the shares. If a fully qualified set of numbers is used to specify the virtual disk name (for example, vmhba0:5:0), then the same set of numbers should be used to specify <fsname> when you are setting the number of shares.

Note: It is possible for a configuration file to have multiple lines specifying the number of shares. If this happens, the value specified in the last of those lines is used.

Configuration File Examples

Configuration File Examples

scsi0.virtualdev = vmxbuslogic
scsi0:1.present = TRUE
scsi0:1.name = rootdiskfs:rh6.2.dsk
scsi0:1.mode = persistent
sched.disk.shares.rootdiskfs = 800

scsi0:2.present = TRUE
scsi0:2.name = scratchfs:scratch1.dsk
sched.disk.shares.scratchfs = 400

In the example above, the first four lines in the first group and the first two lines in the second group are present in the configuration file before you make your changes. The final line in each group is the added line to specify the disk bandwidth allocation. As described above, check the value of <fsname> in the line specifying the VMFS file and use the same value in the line specifying the disk bandwidth allocation. In the first group of lines in the example, that value is rootdiskfs; in the second group of lines, it is scratchfs.

Managing Disk Bandwidth from the Console Operating System

Managing Disk Bandwidth from the Console Operating System

Use the following guidelines for the console operating system commands to monitor and manage allocation of disk bandwidth on an ESX Server computer.

/proc/VMware/vm/<id>/disk/vmhba<x:y:z>
Reading from this file reports the number of disk bandwidth shares allocated to the virtual machine identified by <id> for the disk identified by vmhba<x:y:z>. It also reports disk usage statistics.

Writing a number <nshares> to this file changes the number of disk bandwidth shares allocated to the virtual machine identified by <id> to <nshares>. The valid range of values for <nshares> is 0 to 100000.

previous Prev   Contents   Last   Next next