Date: Tue, 13 Sep 2011 08:57:20 -0500 (CDT) From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us> To: Laszlo KAROLYI <szoftos@freemail.hu> Cc: freebsd-fs <freebsd-fs@freebsd.org> Subject: Re: ZFS-lighttpd2-sendfile, too high IO Message-ID: <alpine.GSO.2.01.1109130843510.1973@freddy.simplesystems.org> In-Reply-To: <freemail.20110913115641.67732.1@xmldata08.freemail.hu> References: <freemail.20110913115641.67732.1@xmldata08.freemail.hu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 13 Sep 2011, Laszlo KAROLYI wrote: > Hello, > > it seems that turning off sendfile() in lighttpd2 completely solved my problem. > > The inactive memory usage ceased, wired memory raised for ARC cache, > and I see an enormous fall of IO load under the same (or even > higher) network load. The disk IO load now scales to the network > load. > > Something must be not right with the sendfile support in ZFS. It seems likely that sendfile is disabling read caching but is also not reading full block-aligned filesystem blocks from zfs (perhaps it does MMU pagesize sized reads). This would result in read amplification. The sendfile() API allows the application to do the wrong thing since it allows the application to specify the starting offset and number of bytes. This means that lighttpd2 may also be causing a problem if it does partial transfers which are not well aligned/sized for underlying filesystem blocks. A system call trace of lighttpd2 when it is configured to use sendfile may be illuminating. Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.2.01.1109130843510.1973>