Unix & pegging the CPU for idle Squeak, a question...
Lex Spoon
lex at cc.gatech.edu
Fri May 25 16:33:20 UTC 2001
woods at weird.com (Greg A. Woods) wrote:
> [ On Thursday, May 24, 2001 at 11:42:11 (-0700), John M McIntosh wrote: ]
> > Subject: Unix & pegging the CPU for idle Squeak, a question...
> >
> > Now maybe we just accept somewhat poorer performance under Carbon to
> > avoid pegging the CPU and allow all those other Unix tasks to run.
> > But thoughts on this are welcome
>
> Unix processes don't really have to play nice -- they're forced to do so
> by the system scheduler. Other processes will run and get their fair
> share of CPU time. On many systems something like squeak will be given
> less CPU time if it has a high CPU-to-IO ratio and if there are other
> processes which want more CPU and which have "better" CPU-to-IO ratios.
>
Squeak *does* play nice, though, since a little over three years ago:
>USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
>lex 3311 3.7 14.7 107544 37776 ? S May24 30:13 /home/lex/bin/squeak -memory 100m -xasync -x
Also, if you make the change I suggested in the idle loop, and if the
main morphic loop can detect and take advantage of using an EventSensor,
then you really can suspend Squeak until an OS-level event happens.
Although, I believe the 3.7% is mostly from updating all my system
windows, and so this trick wouldn't really help the CPU usage. It would
be kinda pretty, though, for whatever that's worth. :)
Lex
More information about the Squeak-dev
mailing list
|