rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: "richard schneeman" <richard.schneeman@gmail.com>
To: rack-devel@googlegroups.com
Cc: "Rack Development" <rack-devel@googlegroups.com>
Subject: Re: Rack and memory usage ?
Date: Sat, 22 Aug 2015 13:54:42 -0700 (PDT)	[thread overview]
Message-ID: <1440276882101.d5f8b2d3@Nodemailer> (raw)
In-Reply-To: <9d5cc646-0803-42c3-b118-f54a4cf8c6c0@googlegroups.com>

[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]

Just running `irb` with no libraries is 9.9 mb for me with Ruby 2.2.3. In Ruby 2.0 it's 17.9mb for me. Ruby is not known to be the most memory efficient language. 




I wrote a tool to help debug memor use in apps, check it out https://github.com/schneems/derailed_benchmarks




You can run 




$ derailed bundle:mem




To see the memory impact of all the gems you're using at require time. 




Here's more information: http://www.schneems.com/2015/05/11/how-ruby-uses-memory.html














---Richard Schneeman


http://www.schneems.com

On Sat, Aug 22, 2015 at 3:39 PM, David Unric <dunric29a@gmail.com> wrote:

> Hi,
> I'm asking if am I doing something wrong or is normal for a minimal rack 
> application have memory footprint over 25 MiB ?
> I'd like to reduce the memory usage as possible for deployment of a Sinatra 
> app on small x86 Linux NAS device. I did measured the memory usage and Rack 
> occupies about excessive 26 from total of 31 MiB (the rest is Thin server + 
> the app).
> Is there some Rack-lite or some trick how to shake-off unnecessary code to 
> get it on diet ?
> Thanks.
> -- 
> --- 
> You received this message because you are subscribed to the Google Groups "Rack Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups "Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 2897 bytes --]

  reply	other threads:[~2015-08-22 20:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-22 17:58 Rack and memory usage ? David Unric
2015-08-22 20:54 ` richard schneeman [this message]
2015-08-22 21:54   ` David Unric
2015-08-24 23:16     ` James Tucker
2015-08-25 12:17       ` Christian Neukirchen
2015-08-27  7:01       ` Eric Wong

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://groups.google.com/group/rack-devel

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

  git send-email \
    --in-reply-to=1440276882101.d5f8b2d3@Nodemailer \
    --to=rack-devel@googlegroups.com \
    /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).