how to get per-socket stats on udp rx buffer overflow?

how to get per-socket stats on udp rx buffer overflow?

Post by Nivedita Singhv » Sun, 26 May 2002 12:10:05



Quote:> Is there any way for me to see how many incoming packets
> were dropped on a udp socket due to overflowing the input buffer?  
> I specifically want this information on a per-socket basis.

The /proc/net/snmp Udp counter InErrors includes the global
count. It would be expensive and usually unnecessary to keep
per-socket stats. Is there a real need for seeing the
per-socket count?

If it helps, you can check the current bytes in the recv queue
in netstat output - you wont know how many bytes have been dropped,
but at least you know the amnt in the queue waiting to be read..

Quote:> Chris

thanks,
Nivedita

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to get per-socket stats on udp rx buffer overflow?

Post by Ben Greea » Thu, 30 May 2002 06:00:19



>>Is there any way for me to see how many incoming packets
>>were dropped on a udp socket due to overflowing the input buffer?  
>>I specifically want this information on a per-socket basis.

> The /proc/net/snmp Udp counter InErrors includes the global
> count. It would be expensive and usually unnecessary to keep
> per-socket stats. Is there a real need for seeing the
> per-socket count?

It would not be that expensive..it's just an extra counter that
is bumped whenever a pkt is dropped.

I have need of similar information, but it's low priority
for me right now, so I probably won't be adding a patch anytime
soon...

Quote:> If it helps, you can check the current bytes in the recv queue
> in netstat output - you wont know how many bytes have been dropped,
> but at least you know the amnt in the queue waiting to be read..

That is nearly worthless unless you are really killing your machine
and constantly have your buffers full...

Ben

>>Chris

> thanks,
> Nivedita

> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

--

President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to get per-socket stats on udp rx buffer overflow?

Post by Nivedita Singhv » Thu, 30 May 2002 23:10:14




> >>Is there any way for me to see how many incoming packets
> >>were dropped on a udp socket due to overflowing the input buffer?  
> >>I specifically want this information on a per-socket basis.

> > The /proc/net/snmp Udp counter InErrors includes the global
> > count. It would be expensive and usually unnecessary to keep
> > per-socket stats. Is there a real need for seeing the
> > per-socket count?

> It would not be that expensive..it's just an extra counter that
> is bumped whenever a pkt is dropped.

True for one counter, but generally when considering per
socket stats as a feature, you include all the TCP/UDP/IP
stats, and if youre not holding locks, thats probably an
atomic increment.  Pretty soon we're talking actual
performance and scalability money. (Even if we're not
in the mindset of saving every cycle wherever possible).

Quote:> I have need of similar information, but it's low priority
> for me right now, so I probably won't be adding a patch anytime
> soon...

If the info was needed and useful however, then thats a
different matter :).

Quote:> > If it helps, you can check the current bytes in the recv queue
> > in netstat output - you wont know how many bytes have been dropped,
> > but at least you know the amnt in the queue waiting to be read..

> That is nearly worthless unless you are really killing your machine
> and constantly have your buffers full...

Yep, true, it was just a thought to help him identify
the connection that was droping packets because the queue
was full..

Quote:> Ben

thanks,
Nivedita

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to get per-socket stats on udp rx buffer overflow?

Post by Ben Greea » Fri, 31 May 2002 00:40:06




>>It would not be that expensive..it's just an extra counter that
>>is bumped whenever a pkt is dropped.

> True for one counter, but generally when considering per
> socket stats as a feature, you include all the TCP/UDP/I
> stats, and if youre not holding locks, thats probably an
> atomic increment.  Pretty soon we're talking actual
> performance and scalability money. (Even if we're not
> in the mindset of saving every cycle wherever possible).

Integer increments are usually pretty cheap.  Considering
accuracy is not absolutely needed (imho), then there is no
need to lock or use special atomic increments.

So, I view the performance issue as not that big of a deal.  Space
may be a bigger deal, and the /proc interface and/or IOCTLs to read
the counters...

If/when I do implement, I'll be sure to make it a selectable option
in the kernel config process...

Ben

--

President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to get per-socket stats on udp rx buffer overflow?

Post by Nivedita Singhv » Fri, 31 May 2002 04:10:05



> Integer increments are usually pretty cheap.  Considering
> accuracy is not absolutely needed (imho), then there is no
> need to lock or use special atomic increments.

Cool!

Quote:> So, I view the performance issue as not that big of a deal.  Space
> may be a bigger deal, and the /proc interface and/or IOCTLs to read
> the counters...

You could consider per-cpu interrupt/process context buckets
the way the current MIB counter increments are, if space isnt
an issue, although that might be overkill.

Quote:> If/when I do implement, I'll be sure to make it a selectable option
> in the kernel config process...

Cool :).

Quote:> Ben

thanks,
Nivedita

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. how to get per-socket stats on udp rx buffer overflow?

I posted this on netdev, but got no answer.

Is there any way for me to see how many incoming packets were dropped on a udp
socket due to overflowing the input buffer?  I specifically want this
information on a per-socket basis.

Thanks,

Chris
--
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. unsubscribe

3. Socket buffer overflow problem with UDP multicasting.

4. LUM/libc.a/Binary Compatibility

5. want to add per-socket stats, what is best way to extract data?

6. unix programming

7. rx buffer overflow attack?

8. Xfree86 3.1.2E expiry date

9. udp socket overflow

10. UDP socket overflow

11. UDP socket overflow on HPUX 10.10

12. udp-socket-overflow under Solaris 2.x

13. udp socket overflow