1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE topic
|
---|
3 | PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
4 | <topic xml:lang="en-us" id="storage-bandwidth-limit">
|
---|
5 | <title>Limiting Bandwidth for Disk Images</title>
|
---|
6 |
|
---|
7 | <body>
|
---|
8 | <p>
|
---|
9 | Oracle VM VirtualBox supports limiting of the maximum bandwidth used for
|
---|
10 | asynchronous I/O. Additionally it supports sharing limits through
|
---|
11 | bandwidth groups for several images. It is possible to have more
|
---|
12 | than one such limit.
|
---|
13 | </p>
|
---|
14 | <p>
|
---|
15 | Limits are configured using <userinput>VBoxManage</userinput>. The
|
---|
16 | example below creates a bandwidth group named Limit, sets the
|
---|
17 | limit to 20 MB per second, and assigns the group to the attached
|
---|
18 | disks of the VM:
|
---|
19 | </p>
|
---|
20 | <pre xml:space="preserve">VBoxManage bandwidthctl "VM name" add Limit --type disk --limit 20M
|
---|
21 | VBoxManage storageattach "VM name" --storagectl "SATA" --port 0 --device 0 --type hdd
|
---|
22 | --medium disk1.vdi --bandwidthgroup Limit
|
---|
23 | VBoxManage storageattach "VM name" --storagectl "SATA" --port 1 --device 0 --type hdd
|
---|
24 | --medium disk2.vdi --bandwidthgroup Limit</pre>
|
---|
25 | <p>
|
---|
26 | All disks in a group share the bandwidth limit, meaning that in
|
---|
27 | the example above the bandwidth of both images combined can never
|
---|
28 | exceed 20 MBps. However, if one disk does not require bandwidth
|
---|
29 | the other can use the remaining bandwidth of its group.
|
---|
30 | </p>
|
---|
31 | <p>
|
---|
32 | The limits for each group can be changed while the VM is running,
|
---|
33 | with changes being picked up immediately. The example below
|
---|
34 | changes the limit for the group created in the example above to 10
|
---|
35 | MBps:
|
---|
36 | </p>
|
---|
37 | <pre xml:space="preserve">VBoxManage bandwidthctl "VM name" set Limit --limit 10M</pre>
|
---|
38 | </body>
|
---|
39 |
|
---|
40 | </topic>
|
---|