[squeak-dev] Re: Delay time question

Robert F. Scheer rfscheer at speakeasy.net
Mon Mar 3 01:01:55 UTC 2008


On Sun, 2008-03-02 at 17:48 +0000, Milan Zimmermann wrote:
> On 2008 February 28, Andreas Raab wrote:
> > Robert F. Scheer wrote:
> > > Is this behavior well-known and understood or is there something wrong
> > > with my install?
> >
> > This is a very well known issue. Different operating systems have very
> > different minimal timer resolutions. Generally speaking, on Windows and
> > Mac OS the timer resolution is very close to 1ms whereas most Linux
> > kernels have *awful* timer resolutions. I have been told that you can
> > recompile your kernel to fix it but I'm not sure how. The classic
> > benchmark to verify your timer accuracy is to do something like here:
> >
> > 	delay := Delay forMilliseconds: 1.
> > 	bag := Bag new.
> > 	1000 timesRepeat:[bag add: [delay wait] timeToRun].
> > 	bag sortedCounts
> >
> > On my box it yields "a SortedCollection(941->1 51->2 8->3)" which means
> > that 94.1% of the delays are true 1msec delays.
> 
> as a comparison, following is squeak 3.9-8 on SuSE 10.3 (2.6.24 kernel):
> 
>  [1151]a SortedCollection(530->44 305->1 34->43 21->2 17->45 11->8 11->41 
> 10->48 10->3 9->42 7->5 6->52 6->4 5->40 2->10 2->11 2->12 2->47 1->7 1->53 
> 1->828 1->17 1->19 1->26 1->31 1->32 1->36 1->955)
> 

I found results like this during my testing on Ubuntu (2.6.22 kernel) on
one machine that had the "wrong" version of VM installed.  You may find
that either the VM rpm (deb in my case) from squeak.org or from your
SuSe repositories give better results. 

Also, after installing the linux-rt ("realtime") kernel from Ubuntu
repositories, the delay bag performance was horrible, as mentioned
earlier, but not in the same league of hurt as the results you've just
posted.

- Robert

> >
> > Cheers,
> >    - Andreas
> 
> 
> 




More information about the Squeak-dev mailing list