From: secondlife <hotchpotch@gmail.com>
To: mongrel-unicorn@rubyforge.org
Subject: Peformance up - using OobGC & GC.disable
Date: Tue, 4 Oct 2011 16:10:38 +0900 [thread overview]
Message-ID: <CAGh4DjnGymyQkvSt3rAd3n6J8xtPHPw7YTSN3Vg0q+Y2Ym57zw@mail.gmail.com> (raw)
Hi,
I'm working at Cookpad Inc.
- http://cookpad.com/
Cookpad is very famous cooking recipe service in Japan,
and largest rails application in Japan.
I applied GC.disable after fork, and a few changed Unicorn::OobGC.
# unicorn.conf.rb
after_fork do |server, worker|
GC.disable if RAILS_ENV == 'production'
# OobGC code
def process_client(client)
super(client) # Unicorn::HttpServer#process_client
if OOBGC_PATH =~ OOBGC_ENV[PATH_INFO] && ((@@nr -= 1) <= 0)
@@nr = OOBGC_INTERVAL
OOBGC_ENV.clear
disabled = GC.enable
GC.start
GC.disable if disabled
end
end
after applied,
application response time 130% fast!
and CPU usage to half!
- http://bit.ly/rhnVlg (response time)
- http://bit.ly/pgMN06 (CPU usage)
This is OobGC patch, apply please.
- http://bit.ly/roVLtZ (patch)
Also, my rails application have memory leaks ;(
I wrote process killing code because GC.disable create more memory leak.
- https://gist.github.com/1258681
------------------------------------------
Yuichi Tateno
https://github.com/hotchpotch
_______________________________________________
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 reply other threads:[~2011-10-04 7:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-04 7:10 secondlife [this message]
2011-10-04 11:18 ` Peformance up - using OobGC & GC.disable 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
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=CAGh4DjnGymyQkvSt3rAd3n6J8xtPHPw7YTSN3Vg0q+Y2Ym57zw@mail.gmail.com \
--to=hotchpotch@gmail.com \
--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).