[Mongrel] [WARNING] don't use ruby-sendfile

James Ludlow jamesludlow at gmail.com
Thu Aug 3 10:40:51 EDT 2006

On 8/3/06, Zed Shaw <zedshaw at zedshaw.com> wrote:
> On Thu, 2006-08-03 at 07:53 -0500, James Ludlow wrote:
> > On 8/3/06, Zed Shaw <zedshaw at zedshaw.com> wrote:
> > > I'll be investigating why it doesn't really work as advertised, and
> > > really it's not worth the hassle for just a 20% perf boost on static
> > > files (and ONLY static files, no other requests at all).  Really, if you
> > > need fast static files use a real web server instead.
> >
> > In my case, most of my content is static and the performance boost is
> > very significant.  I'm using file_column to manage the uploads, so
> > using a "real web server" around this is just a pain.
> >
> Measure the performance of both (with sendfile and without), you may
> find it's not that great (20% is a high estimate).

Setting the performance issue aside for a moment, if I have a long
download (i.e. streaming video), I'm going to tie up a mongrel process
for one user for a relatively long time.  This isn't a crisis, because
I can just spawn more, and I'm more constrained by the bandwidth at
the switch than by memory or CPU time.

My use of the word "performance" was pretty vague and imprecise.  I'll
try it without sendfile, but with more mongrel processes and see what

> > I haven't noticed any stability problems at all either.  Is this
> > something that people notice right away (perhaps due to something else
> > in their environment), or will it sneak up on me?
> It sneaks up on you.  Just one day you hit the right load and the OS
> starts canceling client requests at weird moments and Mongrel crashes
> for no reason.
> You're on your own now man. :-)

I appreciate the warning.  With what seems like a sudden influx of
stability problems and now this announcement about sendfile, I'm
wondering if something else might be going on though.  I'm not saying
that ruby-sendfile isn't broken, but maybe something else changed
recently that exposed this bug.

-- James

More information about the Mongrel-users mailing list