tcpdump mailing list archives
Libpcap performance under VMWare guest OSes
From: "Mark Bednarczyk" <voytechs () yahoo com>
Date: Thu, 10 Dec 2009 16:16:59 -0500
Hello, We are running into some performance issues with libpcap when running under VMWare products such as VMWworkstation or VMServer. These are guest OSes (running as a VM process on a host operating system.) We are finding that libpcap drops packets with only few hundred kilo-bits traffic captured. The same performance tests do not drop any packets even under many mega-bits/sec throughput for the same host operating system. "Guest" means under virtual VM machine, while "host" means native OS not under virtual OS. Has anyone here worked and figured out if there is anything that can be done in order to improve libpcap performance under VM products? Here are some statistics that I've collected on a ubuntu guest OS running in VMWorkstation under WinXP host. The test is to run pcap_loop(10000...) 10 times for a total of 100,000 packets. We time and count both packets and bytes transferred and report these statistics in between pcap_loop calls. Opening eth2 interface (guest OS on WinXP host): #000000: recv=10027, drop=17, ifDrop=0 pps=63.90 bps=214.65Kb #010000: recv=20042, drop=31, ifDrop=0 pps=473.13 bps=3147.04Kb #020000: recv=30045, drop=31, ifDrop=0 pps=1070.32 bps=7515.12Kb #030000: recv=40061, drop=49, ifDrop=0 pps=1100.96 bps=7925.73Kb #040000: recv=50068, drop=57, ifDrop=0 pps=1053.07 bps=7486.51Kb #050000: recv=60075, drop=63, ifDrop=0 pps=1116.57 bps=7967.32Kb #060000: recv=70091, drop=78, ifDrop=0 pps=1155.00 bps=8057.36Kb #070000: recv=80094, drop=80, ifDrop=0 pps=1234.72 bps=8688.54Kb #080000: recv=90097, drop=85, ifDrop=0 pps=1230.92 bps=8621.55Kb #090000: recv=100106, drop=94, ifDrop=0 pps=1237.01 bps=8697.74Kb While the same operating system as host Opening eth2 interface (Ubuntu host OS no Vmware): #000000: recv=10000, drop=0, ifDrop=0 pps=1734.00 bps=20333.88Kb #010000: recv=20002, drop=0, ifDrop=0 pps=1750.09 bps=20518.50Kb #020000: recv=30004, drop=0, ifDrop=0 pps=1734.91 bps=20340.75Kb #030000: recv=40004, drop=0, ifDrop=0 pps=1696.93 bps=19892.15Kb #040000: recv=50002, drop=0, ifDrop=0 pps=1732.20 bps=20302.28Kb #050000: recv=60004, drop=0, ifDrop=0 pps=1702.13 bps=19953.75Kb #060000: recv=70003, drop=0, ifDrop=0 pps=1729.80 bps=20275.08Kb #070000: recv=80001, drop=0, ifDrop=0 pps=929.02 bps=10889.94Kb #080000: recv=90001, drop=0, ifDrop=0 pps=1715.56 bps=20111.15Kb #090000: recv=100004, drop=0, ifDrop=0 pps=1737.92 bps=20373.84Kb The disproportionate bit rates are due to the fact that 1st test was a torrent download over a slower internet connection, while the second was a host to host copy on local LAN. None the less you can see that under VMWorkstation, libpcap begins to drop packets after just a few Kilo-bits/sec data rate, while under native host OS even at 20Mbps, the there were no drops. It's a lot worse when a pcap filter is applied. Tests were done under VMWorkstation version is 6.5 and, VMServer 4. Libpcap 0.8 (ubuntu, but also under deb5, FC11 and others). Project: http://jnetpcap.com - a libpcap java wrapper. I have taken java out of the picture for these tests, by using empty native callback handler for pcap_loop and pcap_dispatch calls. Cheers, mark.... "It is impossible to grasp the meaning of the idea of sound money if one does not realize that it was devised as an instrument for the protection of civil liberties against despotic inroads on the part of governments. Ideologically it belongs in the same class with political constitutions and bills of rights." Ludwig von Mises - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Libpcap performance under VMWare guest OSes Mark Bednarczyk (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Rick Jones (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Mark Bednarczyk (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Rick Jones (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Guy Harris (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Mark Bednarczyk (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Guy Harris (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Mark Bednarczyk (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Mark Bednarczyk (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Rick Jones (Dec 10)
- Re: Libpcap performance under VMWare guest OSes Mark Bednarczyk (Dec 10)