Pharo 8: What is the VM doing when I am doing nothing?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo 8: What is the VM doing when I am doing nothing?

Peter Kenny

Hello. I have noticed a curiosity when I am running Pharo 8 on Windows 10. I am in the habit of leaving the Task Manager open when I am working, and it seems that Pharo 8 is using the CPU when I am doing nothing. When the image – which is exactly as first loaded, with only the welcome window visible – is loaded, CPU consumption is zero. I open a playground, get a list of recent files from the playground cache, open one of the files but do nothing with it; the CPU activity is constantly changing within the range 2.5% - 3.5%. After 5 mins of no Pharo activity by me, the CPU is still in the same range.

 

I reloaded an earlier image, which is Moose Suite 6.1 (Pharo 6) and opened a playground in the same way. After a few seconds, the CPU usage dropped to zero. This activity is a feature of the newest versions only.

 

It’s obviously not a major problem, but I would like to know, if just out of curiosity.

 

Thanks for any help.

 

Peter Kenny

 

My Pharo 8 details:

Build information: Pharo-8.0.0+build.1124.sha.0932da82f08175e906b0e2a8052120c823374e9f (32 Bit)

Installed from Pharo Launcher on 8 Apr 2020

VM details:

CoInterpreter * VMMaker-CompatibleUserName.1577968628 uuid: d729bf66-2ea7-5a6d-b1eb-fc005785636d Jan  3 2020

StackToRegisterMappingCogit * VMMaker-CompatibleUserName.1577968628 uuid: d729bf66-2ea7-5a6d-b1eb-fc005785636d Jan  3 2020

VM: 201911290039-dev-7 [hidden email]:dev/Pharo/git-repos/pharo-vm/repo Date: Thu Nov 28 21:39:57 2019 CommitHash: 9b6bd16d3 Plugins: 201911290039-dev-7 [hidden email]

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 8: What is the VM doing when I am doing nothing?

Tim Mackinnon
Hi Peter - I had understood that this always a problem as Morphic is always polling for events (so am surprised you found an image where it’s not happening). I believe that recent work has almost got to a point where this can be resolved - there were some recent status reports on this, and maybe it might get into pharo9?

I’m sure someone has a much better explanation for you - and an explanation of what’s involved to fix it (I guess you have to block the event loop somehow so it waits vs polls).

Tim

On Sat, 11 Apr 2020, at 12:27 PM, PBKResearch wrote:

Hello. I have noticed a curiosity when I am running Pharo 8 on Windows 10. I am in the habit of leaving the Task Manager open when I am working, and it seems that Pharo 8 is using the CPU when I am doing nothing. When the image – which is exactly as first loaded, with only the welcome window visible – is loaded, CPU consumption is zero. I open a playground, get a list of recent files from the playground cache, open one of the files but do nothing with it; the CPU activity is constantly changing within the range 2.5% - 3.5%. After 5 mins of no Pharo activity by me, the CPU is still in the same range.

 

I reloaded an earlier image, which is Moose Suite 6.1 (Pharo 6) and opened a playground in the same way. After a few seconds, the CPU usage dropped to zero. This activity is a feature of the newest versions only.

 

It’s obviously not a major problem, but I would like to know, if just out of curiosity.

 

Thanks for any help.

 

Peter Kenny

 

My Pharo 8 details:

Build information: Pharo-8.0.0+build.1124.sha.0932da82f08175e906b0e2a8052120c823374e9f (32 Bit)

Installed from Pharo Launcher on 8 Apr 2020

VM details:

CoInterpreter * VMMaker-CompatibleUserName.1577968628 uuid: d729bf66-2ea7-5a6d-b1eb-fc005785636d Jan  3 2020

StackToRegisterMappingCogit * VMMaker-CompatibleUserName.1577968628 uuid: d729bf66-2ea7-5a6d-b1eb-fc005785636d Jan  3 2020

VM: 201911290039-dev-7 [hidden email]:dev/Pharo/git-repos/pharo-vm/repo Date: Thu Nov 28 21:39:57 2019 CommitHash: 9b6bd16d3 Plugins: 201911290039-dev-7 [hidden email]

 

 


Reply | Threaded
Open this post in threaded view
|

Re: Pharo 8: What is the VM doing when I am doing nothing?

Peter Kenny

I think some of the mystery is due to my not exploring enough. As I said, I have two windows open when I am doing the test: the Pharo 8 welcome window and a playground which is opened on a cache file.  I have now found that what happens depends on which is on top. If the welcome window is on top, the CPU usage is zero; if the playground is on top, CPU usage is about 3%, and stays at that even though I provide no input. The implication is that, when a playground is the active window, it is constantly doing something, presumably polling to see if the user is providing input. This did not seem to happen with a similar test on Pharo 6; even though a playground was on top, the CPU usage dropped to zero when I became inactive.

 

As I said, it’s not a problem, just a puzzle – but I would still like to know why.

 

Peter Kenny

 

From: Pharo-users <[hidden email]> On Behalf Of Tim Mackinnon
Sent: 11 April 2020 12:42
To: Any question about pharo is welcome <[hidden email]>
Subject: Re: [Pharo-users] Pharo 8: What is the VM doing when I am doing nothing?

 

Hi Peter - I had understood that this always a problem as Morphic is always polling for events (so am surprised you found an image where it’s not happening). I believe that recent work has almost got to a point where this can be resolved - there were some recent status reports on this, and maybe it might get into pharo9?

 

I’m sure someone has a much better explanation for you - and an explanation of what’s involved to fix it (I guess you have to block the event loop somehow so it waits vs polls).

 

Tim

 

On Sat, 11 Apr 2020, at 12:27 PM, PBKResearch wrote:

Hello. I have noticed a curiosity when I am running Pharo 8 on Windows 10. I am in the habit of leaving the Task Manager open when I am working, and it seems that Pharo 8 is using the CPU when I am doing nothing. When the image – which is exactly as first loaded, with only the welcome window visible – is loaded, CPU consumption is zero. I open a playground, get a list of recent files from the playground cache, open one of the files but do nothing with it; the CPU activity is constantly changing within the range 2.5% - 3.5%. After 5 mins of no Pharo activity by me, the CPU is still in the same range.

 

I reloaded an earlier image, which is Moose Suite 6.1 (Pharo 6) and opened a playground in the same way. After a few seconds, the CPU usage dropped to zero. This activity is a feature of the newest versions only.

 

It’s obviously not a major problem, but I would like to know, if just out of curiosity.

 

Thanks for any help.

 

Peter Kenny

 

My Pharo 8 details:

Build information: Pharo-8.0.0+build.1124.sha.0932da82f08175e906b0e2a8052120c823374e9f (32 Bit)

Installed from Pharo Launcher on 8 Apr 2020

VM details:

CoInterpreter * VMMaker-CompatibleUserName.1577968628 uuid: d729bf66-2ea7-5a6d-b1eb-fc005785636d Jan  3 2020

StackToRegisterMappingCogit * VMMaker-CompatibleUserName.1577968628 uuid: d729bf66-2ea7-5a6d-b1eb-fc005785636d Jan  3 2020

VM: 201911290039-dev-7 [hidden email] Date: Thu Nov 28 21:39:57 2019 CommitHash: 9b6bd16d3 Plugins: 201911290039-dev-7 [hidden email]