Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Nov 1997 23:12:01 -0800 (PST)
From:      "Jamil J. Weatherbee" <jamil@trojanhorse.ml.org>
To:        freebsd-hackers@freebsd.org
Subject:   20x increase in efficiency with Select() trigger optimization on AIOX driver
Message-ID:  <Pine.BSF.3.96.971115230254.629A-100000@trojanhorse.ml.org>
In-Reply-To: <Pine.BSF.3.96.971115213248.273B-100000@trojanhorse.ml.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Keep in mind that select returns as soon as a single entry is available in
> any channels fifo.  I am thinking about adding an ioctl() that would allow
> the user to specify a select() trigger point, say they could tell the
> driver to not do a selwakeup() unless the fifo is more than half full.  Of

I did some tests and found that increase fifo size to more than 64 entries
had no significant effect on efficiency, however trigger code on the 64
entry fifo setting a trigger at 48 entries for selwakeup had a significant
effect:


The new figures

Aggregrate Sample Frequency          Percent Cpu Time

<2000 hz			      Negligible (1%-10%)
3500 hz				      15%
4000 hz				      Saturated

It is very curious, I can run AD_MICRO_PERIOD down to 280 us with 15% cpu,
so even running the user process rtprio, I can still log in to the machine
and there is no noticeable effect in performance for other things. (i.e.
it is still interactive)

However set AD_MICRO_PERIOD down another 30us to 250us and the CPU is
saturated, clearly a hardware limitation. Even huge fifos (x4 - x8) have
no effect on this.
 
The old figures
> 
> Aggregate Sample Frequency           Percent Cpu Time
> 
> 32 hz					2%
> 62.5 hz					3%
> 125 hz					6.2%
> 250 hz					12.5%
> 500 hz					25%
> 1000 hz					45%
> 2000 hz					90%
> 16000 hz 				Saturated But No Overruns
> 
> The performance is linear (below saturation) and the sample freq to
> percent cpu has a 99.9% correlation.  The equation:
> 
> %Cpu = 0.9477 + 0.044606*(Sample Freq)
> 
> Gives a very good approximation of %Cpu
> 
> I wonder just how much faster a PPro or Pentium is then a NexGen machine
> (this is in purely integer performance since I am not doing any
> calculations in the user process).
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971115230254.629A-100000>