[Vm-dev] Re: [Pharo-dev] Reducing the activity of the image

Eliot Miranda eliot.miranda at gmail.com
Tue Feb 10 00:53:10 UTC 2015


Hi Tim,

On Mon, Feb 9, 2015 at 12:39 PM, tim Rowledge <tim at rowledge.org> wrote:

>
>
> On 09-02-2015, at 12:33 PM, phil at highoctane.be wrote:
>
> > Can't the box be setup 5o do some WoL thing and go back to sleep when
> idling for a while?
> >
> > This CPU usage is really annoying indeed.
>
> Assuming you are using a stack or Cog vm, that will mostly be the
> heartbeat that checks for inputs and process switches and GC limits etc.
> Plus any remaining morphic loop etc.
>

No.  The heartbeat is extremely cheap.  It is the idle loop that calls
ioRelinquishProcessorForMicroseconds which in turn calls aioSleepForUsecs
which calls select:

(Delay forSeconds: 60) wait

gc prior.  clear prior.
60.002 seconds; sampling frequency 1385 hz
7 samples in the VM (83120 samples in the entire program)    0.01% of total

3 samples in generated vm code 42.86% of entire vm (  0.00% of total)
4 samples in vanilla vm code 57.14% of entire vm (  0.00% of total)

% of generated vm code (% of total) (samples) (cumulative)
100.0%    (  0.00%) ...others... (3) (100.0%)


% of vanilla vm code (% of total) (samples) (cumulative)
100.0%    (  0.00%) ...others... (4) (100.0%)


83113 samples in the rest  99.99% of total

% of rest (% of total) (samples) (cumulative)
99.98%    (99.97%) select$DARWIN_EXTSN (83095) (99.98%)
  0.01%    (  0.01%) mach_msg_trap (10) (99.99%)
  0.01%    (  0.01%) ...others... (8) (100.0%)

Now using epoll would make the select cheaper and I have changes for that.
But the real solution is to combine this with an event-driven VM.

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


More information about the Vm-dev mailing list