[Seaside] VM stability on UNIX

Lukas Renggli renggli at gmail.com
Mon Oct 24 15:54:55 UTC 2005

> > Another problem which I have no solution for is one my squeak process eats
> > about 90% of CPU time to time. If I wait enough (several hours) it may
> > go normal.

High CPU usage with complex Seaside applications (lots of components,
callbacks, backtracking) can be caused by many instances of WeakArray.
It is a known issue that after a certain amount of weak-dependents
Squeak burns a lot of CPU (and in extreme cases a lot equals to all)
on trying to clean them up.

To avoid the issue you can change the following method from:

SeasidePlattformSupport>>weakDictionaryOfSize: aNumber
	| dict |
	dict := WeakIdentityKeyDictionary new: aNumber.
	WeakArray addWeakDependent: dict.
	^ dict


SeasidePlattformSupport>>weakDictionaryOfSize: anInteger
	^ IdentityDictionary new: anInteger

The drawback of this fix is that sessions consume much more memory and
only release it after the session timeout. However the application and
the image always remains responsive and that is what I usually prefer
over a small memory food-print ;-)

Hope this helps,

Lukas Renggli

More information about the Seaside mailing list