Webrick memory consumption

M

Michael Conrad

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top