Webrick memory consumption

Discussion in 'Ruby' started by Michael Conrad, Nov 9, 2007.

  1. 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
    Michael Conrad, Nov 9, 2007
    #1
    1. Advertising

  2. Kenny Parnell, Nov 9, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Duccio
    Replies:
    0
    Views:
    516
    Duccio
    Feb 25, 2006
  2. Kiran Kumar

    aspnet_wp.exe memory consumption

    Kiran Kumar, Jul 15, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    444
    Natty Gur
    Jul 15, 2003
  3. Ervin

    Urgent! GDI+ Memory consumption

    Ervin, Sep 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    608
    Ervin
    Sep 15, 2003
  4. Lloyd Zusman
    Replies:
    2
    Views:
    354
  5. Aaron Smith

    WEBrick::Daemon and WEBrick

    Aaron Smith, Mar 9, 2007, in forum: Ruby
    Replies:
    2
    Views:
    297
    Aaron Smith
    Mar 18, 2007
Loading...

Share This Page