From owner-freebsd-current Sun Oct 14 1:49:44 2001 Delivered-To: freebsd-current@freebsd.org Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.121.85]) by hub.freebsd.org (Postfix) with ESMTP id 0815037B406 for ; Sun, 14 Oct 2001 01:49:41 -0700 (PDT) Received: from mindspring.com (dialup-209.247.143.225.Dial1.SanJose1.Level3.net [209.247.143.225]) by gull.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id BAA14310; Sun, 14 Oct 2001 01:49:37 -0700 (PDT) Message-ID: <3BC951D4.E9638595@mindspring.com> Date: Sun, 14 Oct 2001 01:50:28 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mike Silbersack Cc: freebsd-current@freebsd.org Subject: Re: Some interrupt coalescing tests References: <20011014014546.L36700-100000@achilles.silby.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Silbersack wrote: > Hm, true, I guess the improvement is respectable. My thought is mostly > that I'm not sure how much it's extending the performance range of a > system; testing with more varied packet loads as suggested by Alfred would > help tell us the answer to this. I didn't respond to Alfred's post, and I probably should have; he had some very good comments, including varying the load. My main interest has been in increasing throughput as much as possible; as such, my packet load has been geared towards moving the most data possible. The tests we did were with just connections per second, 1k HTTP transfers, and 10k HTTP transfers. Unfortunately, I can't give you seperate numbers without the LRP, since we didn't bother after the connection rate went from ~7000/second to 23500/second with LRP, it wasn't worth it. > The extra polling of the bus in cases where there are no additional > packets to grab is what I was wondering about. I guess in comparison to > the quantity of packet data going by, it's not a real issue. It could be, if you were doing something that was network triggered, relatively low cost, but CPU intensive; on the whole, though, there's very little that isn't going to be network related, these days, and what there is, will end up not taking the overhead, unless you are also doing networking. Maybe it should be a tunable? But these days, everything is pretty much I/O bound, not CPU bound. The one thing I _would_ add -- though I'm waiting for it to be a problem before doing it -- is to limit the total number of packets processed per interrupt by keeping a running count. You would have to be _AMAZINGLY_ loaded to hit this, though; since it would mean absolutely continuous DMAs. I think it is self-limiting, should that happen, since once you are out of mbufs, you're out. The correct thing to do is probably to let it run out, but keep a seperate transmit reserve, so that you can process requests to completion. I don't know if anyone has tested what happens to apache in a denial of service attack consisting of a huge number of partial "GET" requests that are incomplete, and so leave state hanging around in the HTTP server... [ ... polling vs. interrupt load ... ] > Straight polling isn't necessarily the solution I was thinking of, but > rather some form of interrupt disabling at high rates. For example, if > the driver were to keep track of how many interrupts/second it was taking, > perhaps it could up the number of receive buffers from 64 to something > higher, then disable the card's interrupt and set a callback to run in a > short bit of time at which point interrupts would be reenabled and the > interrupt handler would be run. Ideally, this could reduce the number of > interrupts greatly, increasing efficiency under load. Paired with this > could be receive polling during transmit, something which does not seem to > be done at current, if I'm reading correctly. > > I'm not sure of the feasibility of the above, unfortunately - it would > seem highly dependant on how short of a timeout we can realistically get > along with how many mbufs we can spare for receive buffers. Yes. Floyd and Druschel recommend using high and low watermarks on the amount of data pending processing in user space. The most common approach is to use a fair share scheduling algorithm, which reserves a certain amount of CPU for user space processing, but this is somewhat wasteful, if there is no work, since it denies quantum to the interrupt processing, potentially wrongly. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message