writeImageFile() without snapshot()?

Avi Bryant avi.bryant at gmail.com
Fri Oct 7 23:34:04 UTC 2005


On Oct 7, 2005, at 4:09 PM, John M McIntosh wrote:

> Of course if you have a  spare GB or two, you could do the fullGC  
> ask for a block of memory, copy start of memory to end of memory  
> there, then write that out
> at your leisure, that forgoes the need for fork and the like.  
> Assumes of course you can ask and get 500MB at no cost.
> Surely the write happens quite quickly on modern high-speed disk i/ 
> o machines tho?
> Seems to me if you're wanting to minimize downtime you fork and do  
> a snapshot, that as noticed takes upwards of image size to do.
> Otherwise as you say full GC, fork for the write, but does that   
> save anything?

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...

Avi




More information about the Squeak-dev mailing list