On Fri, Mar 14, 2008 at 06:08:42PM +0100, stolendata.net wrote:

> Upon trying to locate an unexplained, massive performance reduction
> when switching host for a number of applications from obsd 4.1 to 4.2,
> I found that it seems gettimeofday() has taken a nosedive in
> performance as of openbsd 4.2.
> 
> A very blunt test confirmed it; however, I'm not sure wherein the
> process of gettimeofday() this happens. I can only imagine the
> performance issues this has lead to in environments that do frequent
> time-polling (heavily burdened webservers come to mind).
> 
> http://pastebin.com/m311250a6

This is likely the effect of the new timecounter code. iirc the old
code just reads a memory location while the new code actually reads a
timer and does some processing. The main reason for the switch to
timecounters is to reduce the differences between archs. Timecounters
are also much better to avoid clock problems on SMP systems, and they
can switch to different clock sourcdes depending on the hardware
available. 

        -Otto

Reply via email to