ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: Hongli Lai <hongli@plan99.net>
To: ruby-core@ruby-lang.org
Subject: Re: Copy-on-write friendly garbage collector
Date: Thu, 20 Mar 2008 23:45:11 +0900	[thread overview]
Message-ID: <47E27879.60907@plan99.net> (raw)
In-Reply-To: <E1JcLgt-0001p1-RE@x61.netlab.jp>

Yukihiro Matsumoto wrote:
> By the way, I'd like to know how much effective this copy-on-write
> friendly patch is.  Does anyone have a good (even artificial) case?

I use the following test:
http://pastebin.com/f353f2ade
It loads Ruby on Rails (2.0.2), then runs garbage collection in a child 
process.

The results are as follows:

== Standard Ruby:

After forking, before gc:
- Parent process: 64 KB private dirty memory
- Child process 1: 60 KB private dirty memory
- Child process 2: 128 KB private dirty memory

After forking, after gc:
- Parent process: 64 KB private dirty memory
- Child process 1: 60 KB private dirty memory
- Child process 2: 9.1 MB private dirty memory

== My Ruby:

After forking, before gc:
- Parent process: 64 KB private dirty memory
- Child process 1: 60 KB private dirty memory
- Child process 2: 156 KB private dirty memory

After forking, after gc:
- Parent process: 64 KB private dirty memory
- Child process 1: 60 KB private dirty memory
- Child process 2: 1.1 MB private dirty memory

Some parts of the memory are made dirty for as yet unknown reasons. It 
seems to have something to do with the way the system malloc() is 
implemented.

  reply	other threads:[~2008-03-20 14:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03  9:48 Copy-on-write friendly garbage collector Hongli Lai
2008-03-03 12:38 ` Daniel DeLorme
2008-03-03 13:11 ` Yukihiro Matsumoto
2008-03-04 11:31   ` Gonzalo Garramuño
2008-03-07 12:04   ` Hongli Lai
2008-03-07 15:20     ` Paul Brannan
2008-03-07 16:22       ` Hongli Lai
2008-03-07 18:47         ` Joel VanderWerf
2008-03-08  5:34   ` Daniel DeLorme
2008-03-08  7:50     ` Daniel DeLorme
2008-03-08 10:01       ` Daniel DeLorme
2008-03-08 15:39         ` Yukihiro Matsumoto
2008-03-12 17:23       ` Hongli Lai
2008-03-12 17:38         ` Yukihiro Matsumoto
2008-03-13  0:48         ` Daniel DeLorme
2008-03-13 11:04           ` Hongli Lai
2008-03-15 16:15         ` Hongli Lai
2008-03-13 11:18     ` Hongli Lai
2008-03-14  3:20     ` Hongli Lai
2008-03-14  4:44       ` Daniel DeLorme
2008-03-14 11:25         ` Hongli Lai
2008-03-14 12:01           ` Meinrad Recheis
2008-03-14 15:00           ` Daniel Berger
2008-03-14 15:53             ` Hongli Lai
2008-03-14 17:34               ` Joel VanderWerf
2008-03-20 10:59     ` Hongli Lai
2008-03-20 11:55       ` Yukihiro Matsumoto
2008-03-20 12:54         ` Hongli Lai
2008-03-20 14:24           ` Yukihiro Matsumoto
2008-03-20 14:45             ` Hongli Lai [this message]
2008-03-20 15:28             ` Joel VanderWerf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47E27879.60907@plan99.net \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).