[squeak-dev] Re: Mac VM hanging

Bert Freudenberg bert at freudenbergs.de
Tue Jun 28 15:33:05 UTC 2011


On 28.06.2011, at 16:58, Bob Arning wrote:

> David,
> 
> I have narrowed it down further. The problem is an interaction between:
> - my code
> - MessageTally
> - some GC tweaks I was using (see below)
> 
> If I don't use MessageTally, everything runs fine. If I don't use the GC
> tweaks, everything runs fine. If I use them in combination, then Squeak
> grinds to a halt somewhere short of the end of my code (which would normally
> take a few minutes). I guess this give me a workaround, but if any of the
> numbers in the code below are known to be a problem, I'll mention it on the
> seaside list.

I've been using this for a specific application:

	vmParameterAt: 5 put: 16000;  "do an incremental GC after this many allocations"
	vmParameterAt: 6 put: 32000;  "tenure when more than this many objects survive the GC"
	vmParameterAt: 24 put: 16*1024*1024;  "when growing object memory, allocate this much extra space"
	vmParameterAt: 25 put: 8*1024*1024.  "when more than this much is free, shrink object memory"

There are two main differences: the incremental GC runs more often, and I did not enable the bias-to-grow.

- Bert -

> Cheers,
> Bob
> 
> initializeMemorySettingsProfileSeaside
>        "Initialize the memory and GC settings to be more in line with
> Seaside requirements"
> 
>        "The following settings affect the rate incremental GCs and
> tenuring"
> 
>        "Limit incremental GC activity to run every 40k 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"
> 
>        "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"
> 
> --
> View this message in context: http://forum.world.st/Mac-VM-hanging-tp3626282p3630574.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
> 






More information about the Squeak-dev mailing list