Date: Wed, 17 Dec 1997 11:43:07 +1030 From: Mike Smith <mike@smith.net.au> To: Greg Lehey <grog@lemis.com> Cc: Mike Smith <mike@smith.net.au>, John Kelly <jak@cetlink.net>, FreeBSD Hackers <hackers@FreeBSD.ORG> Subject: Re: 3com 3c509 card Message-ID: <199712170113.LAA00848@word.smith.net.au> In-Reply-To: Your message of "Wed, 17 Dec 1997 11:38:01 %2B1030." <19971217113801.53802@lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> >> I tested with an FTP transfer and consumed about 45% CPU in both > >> cases. > >> > >> I wonder if I'm doing something wrong. > > > > Well, for starters you aren't disclosing your measurement technique. > > It sounds to me as though it's not measuring the relative CPU consumed > > per bytes/datagrams transferred by the driver though. > > > > All you have established is that a known ~50% improvement in the CPU > > utilisation of the driver has not affected the amount of CPU used for > > your FTP transfer. This should tell you something about how efficient > > the driver is in the first place, especially compared with the other > > operations involved in the transfer. > > > > First thing anyone should learn; how to measure things. Whether you're > > talking engineering, physics, chemistry or computing; if you don't know > > what you're measuring, the numbers mean nothing. > > It's easy to say that sort of thing. Now how about explaining what he > should be looking for? CPU time spent in the driver; I'd have thought that was pretty obvious from the above. Call microtime() on entry to driver functions, call it again on exit, and add the difference to a counter. Extract the value of the counter and relate it to the number of bytes transferred on the interface. Be careful not to double-count time. Be sensitive to per-datagram as opposed to per-byte overheads. An earlier poster described a substantial performance improvement between 2.1 and 2.2 on a slow system; I believe this had to to with changes in the mbuf management code (clustering?). mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712170113.LAA00848>