WEBrick and OpenWRT

Just a FYI, WEBrick doesn’t perform so hot on OpenWRT running on a Linksys WRT54GS.

It doesn’t appear to be a CPU problem. It seems like it could be the Ruby socket interface and maybe its interaction with the ulibc library. I may take a quick peek at it if I have the chance.

ApacheBench says it pretty much take 90 seconds exactly per complete response. Odd. That nice round number would imply that it is a timeout value hard coded in the code.

I’ll probably end up using some lightweight HTTP daemon instead of WEBrick. WEBrick takes up about 4 megs of memory, so when you only have 16 megs, 4 megs is quite a bit. The lightweight HTTP daemon will probably only take no more than 400KB of memory. And I’ll probably convert the Ruby logic into CGI scripts.

3 Responses to “WEBrick and OpenWRT”

  1. Peter Murray Says:

    Where did you get ruby for OpenWRT?

  2. tienshiao.org » Blog Archive » Ruby on OpenWRT Says:

    [...] I made passing mention of Ruby on OpenWRT previously and it looks like it garnered some interest. I haven’t had much time to play with it lately, but I figured I can make what I have available so others with more time can play too. [...]

  3. Dave Says:

    Hi – I built kamikaze with the optional ruby package, and ruby works.
    However, it’s missing the native pieces like socket.so.
    Do you know how to get a complete ruby installation?
    Thanks, Dave

Leave a Reply