From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Peformance up - using OobGC & GC.disable
Date: Mon, 10 Oct 2011 14:53:24 -0700 [thread overview]
Message-ID: <20111010215324.GA6378@dcvr.yhbt.net> (raw)
In-Reply-To: <CAHBuKRjBedCTDi1yPC4J3+tmzpxLFCkFrm-gyDrTPTF7BOkFHQ@mail.gmail.com>
Tatsuya Ono <ononoma@gmail.com> wrote:
> I don't actually understand is why GC.disable solution could introduce
> more memory leak. If I simplify the problem, the code is something
> like bellow:
>
> ---------------
> GC.disable
> (do something)
> GC.enable
> GC.start
> ---------------
>
> When the code block finishes, I expect that memory size should be
> (almost) equal with the case GC is enabled at begging. But it doesn't
> seems so from our experience.
>
> Do anyone know why there could be significant difference on memory
> usage because of timing of GC? It might be a question on Ruby rather
> than Unicorn, though, I thought even just sharing my experience could
> be worth to someone here.
Basically, the free(3) function in the C standard library does not
guarantee memory is released back to the kernel (speed vs memory usage
tradeoff).
There was discussion of this on the usp.ruby mailing list starting at
Message-ID: 20110914234917.GA2480@dcvr.yhbt.net
usp.ruby archives are at http://bogomips.org/usp.ruby/archives/2011.mbox.gz
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
next prev parent reply other threads:[~2011-10-10 22:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-04 7:10 Peformance up - using OobGC & GC.disable secondlife
2011-10-04 11:18 ` cliftonk
2011-10-04 22:53 ` Eric Wong
2011-10-06 6:22 ` secondlife
2011-10-10 17:05 ` Tatsuya Ono
2011-10-10 21:53 ` Eric Wong [this message]
2011-10-10 23:03 ` Tatsuya Ono
2011-10-12 16:00 ` Tatsuya Ono
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-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111010215324.GA6378@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.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.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
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).