[#144] Another implementation of Bignum — "Dmitry Antipov" <dmitry.antipov@...>

Hello Ruby hackers,

15 messages 2002/06/06

Re: Improving Ruby's garbage collector for interactive apps

From: Matthew Bloch <mattbee@...>
Date: 2002-06-21 15:27:05 UTC
List: ruby-core #183
On Friday 21 June 2002 04:29, you wrote:
> Hi,
>
> In message "Re: Improving Ruby's garbage collector for interactive apps"
>
>     on 02/06/21, Matthew Bloch <mattbee@soup-kitchen.net> writes:
> |> Yes and yes.  Generational mark and sweep algorithm was done before,
> |> but it was not good enough, probably due to write barrior cost.
> |
> |Which algorithm in particular, and how was the barrier implemented?  Did
> | you use OS page protection or catch it at application level?
>
> It's based on linked generations, and the barrier was implemented by
> application level.  OS page protection is not portable.

Sure; though there's no reason two different GC routines couldn't be used on 
different platforms.  I believe the Boehm GC can only use its incremental 
collector on platforms that support page protection, but other platforms can 
still use the old scheme.  My understanding of the papers I've read is that 
the overhead on a software write barrier in such schemes will be in the order 
of 15-30% of execution time, obviously unacceptable.

[snip]
> Upon recent CPU power / memory size situation, the simplest GC scheme
> rarely cause problems, except when too many objects are allocated.
> Am I too optimistic?

The only problem I'm having (see the Google Groups links in my original post) 
with it is that its execution time is unpredictable even with regular calls 
to GC.start.  I'm using Ruby for interactive applications which means that 
frequent pauses of tens of milliseconds are not good.  Hence my desire to 
improve it.

Anyhow the comments about the segfault 'feature' in Boehm are interesting; 
I'll bear them in mind when debugging my 'Boehmised' Ruby.

-- 
Matthew       > http://www.soup-kitchen.net/
              > ICQ 19482073

In This Thread