linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: how to get per-socket stats on udp rx buffer overflow?
  2002-05-24 20:59 how to get per-socket stats on udp rx buffer overflow? Chris Friesen
@ 2002-05-24 20:54 ` David S. Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2002-05-24 20:54 UTC (permalink / raw)
  To: cfriesen; +Cc: linux-kernel

   From: Chris Friesen <cfriesen@nortelnetworks.com>
   Date: Fri, 24 May 2002 16:59:38 -0400

   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.

Available as global SNMP mib statistic, not available per-socket.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* how to get per-socket stats on udp rx buffer overflow?
@ 2002-05-24 20:59 Chris Friesen
  2002-05-24 20:54 ` David S. Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Friesen @ 2002-05-24 20:59 UTC (permalink / raw)
  To: linux-kernel


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
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how to get per-socket stats on udp rx buffer overflow?
  2002-05-29 15:30     ` Ben Greear
@ 2002-05-29 18:59       ` Nivedita Singhvi
  0 siblings, 0 replies; 7+ messages in thread
From: Nivedita Singhvi @ 2002-05-29 18:59 UTC (permalink / raw)
  To: Ben Greear; +Cc: Nivedita Singhvi, cfriesen, linux-kernel

On Wed, 29 May 2002, Ben Greear wrote:

> 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!

> 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. 

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

Cool :).

> Ben
> 

thanks,
Nivedita


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how to get per-socket stats on udp rx buffer overflow?
  2002-05-29 13:58   ` Nivedita Singhvi
@ 2002-05-29 15:30     ` Ben Greear
  2002-05-29 18:59       ` Nivedita Singhvi
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Greear @ 2002-05-29 15:30 UTC (permalink / raw)
  To: Nivedita Singhvi; +Cc: cfriesen, linux-kernel



Nivedita Singhvi wrote:

> On Tue, 28 May 2002, Ben Greear wrote:

>>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

-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how to get per-socket stats on udp rx buffer overflow?
  2002-05-28 20:52 ` Ben Greear
@ 2002-05-29 13:58   ` Nivedita Singhvi
  2002-05-29 15:30     ` Ben Greear
  0 siblings, 1 reply; 7+ messages in thread
From: Nivedita Singhvi @ 2002-05-29 13:58 UTC (permalink / raw)
  To: Ben Greear; +Cc: cfriesen, linux-kernel

On Tue, 28 May 2002, Ben Greear wrote:

> Nivedita Singhvi wrote:
> 
> >>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).


> 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 :).


> > 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..

> Ben
> 

thanks,
Nivedita


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how to get per-socket stats on udp rx buffer overflow?
  2002-05-25  2:59 Nivedita Singhvi
@ 2002-05-28 20:52 ` Ben Greear
  2002-05-29 13:58   ` Nivedita Singhvi
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Greear @ 2002-05-28 20:52 UTC (permalink / raw)
  To: Nivedita Singhvi; +Cc: cfriesen, linux-kernel



Nivedita Singhvi wrote:

>>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...

 
> 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
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 


-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how to get per-socket stats on udp rx buffer overflow?
@ 2002-05-25  2:59 Nivedita Singhvi
  2002-05-28 20:52 ` Ben Greear
  0 siblings, 1 reply; 7+ messages in thread
From: Nivedita Singhvi @ 2002-05-25  2:59 UTC (permalink / raw)
  To: cfriesen; +Cc: linux-kernel

> 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..

> Chris

thanks,
Nivedita


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-05-29 18:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-24 20:59 how to get per-socket stats on udp rx buffer overflow? Chris Friesen
2002-05-24 20:54 ` David S. Miller
2002-05-25  2:59 Nivedita Singhvi
2002-05-28 20:52 ` Ben Greear
2002-05-29 13:58   ` Nivedita Singhvi
2002-05-29 15:30     ` Ben Greear
2002-05-29 18:59       ` Nivedita Singhvi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).