Settings - Server Mode - should I use it?

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

Settings - Server Mode - should I use it?

Tim Mackinnon
Hi - I hadn’t looked in the settings browser much before, but I was looking at what settings there were and noticed “server mode”.

Should I be enabling this when building a headless server image to run on Lambda? I saw a 2016 post by John Brant that indicated it made a difference when doing some benchmarking in the image (presumably headful) - but I’m wondering if when running headless on a server whether it really makes a difference.

Has anyone played with this much before?

Tim
Reply | Threaded
Open this post in threaded view
|

Re: Settings - Server Mode - should I use it?

Ben Coman
hi Tim,

This is Pharo! You can dig in to understand it yourself. ;)   
1. On the setting, right-click and "Browse".
2. Scroll down to... label: 'Server mode'
then on #serverMode, right-click > Code Search > Implementors of it
3. Looking at WorldState>>serverMode, click "Senders"
and you'll come to WorldState>>interCyclePause:
Look for senders of this and inspect MinCycleLapse.

Basically that setting makes the UI loop delay for a longer time ==> less CPU 
but I don't know whether that loop still runs in headless mode.
I guess if you are bootstrapping your Lambda image, you can choose.

But since your Lambda is meant to finish quite quickly, alternatively maybe during image shutdown you could set a flag such that next startup #interCyclePause: blocks for 500ms and if the image exits cleanly and quickly, #doOneCycleNowFor: is never executed at all.

cheers -ben

On Wed, Aug 2, 2017 at 10:39 PM, Tim Mackinnon <[hidden email]> wrote:
Hi - I hadn’t looked in the settings browser much before, but I was looking at what settings there were and noticed “server mode”.

Should I be enabling this when building a headless server image to run on Lambda? I saw a 2016 post by John Brant that indicated it made a difference when doing some benchmarking in the image (presumably headful) - but I’m wondering if when running headless on a server whether it really makes a difference.

Has anyone played with this much before?

Tim

Reply | Threaded
Open this post in threaded view
|

Re: Settings - Server Mode - should I use it?

Tim Mackinnon
Hey Ben - thanks for sharing this with me - you know, I never knew you could right click on the settings and browse… I’ve always (only partially successfully) used halo’s on ui items and tried to dig in that way… 

It turns out that in the minimal images that Pavel has been churning out - WorldState is not there (which makes sense, as you would expect all of the UI pieces to be stripped out).

Tim

On 2 Aug 2017, at 18:09, Ben Coman <[hidden email]> wrote:

hi Tim,

This is Pharo! You can dig in to understand it yourself. ;)   
1. On the setting, right-click and "Browse".
2. Scroll down to... label: 'Server mode'
then on #serverMode, right-click > Code Search > Implementors of it
3. Looking at WorldState>>serverMode, click "Senders"
and you'll come to WorldState>>interCyclePause:
Look for senders of this and inspect MinCycleLapse.

Basically that setting makes the UI loop delay for a longer time ==> less CPU 
but I don't know whether that loop still runs in headless mode.
I guess if you are bootstrapping your Lambda image, you can choose.

But since your Lambda is meant to finish quite quickly, alternatively maybe during image shutdown you could set a flag such that next startup #interCyclePause: blocks for 500ms and if the image exits cleanly and quickly, #doOneCycleNowFor: is never executed at all.

cheers -ben

On Wed, Aug 2, 2017 at 10:39 PM, Tim Mackinnon <[hidden email]> wrote:
Hi - I hadn’t looked in the settings browser much before, but I was looking at what settings there were and noticed “server mode”.

Should I be enabling this when building a headless server image to run on Lambda? I saw a 2016 post by John Brant that indicated it made a difference when doing some benchmarking in the image (presumably headful) - but I’m wondering if when running headless on a server whether it really makes a difference.

Has anyone played with this much before?

Tim