[squeak-dev] Re: Delay time question
Robert F. Scheer
rfscheer at speakeasy.net
Thu Feb 28 07:26:19 UTC 2008
On Thu, 2008-02-28 at 07:59 +0200, Igor Stasenko wrote:
> 2008/2/28 Andreas Raab <andreas.raab at gmx.de>:
> > 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.
> >
> Here the numbers for HydraVM.
> a SortedCollection(895->2 91->1 14->3)
How does this compare to standard VM on your OS?
What is your OS?
>
> It can't be so precise as old VM, because delay timeouts are signaled
> in separate thread as event, which is then
> consumed by Interpreter as soon as possible, but it takes a little
> more time (switching threads e.t.c).
> Things can be more precise on multicore system.
>
> I had a hard time fighting with delays lately.. what i can say.. this
> is one of the weakest and critical points in VM and language side.
>
> > Cheers,
> > - Andreas
> >
>
More information about the Squeak-dev
mailing list
|