native threads

John M McIntosh johnmci at smalltalkconsulting.com
Fri Apr 15 22:34:01 UTC 2005


On Apr 15, 2005, at 2:42 PM, Bryce Kampjes wrote:

> The idea was to do most of the old space GC concurrently but not
> all. New-space collection would not be done while the interpreter was
> running (just like now).

Yes, but what would that buy you? For example lets look at the image  
I'm currently
editing

uptime			1h39m29s
memory			38,573,136 bytes
	old			34,237,936 bytes (88.8%)
	young		168,148 bytes (0.4%)
	used		34,406,084 bytes (89.2%)
	free		4,167,052 bytes (10.8%)
GCs				13,757 (434ms between GCs)
	full			5 totalling 3,836ms (0.0% uptime), avg 767.0ms
	incr		13752 totalling 60,476ms (1.0% uptime), avg 4.0ms
	tenures		32 (avg 429 GCs/tenure)

13,757 youngspace GC events, but only 5 full (aka OldSpace) collections.
If you hide the 3.836 seconds by mixing it in with other processing  
over the hour & 40  minutes my image has been running I certainly won't  
notice anything.

What has more impact are the changed I detailed in
"Mac 3.8.6b4 VM posted for testing" Posted Jan 31st 2005

				Smalltalk setGCBiasToGrowGCLimit: 16*1024*1024. "Set growth limit  
before full GC to 16MB"
				Smalltalk setGCBiasToGrow: 1.
				Set bias to grow upto GCLimit, this can avoid a problem where we  
attempt to avoid growing but results in thousands of incremental GC  
events as
				we approach a knee in a curve of space used versus the  
growth/compaction decision.


>
> Old space would be collected by a noncompacting mark and sweep
> collector. Most of marking can be done concurrently, the write barrior
> will record anything that the interpreter changes so it can be
> rescanned later. The final few modified objects will be marked while
> the interpreter isn't running.
>
> Sweeping can be done concurrently because it doesn't modify live
> objects. Objects shouldn't often be allocated directly into old space.
> If they are then they should be marked as live to avoid sweeping them.

In squeak objects are never allocated in OldSpace, if an object is too  
large
for Newspace we do a full collection/compaction and perhaps grow the  
size of NewSpace to make the object fit.
Or die.

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list