[Vm-dev] Keeping Pharo CPU usage low: how?

Eliot Miranda eliot.miranda at gmail.com
Tue May 28 17:29:12 UTC 2013


On Mon, May 27, 2013 at 12:19 AM, phil at highoctane.be <phil at highoctane.be>wrote:

>
> I am currently experimenting with Pharo on Amazon EC2.
>
> I'd like to keep the CPU usage low for when Pharo hasn't anything special
> to do.
>
> At the moment, I see that Pharo uses 2-3% of the CPU when just blinking
> the caret.
>
> Is there a way to get that lower? Even if it means tweaking the VM.
>

IMO it means tweaking the VM so that when there are no runnable processes
the VM enters a blocking wait state from which it will wake if any of the
following occur
- the current delay expires
- a file becomes readable
- a UI event is delivered
- a signal is delivered

And if the VM were multi-threaded (e.g. in the way the Python VM is
multi-threaded) an additional wake-up is
- a callback from some thread other than the current VM thread occurs

This is e.g. the way the VisualWorks VM works.

Right now the VM aborts if there are no runnable processes and hence the
system requires a background process that loops and simply
calls relinquishProcessorForMicroseconds:


>
> The OS is Ubuntu 12 LTS
>
> Thanks!
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20130528/c8c55c69/attachment.htm


More information about the Vm-dev mailing list