From nobody@FreeBSD.ORG  Fri Aug 11 18:46:39 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id CED7A37B511; Fri, 11 Aug 2000 18:46:39 -0700 (PDT)
Message-Id: <20000812014639.CED7A37B511@hub.freebsd.org>
Date: Fri, 11 Aug 2000 18:46:39 -0700 (PDT)
From: xyf@stocke.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: 3C509 driver performance problem
X-Send-Pr-Version: www-1.0

>Number:         20555
>Category:       misc
>Synopsis:       3C509 driver performance problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 11 18:50:01 PDT 2000
>Closed-Date:    Mon Aug 14 02:17:35 PDT 2000
>Last-Modified:  Mon Aug 14 02:17:51 PDT 2000
>Originator:     xuyifeng
>Release:        FreeBSD 4.0
>Organization:
stocke.com
>Environment:
>Description:
I just freshly installed Redhat Linux 6.2 and FreeBSD 4.0 on same
machine,  I run ApacheBench program ab on another
Linux machine to test the both OS, both OS have same Apache config options, using command:

    ab -c 10 -n 10000 http://192.168.1.27/index.html

they both give me good performance, the result is almost same, but ...
FreeBSD uses more CPU time than Linux, FreeBSD CPU idle is 40%,
Linux CPU idle is 60%, almost 20% CPU lost in FreeBSD!

I use "top" command and see FreeBSD cost 34% of CPU time in interrupt
handling, the system time is good, only 12%, my net card is old 3COM 3C509, my question is:

  is this the problem of 3C509 driver in FreeBSD  or  just is more serious FreeBSD design problem?


>How-To-Repeat:
from another machine run apache benchmark program to pull FreeBSD,

    ab -c 10 -n 10000 http://192.168.1.27/index.html


>Fix:
don't kown

>Release-Note:
>Audit-Trail:

From: Will Andrews <andrews@technologist.com>
To: xyf@stocke.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/20555: 3C509 driver performance problem
Date: Sat, 12 Aug 2000 01:11:11 -0400

 On Fri, Aug 11, 2000 at 06:46:39PM -0700, xyf@stocke.com wrote:
 > FreeBSD uses more CPU time than Linux, FreeBSD CPU idle is 40%,
 > Linux CPU idle is 60%, almost 20% CPU lost in FreeBSD!
 
 How do you know top(1) doesn't measure CPU idle time on Linux
 differently than it does on FreeBSD?  (I don't know whether they do or
 not, for the record, but I do know things like load averages are
 measured differently..)
 
 Plus, with no real way to "fix" this "problem", this PR is rather bogus.
 If it is determined that the 3c509 driver sucks in terms of performance,
 patches to increase its efficiency and such are quite acceptable.  :)
 
 Besides, no one in their right mind that worries about performance is
 going to use a 3c509...
 
 -- 
 Will Andrews <andrewsw@purdue.edu> <will@FreeBSD.org>
 GCS/E/S @d- s+:+ a--- C++ UB++++$ P+ L- E--- W+ N-- !o ?K w---
 O- M+ V- PS+ PE++ Y+ PGP+>+++ t++ 5 X+ R+ tv+ b++ DI+++ D+ 
 G++ e>++++ h! r- y?
 

From: Bruce Evans <bde@zeta.org.au>
To: xyf@stocke.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/20555: 3C509 driver performance problem
Date: Mon, 14 Aug 2000 04:19:48 +1000 (EST)

 On Fri, 11 Aug 2000 xyf@stocke.com wrote:
 
 >     ab -c 10 -n 10000 http://192.168.1.27/index.html
 > 
 > they both give me good performance, the result is almost same, but ...
 > FreeBSD uses more CPU time than Linux, FreeBSD CPU idle is 40%,
 > Linux CPU idle is 60%, almost 20% CPU lost in FreeBSD!
 > 
 > I use "top" command and see FreeBSD cost 34% of CPU time in interrupt
 > handling, the system time is good, only 12%, my net card is old 3COM 3C509, my question is:
 > 
 >   is this the problem of 3C509 driver in FreeBSD  or  just is more serious FreeBSD design problem?
 
 I dodn't see any problem here, except missing accounting for interrupt
 time in Linux.  I think Linux still counts interrupt time against
 whatever process (including the idle "process") happens to be running
 when the interrupt occurs.  FreeBSD's idle time of 40% is actually
 the idle time (modulo jitter in the measurement).  Linux's idle time
 of 60% may be mostly spent handling interrupts.  Similarly for system
 and user times.  System and user times under Linux are normally larger
 than under FreeBSD, because parts of them are actually interrupt times.
 
 Bruce
 
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Mon Aug 14 02:17:35 PDT 2000 
State-Changed-Why:  
Asked and answered. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20555 
>Unformatted:
