[Seaside] MinimalMorphic based web images

Adrian Lienhard adi at netstyle.ch
Fri Oct 19 22:32:31 UTC 2007

On Oct 19, 2007, at 18:35 , Jimmie Houchin wrote:

> Adrian Lienhard wrote:
>> On Oct 17, 2007, at 07:02 , Philippe Marschall wrote:
>>> 2007/10/15, Jimmie Houchin <j.squeak at cyberhaus.us>:
>>>> Philippe Marschall wrote:
>>>>> 2007/10/15, Jimmie Houchin <j.squeak at cyberhaus.us>:
> [snip]
>>>> Hello Philippe,
>>>> Thanks for the reply. Unfortunately, I wasn't very clear, my  
>>>> apologies.
>>>> The image seems to be doing some kind of polling which is using  
>>>> CPU even
>>>> when the image should seem to be using none as it is doing nothing.
>>> Could be anything. At lest the gc will have to do same work from  
>>> time
>>> to time. But it is also very likely the UI is not completely idle as
>>> well. That's my Seaside Hosting suspends the whole process to make
>>> everything is really idle and nothing happens.
>> Very likely it's the UI loop (GC activity depends on number of  
>> instantiated objects, not on time elapsed). You can suspend/resume  
>> the UI process, for example with the Seaside snapshot application,  
>> if you want to spare some cycles (which can be significant as soon  
>> as you have many images).
>> Oh, and make sure that the preference named betterPerformance is  
>> turned _off_.
> Hello Adrian,
> Thanks for the reply. From my playing around with suspending the UI  
> it does seem to be the UI loop causing the regular (once a second  
> or so) 2-5% spike in CPU. Suspending UI makes the Squeak process  
> flat until serving something.
> As I am hoping to get Squeak/Seaside hosting on my web host  
> provider, this is a very important issue.
> I am glad you made me aware of that setting. Is that the setting  
> where Squeak decides to be more aggressive on its CPU use? I am  
> sure a hosting provider would definitely want that turned off.

Actually, the preference is named #higherPerformance (not  
betterPerformance). The UI loops with a default delay of 20ms. If  
this preference is enabled, it loops with 1ms (which makes absolutely  
no sense on a server). By default it should be turned off (in the 3.9  
process it once was accidentally turned on, which caused me some  
headache until I found the cause for the sudden much higher CPU use).


PS: This is also related to a problem I recently had on a production  
application where sometimes Seaside suddenly stopped serving (see  
http://bugs.squeak.org/view.php?id=6581). While the problem was quite  
complex to debug, the fix I use is trivial: just increase the cycle  
pause to 50ms...

More information about the seaside mailing list