Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Alexandre Riveira <alexandre-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
To: "Rainbows! list" <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: memory usage
Date: Sun, 27 Oct 2013 11:35:40 +0000	[thread overview]
Message-ID: <526CFA8C.7000300@objectdata.com.br> (raw)
In-Reply-To: <20131022160930.GA3020-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>

Hello Eric,

I discovered that when you restart the server (linux 2.3.50, glibc 2.15) 
memory stopped growing indiscriminately.

2 questions:

1) The POOL_SIZE XEpollThreadPool series of the number of connections 
accepted epoll so'd have one for each thread
2) I saw the gem 'mall' and she seems to adjust as you indicted by glibc 
environment variables are correct? If yes in config / initializers added 
a file.rb with the following:
Mall.opt (Mall :: ARENA_MAX, 1)
Mall.opt (Mall :: ARENA_TEST, 1)


Tanks,

Alexandre Riveira

On 22-10-2013 16:09, Eric Wong wrote:
> Alexandre Riveira <alexandre-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org> wrote:
>> I usually use XEpollThreadPool however persebi a large memory usage
>> for sites that have a lot of content and access reaching over 1 GB.
>> Changed to ThreadPool and memory fell not from 4x 256MB. However
>> XEpollThreadPool is faster than ThreadPool. Accepted suggestions for
>> configuration. I tested also with CoolioThreadPool speed was good
>> but the memory consumption and large too.
> Wait, ThreadPool uses significantly less than XEpollThreadPool?
>
> Since this is likely glibc/eglibc, try setting MALLOC_ARENA_MAX=1 and
> MALLOC_ARENA_TEST=1 in the env before starting Rainbows!  AFAIK, these
> are mainly documented by Red Hat, but in all recent-ish versions of
> glibc/eglibc support it.
>
> Then increase the values if you see performance gains (unlikely unless
> your app releases the GVL a lot or don't have one (rbx)).
> _______________________________________________
> Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
> http://rubyforge.org/mailman/listinfo/rainbows-talk
> Do not quote signatures (like this one) or top post when replying
>

_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


  parent reply	other threads:[~2013-10-27 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22  8:28 memory usage Alexandre Riveira
     [not found] ` <52663744.6040600-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2013-10-22 16:09   ` Eric Wong
     [not found]     ` <20131022160930.GA3020-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2013-10-22 18:08       ` Alexandre Riveira
2013-10-27 11:35       ` Alexandre Riveira [this message]
     [not found]         ` <526CFA8C.7000300-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2013-10-28  0:37           ` Eric Wong
     [not found]             ` <20131028003755.GA6569-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2013-10-28 18:40               ` Alexandre Riveira

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/rainbows/

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

  git send-email \
    --in-reply-to=526CFA8C.7000300@objectdata.com.br \
    --to=alexandre-vwdbj2ysoup0zrtcdd4y8vaujnlxr6a1@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.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/rainbows.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).