Home > networking > virtio /proc/net/dev

virtio /proc/net/dev

September 17Hits:2

we are doing some VM (citrix-xen) / real machine benchmarks at university and ran accross a strange behavior. we used netperf's stream test to meassure the performance between the two machines. both resulted in the same value of 940 mbit, but the output of /proc/net/dev was different:

117 MB/sec vs. 112 MB/sec. 

I tried to reproduce this situation with VirtualBox at home. I meassured the displayed traffic with nload on the VM and on the VM's host.

When using emulated 1000mbit device:

vm says: 107 MB/sec vm host says: 107 MB/sec 

both values match. so far so good. but when using virtio-net device:

vm says: 102 MB/sec vm host says: 107 MB/sec 

the values do not match. so the culprit seems to be the paravirtualized network device. does anybody know about this problem? i guess, normally the "bytes" listed from /proc/dev/net are for ethernet frames and when using paravirtualized devices, it lists only the packet's bytes (without headers) as the VM-host does the whole packet handling?

thx for any suggestions :)


i just used wireshark for some tests. Wireshark says: 1514 bytes on wire, and one packet contains 1448 bytes of data. To get from 1448 one needs to multiply by 1,0456 (circa). when multiplying 102 MB from above, we get 106,7 MB => ~107 MB

=> Seems to be proven that paravirtualized network skips header-bytes in /proc/net/dev


i am not asking if paravirtualized network is faster than emulated one. I already know that this is a given. As one can see from my mentioned values, the traffic was in both cases 107 MB/sec (with different CPU usage of course).

But /proc/net/dev lists different values within the VM. Within the host, both values are the same! So i am asking if /proc/net/dev/ lists different values (e.g. without packet headers) when using paravirtualized network drivers.


Yes. The virtual network device can send data faster than the advertised speed by the NIC.

You can also benchmark this over the local host to see this.

Some great references on benchmarking and troubleshooting virtual networks:



Related Articles

  • virtio /proc/net/devSeptember 17

    we are doing some VM (citrix-xen) / real machine benchmarks at university and ran accross a strange behavior. we used netperf's stream test to meassure the performance between the two machines. both resulted in the same value of 940 mbit, but the out

  • /proc/net/dev and /sys/class/net/ bogus network interface namesApril 12

    I am constructing a list of network interfaces to monitor based on the contents of /proc/net/dev. But I am getting some bogus interfaces in the list: __tmp1104705027 __tmp974528607 Where do those come from? They also show up in /sys/class/net/: # ls

  • "cat /proc/net/dev" and "ip -s link" show different statistics. Which one is lying?November 14

    I notice that /proc/net/dev says eth3 has 1753 drops. ip -s link shows 0 dropped. Why is there a difference? Where is the different data coming from? Which one is correct? I've stripped the out extra data. # uname -a Linux example09 2.6.32-5-amd64 #1

  • "/proc/net/dev" contains all zeroes

    "/proc/net/dev" contains all zeroesNovember 17

    On my Ubuntu 13.10 desktop, the /proc/net/dev file contains only zeroes for all interfaces other than lo, despite having a working connection. This seems to lead most bandwidth monitoring tools to believe that there is no network traffic at all, incl

  • Accounting for /proc/net/dev reported traffic

    Accounting for /proc/net/dev reported trafficFebruary 12

    I noticed that according to /proc/net/dev I am constantly receiving around 6Kb/s on my wireless usb interface. But I can't account for anything even close to that with the individual connections that I get with iptraf, iftop, and nethogs. Investigati

  • /proc/net/dev on ubuntu 12.04 x86March 18

    How can i prevent reset byte count in /proc/net/dev when there is higher than 4gb of transfert? The 'bytes' counter in /proc/net/dev wraps after bytes > 2^32. I understand that there are other methods to check network activity (like iptables), but I

  • deleting a 'file' under /proc or /devJune 3

    I am using a cowdancer/debootstrap setup to generate a chroot. Of course, as I iterate, I generate some chroot configurations that are bad. I have found myself in an awkward situation where I have a slew of files under /proc that are refusing to be d

  • how is the file /proc/net/dev filled?June 18

    So, I'm writing a kernel module that needs stats about local network interfaces and I came up with the following code ... everything works fine except for the part where I try to read wireless device stats ... apparently the wireless_handler struct i

  • mount dev, proc, sys in a chroot environment?July 18

    I'm trying to create a Linux image with custom picked packages. What I'm trying to do is to hand craft the packages I'm going to use on an XO laptop, because compiling packages takes really long time on the real XO hardware, if I can build all the pa

  • LVM snapshot missing /dev and /proc treeOctober 27

    I created a lvm snapshot like so: lvcreate -L 5G -s -n root-snapshot /dev/VolGroup00/LogVol00 Then I mounted the snapshot like so: mount /dev/VolGroup00/root-snapshot /mnt/root-snapshot/ Now, when I see what's in the dev tree in the snapshot, almost

  • Chroot Risks w/ /dev and /procOctober 5

    I am planning to set up a few chroot jails for some users to run/test Java applications (lets just assume each application is untrusted). Is there any risk involved with mounting /dev and /proc into each jail? If there is, what steps can be taken to

  • What is the relationship (similarity and differences) between /proc/devices and /dev entries in Linux?July 17

    When we register a driver, the "name" parameter shows up in /proc/devices, yet we can write to the devices using the entry in /dev corresponding to the device. What are the core ideas behind /proc and /dev entries? Moving further, is sysfs suppo

  • What is /proc/ pid /net/dev?August 19

    I'm interested in per-process network I/O counters, like those in /proc/net/dev and found what I thought was it under /proc/<pid>, i.e. /proc/<pid>/net/dev. But it seems that was too easy because they contain the same counters as the system. I

  • Making Bootable USB, problems copying /procJanuary 16

    I'm creating a bootable usb as a cloned partition and am running into problems copying /proc to the usb. I know /proc contains a lot of virtual files, but I'm not sure how to copy them over. It seems that if I use cp it doesn't treat them as virtual

  • Allow snmpd to read /proc/net/* when running a grsecurity kernel and the grsec_proc groupFebruary 8

    I have rented a VPS from OVH (the Kimsufi 2G), and I'm having troubles getting snmpd to work correctly. The box is a Debian Squeeze running an OVH custom kernel: [email protected]:~# uname -a Linux vps #2 SMP Thu Aug 25 16:40:2

  • Is there a device file in the /dev directory that represents the wireless adapter?March 11

    I've been exploring the /dev directory and am curious are all the devices mapped to those files there? Specifically I'm looking for a wireless file. I was hoping to find something like /dev/wifi or /dev/wlan0 Wirless is working but i can't seem to fi

  • Linux device names: What other non-standard storage device names are there apart from /dev/ccissAugust 6

    This is a question about Linux storage device names on RHEL5 and RHEL6 Most storage devices are accessible using device names /dev/sda, /dev/sdb, etc. By storage device I mean a device that could be partitioned, formatted and mounted as regular files

  • Which of proc, sys etc. should be bind-mounted (or not) when chrooting into a "replacement" distribution?November 1

    This answer to another question basically boils down to chrooting into another Linux distribution in order to mainly use that as a replacement to its too restricted (but irreplaceable) parent. The suggested actions before running chroot, which I woul

  • /dev/disk/ lists disks, why /dev/net/ doesn't list network interfaces? December 16

    This question already has an answer here: Why are network interfaces not in /dev like other devices? 4 answers I know that udev manages devices in /dev and I expected to find information about available network cards (hardware) or at least network in

  • How to get total disk read/write in bytes per hdd device from /procFebruary 1

    How to get total disk read/write in bytes per hdd device? for example if i have sda, sdb, and sdc, is there any file on /proc that i could use similar to /proc/net/dev for networking? --------------Solutions------------- You can use this command to s

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 1.270 s.