[squeak-dev] GC settings in Spur

Chris Muller ma.chris.m at gmail.com
Tue Nov 18 22:04:44 UTC 2014

Hi all, my understanding has been that Squeak's default GC settings
are optimized for animated UI's.  By doing a lot of frequent
incremental GC's ensures they will be small and therefore no noticable
pauses in the animated UI.

By contrast, the GC settings I stole from Seaside for Magma server's
are to reduce the frequency of incremental GC's and instead increase
its bias to grow, the expectation being that this will increase
overall server throughput because its spending a lower fraction of
time in the GC code.  Here are those settings:

        "Initialize the memory and GC settings to be more liberal with
memory in order to reduce garbage-collector impact on the processor."
     "The following settings affect the rate incremental GCs and tenuring"

     "Limit incremental GC activity to run every 100k allocations"
     self vmParameterAt: 5 put: 100000. "allocations between GCs
(default: 4000)"
     "Limit tenuring threshold to only tenure w/ > 35k survivors"
     self vmParameterAt: 6 put: 35000. "tenuring threshold (default: 2000)"

     "These settings affect overall memory usage"

     "Only give memory back to the OS when we have more than 16MB free"
     self vmParameterAt: 24 put: 16*1024*1024. "default 8MB"
     "Try to keep 8MB headroom at all times"
     self vmParameterAt: 25 put: 8*1024*1024. "default 4MB"

     "These settings describe what to do when we're close to running
out of free space"
     self isRunningSpur ifFalse:
          [ "Tell the VM that we'd rather grow than spinning in tight GC loops"
          self setGCBiasToGrow: 1. "default: false"
          "Tell the VM to do a fullGC for good measure if the above
growth exceeded 16MB"
          self setGCBiasToGrowGCLimit: 16*1024*1024. "default: 0"]

Moving to Spur is a good time to review and discuss these settings.

Any smart advice or feedback is appreciated..  :)

More information about the Squeak-dev mailing list