Solaris support

Dag-Erling Smørgrav des at
Tue Jan 8 21:45:48 CET 2008

Theo Schlossnagle <jesus at> writes:
> Dag-Erling Smørgrav <des at> writes:
> > Theo Schlossnagle <jesus at> writes:
> > > We've been running this for a while on Solaris.  Works really well.
> > Only because you haven't noticed the bugs yet...  for instance,
> > session timeout is broken (commented out, actually) in your patch, so
> > broken backends and / or clients will bog you down.
> Sure.  When I said "works well," I meant "as well as on Linux.

Uh, no, Linux actually supports SO_{RCV,SND}TIMEO, so Varnish does
*not* work as well on Solaris as on Linux, with or without your patch.

> > > sendfile and sendfilev on solaris
> > Probably not a good idea unless sendfile() semantics are significantly
> > better on Solaris than on FreeBSD and Linux.
> It's sendfile, it has all the advantages of sendfile.  To support
> them, you have to conform to their APIs.  I just added support so it
> could say "oh, look, I know how to use that sendfile..." and then
> actually use it (just as linux and freebsd now).  And I think
> sendfilev on Solaris is pretty slick.

So you've missed the numerous threads on sendfile() bugs affecting
Varnish, and the more recent threads on sendfile() in FreeBSD and
Linux being broken by design so that Varnish cannot reliably use it,
and Poul-Henning's commit disabling the sendfile() detection in to stop the whining.

> > > using fcntl() when flock() is unavailable
> > There are issues here as well; the semantics are subtly different from
> > OS to OS.  For instance, what happens if separate threads in the same
> > process try to lock the same file?  It's even less fun if you take
> > into consideration systems that support both.
> As I see it you only supported flock().

You've got it exactly backwards - Varnish has used fcntl() locks
exclusively for... what... five months now?  ever since I determined
that in addition to being more portable, fcntl() tends to be the least
broken on platforms that support both (though not on FreeBSD, where
flock() is slightly better, but I didn't consider it "better enough"
to warrant an #ifdef).  I even credited you in the commit log.

Dag-Erling Smørgrav
Senior Software Developer
Linpro AS -

More information about the varnish-dev mailing list