# Webrick memory consumption

**URL:** <https://www.ruby-forum.com/t/webrick-memory-consumption/119696>\
**Category:** Ruby\
**Created:** [November 9, 2007, 9:54am UTC](https://www.ruby-forum.com/t/webrick-memory-consumption/119696 "2007-11-09T09:54:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcampbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Post date:** [November 9, 2007, 9:54am UTC](https://www.ruby-forum.com/t/webrick-memory-consumption/119696/1 "2007-11-09T09:54:50Z")

</div>

Hi,

I’am developing a small web interface (html files, forms, servlets) for  
my ham radio  
software using webrick. Later, I want to deploy this web interface on a  
Linux based  
router (OpenWrt) with only 32 MB RAM.

Now I have observed, that Webrick eats up a lot of memory. Even the  
following really  
small example needs more than 14 MB of RAM after serving the first  
request.

=== snip ===  
require ‘webrick’  
include WEBrick

server = HTTPServer.new( :Port =\> 3000, :DocumentRoot =\> Dir::pwd)

trap( “INT”) {  
server.shutdown  
}

server.start  
=== snap ===

It can’t be a general ruby problem, my ham radio software runs very well  
needing about 7 MB RAM by doing a little bit more than serving a single  
html file.

Is there a way to sizing down the memory consumption of webrick ?

Or, is there an alternative to webrick ?  
(I take a very short look to mongrel, but it seems more focused on  
rails).

Kind regards

```
 Michael
```
