NIC throughput
- If a NIC on the host computer is a 1Gb NIC, and all the VM's are configured to use only 100Mb connections, how does this affect the physical NIC. Will all the computers just take 100Mb of its bandwidth, and leave the rest for the other computers/physical Host. I do have 2 NIC's on the computer, one for the bridge to the VM's and one for host management. I have looked in the performance monitoring, and do see that the NIC is pretty well getting maxed out, but was still wondering how the machines relate to each other at this aspect.
Thanks
Scotty
Answers
- Hello Scotty,
Please allow me to explain this in a little more detail.
Actually, as all of the devices (including virtual network adapters and virtual cables and even the virtual switch) are virtualized, the traffic speed is not limited by a theoretical value like the real devices. All the traffic goes from the network stack of the VM to the intermediate driver on the parent partition using a data exchange mechanism.
You may sometimes found that the speed reaches 10GB (might be even higher), but this is just a reasonable moniker for the speed of the "virtual cable" between the VMNic and the switch port.
However, all the traffic to the "real" network (only the traffic to the "real" network) from the virtual switch will go through the physical NIC driver (miniport driver) and the physical NIC. This is the same as how the data goes through the NIC in a normal computer (like Windows Vista). You can think this as that all the data to the outside network will share the bandwidth of the physical NIC on the parent partition. And this is the only limitation for all the traffic communication between the VM and the "real" world.
Hope that I have made myself clearly.
Best regards,
Chang Yin- Marked As Answer byChang Yin Tuesday, September 09, 2008 10:29 AM
All Replies
- I don't follow this at all. You say that the NICs in the vm are configured to use 100M connections. How and why did you do this?
When two NICs communicate with each other they must use the same methods. If you have a 10M NIC it can only communicate at 10M even if it is talking to a 100M or a 1G NIC.
The NICs in the vms are connected to a virtual switch. When they communicate with each other it should not affect the physical NIC. The physical NIC only comes into it if they talk to a NIC on the physical LAN. See this article on what happens when you create a virtual network linked to a physical NIC.
http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/08/understanding-networking-with-hyper-v.aspx
Bill - Yes, I understand that the VM's all connect to a virtual switch. So, when traffic comes into the physical NIC, and it is passed to all the VM"s, then when it hits the virtual switch, is it dropped to 100M?
I have LOTS of traffic going from the "real" network to the "Virtual" network, and am just wondering how the physical NIC is handling the traffic. According to networking, if the virtual switch is 100 M, then the traffic from the physical NIC to the virtual switch is 100M, but what about the traffic coming from the Gigabit "real" switch the physical NIC is attached to.
Do the VM"s share the Gigabit? Does the traffic drop to 100M at the physical NIC? I apologize if this is still unclear. I want to try to have more NIC's on the physical computer to have one NIC per one VM, and see if that changes the behavior at all.
Scotty - Ethernet networks don't work like that. Traffic can't go at one speed for a while and then slow down or speed up! That sort of thing can only happen using different LAN segments (such as a 1G segment for server to server links and 100M between workstations).
The NIC ratings are the maximum supported by the device. A IG NIC will only run at (close to) IG if it is on a good quality wire and communicating with just one other 1G NIC. On a real network you are unlikely to get much above 60% because of contention. If the NIC is communicating with a 100M NIC it will be about 60% of 100Mb.
The sending and receiving NIC must be using the same protocols, so a 10M NIC can only send or receive at less than 10M even if it is connected to a 100M or 1G NIC on good cables.
I am still mysified by your statement that "all the VM's are configured to use only 100Mb connections". How and why did you do that? The speed of the data transfer will be controlled by the speed at which the physical NICs run (ie the physical NIC on the host and the physical NIC on the other LAN machine communicating with the vm).
If you really think that your NIC is slowing down traffic to your vms you can certainly put extra NICs in the host and create extra virtual switches. I would need some stong evidence before I did that.
Bill - Hello Scotty,
Please allow me to explain this in a little more detail.
Actually, as all of the devices (including virtual network adapters and virtual cables and even the virtual switch) are virtualized, the traffic speed is not limited by a theoretical value like the real devices. All the traffic goes from the network stack of the VM to the intermediate driver on the parent partition using a data exchange mechanism.
You may sometimes found that the speed reaches 10GB (might be even higher), but this is just a reasonable moniker for the speed of the "virtual cable" between the VMNic and the switch port.
However, all the traffic to the "real" network (only the traffic to the "real" network) from the virtual switch will go through the physical NIC driver (miniport driver) and the physical NIC. This is the same as how the data goes through the NIC in a normal computer (like Windows Vista). You can think this as that all the data to the outside network will share the bandwidth of the physical NIC on the parent partition. And this is the only limitation for all the traffic communication between the VM and the "real" world.
Hope that I have made myself clearly.
Best regards,
Chang Yin- Marked As Answer byChang Yin Tuesday, September 09, 2008 10:29 AM
Bill,
I did not configure anything. I have not found any documentation as to how the NIC's are configured. I assumed that since there are usually 3 standard configurations, (Gigabit, 100M and 10M) then the Virtual NIC's would most likely be at 100M. If this is not correct, then I apologize for my unclarity.What I am getting from your post is the virtual devices conform to the speed to the physical NIC, so being connected to a physical 1GB NIC, the virtual switch is be default a 1GB switch, and all the VM's then have Virtual 1GB NIC's.
With Chang Yin's post, I getting a better understanding as well. Most of the traffic to the VM's are from the "real" network, and as such are taking up bandwidth.
Thank you both for helping me clear this up in my mind. I am going to have several VM's hosting websites and databases that are talked to from all over the world, and need to have a clear understanding of this to make sure we have the best infrastructure possible.
Scotty
