Simple script takes about 6.2 MiB of memory with Ruby 2.2.3 on x86_64 machine ruby --disable=gems,rubyopt -e 'gets' so 31 - 5 - 6.2 ≈ 20 MiB is for Rack Not saying this is bad but if there is a way how to push it lower. AFAIK all ruby web servers are built upon Rack, not aware of any going its own independent way. Thanks for link to derailed_benchmarks gem. Looks promising, definitely would take a closer look at it. Btw. CRuby does not seem any worse then his "main" rival. Equivalent script takes about 6.4 MiB with Python 2.7.10 and 7.7 MiB on Python 3.4.3. On Saturday, August 22, 2015 at 10:54:44 PM UTC+2, richard schneeman wrote: > > 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 > 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+...@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.