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="network_performance">
|
---|
5 | <title>Improving Network Performance</title>
|
---|
6 |
|
---|
7 | <body>
|
---|
8 | <p><ph conkeyref="vbox-conkeyref-phrases/product-name"/> provides a variety of virtual network adapters
|
---|
9 | that can be attached to the host's network in a number of ways. Depending on which types of adapters and
|
---|
10 | attachments are used the network performance will be different. Performance-wise the virtio network adapter is
|
---|
11 | preferable over Intel PRO/1000 emulated adapters, which are preferred over the PCNet family of adapters. Both
|
---|
12 | virtio and Intel PRO/1000 adapters enjoy the benefit of segmentation and checksum offloading. Segmentation
|
---|
13 | offloading is essential for high performance as it allows for less context switches, dramatically increasing the
|
---|
14 | sizes of packets that cross the VM/host boundary. </p>
|
---|
15 | <note>
|
---|
16 | <p>Neither virtio nor Intel PRO/1000 drivers for Windows XP support segmentation offloading. Therefore
|
---|
17 | Windows XP guests never reach the same transmission rates as other guest types. Refer to MS Knowledge base
|
---|
18 | article 842264 for additional information. </p>
|
---|
19 | </note>
|
---|
20 | <p>Three attachment types: Internal, Bridged, and Host-Only, have nearly identical performance. The
|
---|
21 | Internal type is slightly faster and uses less CPU cycles as the packets never reach the host's network stack. The
|
---|
22 | NAT attachment type is the slowest and most secure of all attachment types, as it provides network address
|
---|
23 | translation. The generic driver attachment is special and cannot be considered as an alternative to other
|
---|
24 | attachment types. </p>
|
---|
25 | <p>The number of CPUs assigned to VM does not improve network performance and in some cases may hurt it
|
---|
26 | due to increased concurrency in the guest. </p>
|
---|
27 | <p>Here is a short summary of things to check in order to improve network performance: </p>
|
---|
28 | <ul>
|
---|
29 | <li>
|
---|
30 | <p>Whenever possible use the virtio network adapter. Otherwise, use one of the Intel PRO/1000
|
---|
31 | adapters. </p>
|
---|
32 | </li>
|
---|
33 | <li>
|
---|
34 | <p>Use a Bridged attachment instead of NAT. </p>
|
---|
35 | </li>
|
---|
36 | <li>
|
---|
37 | <p>Ensure segmentation offloading is enabled in the guest OS. Usually it will be enabled by
|
---|
38 | default. You can check and modify offloading settings using the <userinput>ethtool</userinput> command on
|
---|
39 | Linux guests. </p>
|
---|
40 | </li>
|
---|
41 | <li>
|
---|
42 | <p>Perform a full detailed analysis of network traffic on the VM's network adaptor using a third
|
---|
43 | party tool such as Wireshark. To do this, a promiscuous mode policy needs to be used on the VM's network
|
---|
44 | adaptor. Use of this mode is only possible on the following network types: NAT Network, Bridged Adapter,
|
---|
45 | Internal Network, and Host-Only Adapter. </p>
|
---|
46 | <p>To setup a promiscuous mode policy, either set the <uicontrol>Promiscuous Mode</uicontrol> in the <uicontrol>Network</uicontrol> section of the VM's <uicontrol>Settings</uicontrol> for the network adaptor, or use the command line tool <userinput>VBoxManage</userinput>. See <xref href="../cli_topics/vboxmanage-modifyvm.dita"/>.</p>
|
---|
47 | <p>Promiscuous mode policies are as follows: </p>
|
---|
48 | <ul>
|
---|
49 | <li>
|
---|
50 | <p><codeph>deny</codeph>, which hides any traffic not intended for the VM's network adaptor.
|
---|
51 | This is the default setting. </p>
|
---|
52 | </li>
|
---|
53 | <li>
|
---|
54 | <p><codeph>allow-vms</codeph>, which hides all host traffic from the VM's network adaptor,
|
---|
55 | but allows it to see traffic from and to other VMs. </p>
|
---|
56 | </li>
|
---|
57 | <li>
|
---|
58 | <p><codeph>allow-all</codeph>, which removes all restrictions. The VM's network adaptor sees
|
---|
59 | all traffic. </p>
|
---|
60 | </li>
|
---|
61 | </ul>
|
---|
62 | </li>
|
---|
63 | </ul>
|
---|
64 | </body>
|
---|
65 |
|
---|
66 | </topic>
|
---|