1

I have my vps on CentOS running some my own software wich uses very fast algorithm of sending specially constructed RAW TCP packets to numerous systems running my software. I have noticed too many packet drops in TX column while doing ifconfig. Also i know at 70% not all the packets going through external venet0 interface are really sent by higher-level system (like host os, their network driver or so). How to investigate where is the real problem? For the first: how explain simple TX packet drop when send() or sendto() returns success? Two: will incoming ICMP desination unreachable/no route increase TX's packet drops?

My problem ifconfig:

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
      inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
      UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
      RX packets:14512501 errors:0 dropped:0 overruns:0 frame:0
      TX packets:151202339 errors:0 dropped:10321888 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:1043659479 (995.3 MiB)  TX bytes:6306749886 (5.8 GiB)

Sorry if there is too many material in the web about this, but they are for newbies, i am programmer and need all the details to fix my system. Thank you

1 Answer 1

2

If you are a programmer, grep the kernel source for an incrementation of "tx_dropped". This is generally modified by network devices drivers and not by the generic networking code (unless you do funky stuff like GRE or IPIP, VLAN or things like that).

But with a virtual network card, i doubt you will get more info that way.

7
  • thank you, i know this approach, but i think someone can point me if they used RAW TCP packets.
    – Sergey
    Sep 27, 2011 at 10:37
  • drop counters like the tx and rx counters are incremented by the chips (PHY) on the nic. the driver doesn't increment because it's potentially costly in terms of CPU time. To get the drop count the driver will read the counter from the PHY. If you don't know what I mean by PHY see here (en.wikipedia.org/wiki/PHY_%28chip%29).
    – sashang
    Sep 27, 2011 at 10:39
  • @sashang thank this is useful, so the problem lies in link between network card and receiver, but in my model i am using vps for now. ok, i know about overruns, collisions all this is simple, but what is common for packet drops? link overrun or what?
    – Sergey
    Sep 27, 2011 at 10:49
  • @sashang: I'm pretty sure there is no PHY, that v standing for virtual or virtualized. I would guess dropped in this case means that a buffer filled up (e.g., sending faster than the hypervisor can handle)
    – derobert
    Sep 27, 2011 at 16:29
  • @derobert is there any programmic interface i can get info about dropped packets inside kernel? except for grepping ifconfig of course, something with C interface. so i can adjust delays when transmitting data.
    – Sergey
    Sep 27, 2011 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .