Impacts of the squeak garbage collector

Marcel Weiher marcel at metaobject.com
Tue Feb 19 18:38:51 UTC 2002


On Tuesday, February 19, 2002, at 07:03 PM, Scott A Crosby wrote:
>
> [*] You also changed macrobenchmarks to not allocate all-but-10mb of RAM
> before starting the benchmark?

Of course.

>> Default parameters 4K/2K:   128262 , 130944, 127643
>>
>> Parameters increased to 40K/12K:  141371, 141350, 148059
>>
>> Smaller increase, smaller slowdown 10K/12K:  136736
>>
>> Parameters accidentally decreased to 4K/ 1.2K:  125945
>>
>> Intriguied, I set param 6 even lower, to 4K/1K and got:  124051, 124079
>
> Verry interesting.. Caching issues for the CPU cache?

That is my guess.  On these modern machines, memory-hierarchy issues 
(cache vs. memory,  memory vs. disk) can often be much more significant 
than other code efficiency.  Very relevant for scientific code, for 
example.

>  My CPU is only half
> the speed of yours, so caching issues may be more important to you than
> me.. I've also got a different architecture. What are the times spent on
> GC for the respective sizes? Is GC using less time, but the overall
> benchmark getting worse?

Generally, yes.

> I tried roughtly the same type of analysis to see if caching issues had
> any effect and didn't see any.
>
> The main effect I saw was lower GC times when I set them very high and
> disabled [*] above to allow it to use all the RAM.
>
> Also, I used much larger numbers:
>   400k/12k   (which is the default I use now)
>   4000k/12k
>
> with 256mb or more allocated to squeak.

Well, a 10:1 memory overhead seems a bit excessive to save a couple of 
percent of total running time.  My guess is that there are more 
effective ways we could utilize that sort of memory...

Also, on a system like Mach (most Unixes would probably be similar), 
gratuitous memory use will typically have other degrading effects 
(displacing cached files or other programs, or yourself getting 
displaced, ping-ping fashion).

>>  From these measurements, the sweet spot seems to be at somewhat lower
>> settings than the current default, at 4K/1K.
>
> Yup.. Experimentation is needed. THanks for doing this on the PPC, and 
> I'm
> sorry for not believing you.

That's OK. it got me to get some real numbers... ;-)

Marcel




More information about the Squeak-dev mailing list