Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to capture about 15 Mbit of traffic on the loopback device on Ubuntu LTS using tcpdump, and I am seeing dropped packets.

The CPU is a freaking i7, and i have yet to see CPU usage go above 15% during the measurements i am trying to run. Load is negligible...

The capture is written to a file using -w.

I have tried the following (as suggested here: ):

  • Set /proc/sys/net/core/netdev_max_backlog and /proc/sys/net/core/netdev_budget to arbitarily high values. No effect.
  • -nn No effect
  • Tried changing txqueuelen of lo. No effect.
  • Tried using gulp. No effect.
    • gulp instructed me to:
      • echo 4194304 > /proc/sys/net/core/rmem_max
      • echo 4194304 > /proc/sys/net/core/rmem_default
      • No effect....

Is there something special about the loopback device in regard to lossless captures? How can I do a lossless capture on lo?

share|improve this question
Are you sure you can write fast enough? What's the iowait like? – Tom O'Connor Aug 12 '13 at 14:56
When you say that CPU usage is not "above 15%", is that for the entire system or a limit per-core? Depending on where you're looking, 15% could be a single core of a HT quad-core pegged. – chrylis Aug 12 '13 at 14:57
@TomO'Connor I looked using iostat -x 1, and it never went above 3%. – Tarnay Kálmán Aug 12 '13 at 15:19
@chrylis Entire system. Actually tcpdump is running niced to -20. (Everything else has priority of -10 or more.) – Tarnay Kálmán Aug 12 '13 at 15:45
@TomO'Connor ALso, I have tried gulp which is supposed to help with write speed issues. It keeps a 100 Mb ringbuffer in memory by default. – Tarnay Kálmán Aug 12 '13 at 15:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.