On Fri, Oct 07, 2005 at 04:34:04PM -0700, Avi Bryant wrote:
The scenario is that you have a server packed with large images that you want saving to disk periodically. So mostly what I'm trying to optimize is memory usage, but without unreasonable delay by the standards of web applications. The two options that take more or less constant memory seem to be a regular snapshot, or GC->fork-
snapshot. For a largish image (100-200MB), a GC takes maybe 2s
(acceptable, if annoying) whereas a snapshot takes maybe 15s (pretty much unacceptable). So the forking seems like the right choice. Though if we could get rid of the GC altogether that would be great...
Hi Avi,
With the configuration you are describing, it might help a little bit if you do the background image saves at lower OS scheduling priority. This should reduce the impact of the image save processes on responsiveness of the Seaside servers.
The attached change set does this. You'll need to dust off your VMMaker to use it.
From the preamble:
Adds #primitiveNice to OSPP to allow changing the scheduling priority of the current OS process (the Squeak VM process).
Updates #saveImageInBackground to perform the background image save at lower scheduling priority.
Apply this change set to OSProcess 4.0 and OSProcessPlugin 4.0 (i.e. the latest SqueakMap versions). XDisplayControlPlugin 2.0 and AioPlugin 2.0 should also be included in the VMMaker build (AioPlugin just so all the OSP unit tests will pass).
HTH,
Dave
p.s. Sorry about the .cs format. I'm using Monticello now (great stuff!) but I'm still learning how to use it properly, e.g. to make diffs. Next time I'll send an .mcz.