From owner-freebsd-arch Thu Jan 17 12:30: 6 2002 Delivered-To: freebsd-arch@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id 6251E37B404 for ; Thu, 17 Jan 2002 12:29:57 -0800 (PST) Received: from pool0559.cvx40-bradley.dialup.earthlink.net ([216.244.44.49] helo=mindspring.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16RJAP-0000gm-00; Thu, 17 Jan 2002 12:29:45 -0800 Message-ID: <3C473436.BBBABF6B@mindspring.com> Date: Thu, 17 Jan 2002 12:29:42 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Michal Mertl Cc: arch@freebsd.org Subject: Re: 64 bit counters again References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Michal Mertl wrote: > I wan't to inform you that I tried to look at some system pushing data > with different size/implementation network counters. I did my last test on > dual PIII 750. I don't know, of any good way to measure the load, so I > just run vmstat -w1 (and calculated average idle) while pushing the data > and also looked at the throughput at 100Mbit Full-Duplex. System was > performing about 10000 interrupts and 15000 packets per second. I didn't > notice any difference between using 32 bits non atomic operations (3 > clocks per op) or 64 bit atomic (lock;cmpxchg8b - 50 clocks). I did also > measure it on single Duron 800 with the same result. 1) Use a gigabit interface, not an FXP. 2) Use 1K payload data. 3) Tune your system so that it can push data at wire speed on the gigabit; this isn't hard, but it is a test of whether you can recognize overhead when you see it. 4) Measure CPU overhead as well as I/O overhead. 5) Measure total number of mbufs and clusters in use, 6) Use an SMP system, make sure that you have a sender on both CPUs, and measure TLB shootdown and page mapping turnover to ensure you get that overhead in there, too (plus the lock overhead). 7) Make sure you are sending data already in the kernel, so you aren't including copy overhead in the CPU cost, since practically no one implements servers with copy overhead these days. If you push data at 100Mbit, and not even at full throttle at that, you can't reasonably expect to see a slowdown when you have other bottlenecks between you and the changes. In particular, you're not going to see things like the pool size go up because of increased pool retention time, etc., due to the overhead of doing the calculations. Also, realize that even though simply pushing data doesn't use up a lot of CPU on FreeBSD if you do it right, even 2% or 4% increase in CPU overhead overall is enough to cause problems for already CPU-bound applications (i.e. that's ~40 less SSL connections per server). -- Personally, I don't consider 3 and a half million clocks to be peanuts, and if you ran at wire speed on the 100Mbit, I would expect that to become 35 million clocks on a gigabit. But we can wait for your effects on the mbuf count high watermark and CPU utilization values before jumping to any conclusions... -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message