Squeak SmalltalkJoker Squeak Smalltalk : Tools Tricks Usage : prevnext Lock UI f CPU Usage

> Hi,
>  
> When squeak (version Squeak3.6g-5420.image) is idle and simply
> sitting on the screen it's cpu usage drops to hover near 2%. Why? Is
> there any way to have squeak actually go to sleep? Is this possible
> even when squeak is listening on network ports? This is important
> when running multiple copies of squeak on a server. When running 50
> copies of squeak idle on a server they consume all the cpu cycles!
>  
> How can I configure (or how can we change) squeak to run as a good
> "daemon server" citizen?
The simplest and most effective way I've found is to execute "Project
uiProcess suspend".  Note that this will immediately lock up your UI.
If you want to save an image in that state, you'll need something like:
[Project uiProcess suspend.  Smalltalk snapshot: true andQuit: true]
fork
When you reopen that image, it should use much less CPU (but you can
only interact with it over the network, of course).
You could presumably have a network accessible way of starting the UI
process going again so that you could 'unlock' that image should you
need to later.