All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Olsson <Robert.Olsson@data.slu.se>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Robert Olsson <Robert.Olsson@data.slu.se>,
	Mårten_Wikström <Marten.Wikstrom@framfab.se>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	<netdev@oss.sgi.com>
Subject: Re: How to optimize routing performance
Date: Thu, 15 Mar 2001 19:45:53 +0100 (CET)	[thread overview]
Message-ID: <15025.3553.176799.382488@robur.slu.se> (raw)
In-Reply-To: <Pine.LNX.4.33.0103152137240.1320-100000@duckman.distro.conectiva>
In-Reply-To: <15024.53099.41814.716733@robur.slu.se> <Pine.LNX.4.33.0103152137240.1320-100000@duckman.distro.conectiva>


[Sorry for the length]

Rik van Riel writes:
 > On Thu, 15 Mar 2001, Robert Olsson wrote:
 > 
 > >  CONFIG_NET_HW_FLOWCONTROL enables kernel code for it. But device
 > >  drivers has to have support for it. But unfortunely very few drivers
 > >  has support for it.
 > 
 > Isn't it possible to put something like this in the layer just
 > above the driver ?

 There is a dropping point in netif_rx. The problem is that knowledge
 of congestion has to be pushed back to the devices that is causing this.

 Alexey added netdev_dropping for drivers to check. And via netdev_wakeup()
 the drivers xon_metod can be called when the backlog below a certain 
 threshold. 

 So from here the driver has do the work. Not investing any resources and
 interrupts in packets we still have to drop. This what happens at very
 high load a kind of livelock. For routers routing protocols will time
 out and we loose conetivity. But I would say its important for all apps.
 
 In 2.4.0-test10 Jamal added sampling of the backlog queue so device
 drivers get the current congestion level. This opens new possiblities.
 

 > It probably won't work as well as putting it directly in the
 > driver, but it'll at least keep Linux from collapsing under
 > really heavy loads ...

 
 And we have done experiments with controlling interrupts and running
 the RX at "lower" priority. The idea is take RX-interrupt and immediately
 postponing the RX process to tasklet. The tasklet opens for new RX-ints.
 when its done.  This way dropping now occurs outside the box since and
 dropping becomes very undramatically.


 As little example of this. I monitored a DoS attack on Linux router
 equipped with this RX-tasklet driver.


Admin up    6 day(s) 13 hour(s) 37 min 54 sec 
Last input  NOW
Last output NOW
5min RX bit/s   22.4 M  
5min TX bit/s   1.3 M
5min RX pkts/s  44079    <====     
5min TX pkts/s  877          
5min TX errors  0            
5min RX errors  0            
5min RX dropped 49913    <====     
      
Fb: no 3127894088 low 154133938 mod 6 high 0 drp 0 <==== Congestion levels

Polling:  ON starts/pkts/tasklet_count 96545881/2768574948/1850259980
HW_flowcontrol xon's     0           



 A bit of explanation. Above is output from tulip driver. We are forwarding
 44079 and we are dropping  49913 packets per second!  This box has 
 full BGP. The DoS attack was going on for about 30 minutes BGP survived 
 and the box was manageable. Under a heavy attack it still performs well.


 Cheers.

						--ro


  reply	other threads:[~2001-03-15 18:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-15 14:19 How to optimize routing performance Robert Olsson
2001-03-16  0:38 ` Rik van Riel
2001-03-15 18:45   ` Robert Olsson [this message]
2001-03-15 19:30   ` Jonathan Morton
2001-03-15 19:54     ` Robert Olsson
2001-03-15 21:01       ` jamal
  -- strict thread matches above, loose matches on Subject: below --
2001-03-16  7:21 Mårten Wikström
2001-03-16  8:08 ` Martin Josefsson
     [not found] <3AB12640.79E7B4FB@colorfullife.com>
2001-03-15 21:39 ` Robert Olsson
2001-03-15 20:16 Jonathan Earle
2001-03-15  7:23 Mårten Wikström
2001-03-15 12:32 ` Rik van Riel
2001-03-15 16:20   ` Martin Josefsson
2001-03-15 18:09 ` J Sloan
2001-03-16  2:05   ` Rik van Riel
2001-03-15 19:17     ` J Sloan
2001-03-15 19:36       ` Gregory Maxwell
2001-03-15 19:45         ` J Sloan
2001-03-15 19:44       ` Mike Kravetz
2001-03-16  2:35       ` Rik van Riel
2001-03-15 19:28         ` J Sloan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15025.3553.176799.382488@robur.slu.se \
    --to=robert.olsson@data.slu.se \
    --cc=Marten.Wikstrom@framfab.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=riel@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.