COW-friendly Ruby 1.9?

D

David Masover

Here's my test script:

a = []
(1024**2*10).times do
a << Object.new
end
puts 'allocated'
gets
GC.start
puts "GC'd"
gets
GC.start unless fork
puts "GC'd and sleeping"
sleep 10

I'm using Ruby 1.9.1 from the Ubuntu Karmic repositories on x86_64.

This seems to use about 600 megs once it's allocated. (I'm un-scientifically
watching 'free -m' to see what happens.) If I don't do the second GC, the
forked child doesn't use much more. When I do GC in the child, or in the
parent after the fork, it pretty much exactly doubles -- another 600 megs.

This is disappointing. After all the noise from Merb, Unicorn, Phusion, and
"enterprise edition", and especially considering that forking is the only real
way to make MRI scale to multiple cores, I'd have expected some sort of COW-
friendly GC to have been merged already. Wasn't someone working on this
somewhere back in 1.9.0?

Or is there something wrong with my benchmark? I mean, it's clearly artificial,
and I haven't tried comparing it to the various "enterprise edition" patches.
 
J

Jeremy Kemper

This is disappointing. After all the noise from Merb, Unicorn, Phusion, and
"enterprise edition", and especially considering that forking is the only real
way to make MRI scale to multiple cores, I'd have expected some sort of COW-
friendly GC to have been merged already. Wasn't someone working on this
somewhere back in 1.9.0?

See [ruby-core:19799] for a bitmap-marking GC patch.

jeremy
 
D

David Masover

This is disappointing. After all the noise from Merb, Unicorn, Phusion,
and "enterprise edition", and especially considering that forking is the
only real way to make MRI scale to multiple cores, I'd have expected some
sort of COW- friendly GC to have been merged already. Wasn't someone
working on this somewhere back in 1.9.0?

See [ruby-core:19799] for a bitmap-marking GC patch.

Yes, I saw that. Something about SEGV in make test -- and I really don't see
any follow-up to that. What's the status of getting something like this
actually in core and stable?
 
R

Ryan Davis

This is disappointing. After all the noise from Merb, Unicorn, = Phusion,
and "enterprise edition", and especially considering that forking is = the
only real way to make MRI scale to multiple cores, I'd have expected = some
sort of COW- friendly GC to have been merged already. Wasn't someone
working on this somewhere back in 1.9.0?
=20
See [ruby-core:19799] for a bitmap-marking GC patch.
=20
Yes, I saw that. Something about SEGV in make test -- and I really = don't see=20
any follow-up to that. What's the status of getting something like = this=20
actually in core and stable?

You can help by re-asking this in ruby-core@
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Ruby redirection woes 10

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top