Date: Tue, 17 Jun 2003 12:48:20 +0400 (MSD) From: Igor Sysoev <is@rambler-co.ru> To: Richard Sharpe <rsharpe@richardsharpe.com> Cc: arch@freebsd.org Subject: Re: sendfile(2) SF_NOPUSH flag proposal Message-ID: <Pine.BSF.4.21.0306171234240.20729-100000@is> In-Reply-To: <Pine.LNX.4.33.0306162208280.5958-100000@ns.aus.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 16 Jun 2003, Richard Sharpe wrote: > While I was chasing down a performance problem with Samba using sendfile > on FreeBSD 4.6.2, I changed sendfile to: > > 1. Use sosend for the header, and > 2. Not to push the header out if there was data following (by passing > MSG_MORE to sosend, and maybe frobbing sosend to do the right things).. > > I was also using TCP_NODELAY, and sendfile was being used to to handle SMB > Read&X calls only. > > The performance impact of doing this as measured by tests like NetBench > was negligible. > > I did not test raw throughput (as NetBench is not really > about raw throughput), but I suspect that it would not make much > difference either. The sending the header and the first file part in the separate packets is the one part of the problem. The second part is that file pages can be sent in incomplete packets, e.g. three pages can be sent as 1460, 1460, 1176, 1460, 1460, 1176, 1460, 1460, ... or as 1460, 1460, 1460, 1460, 1460, 892, 1460, 1460, ... And this can be fixed by PRUS_MORETOCOME flag while sending the pages. > I also modified sendfile so that it uses VOP_GETPAGES rather than > VOP_READ, and this had more impact, I believe. What is the difference of these operation ? Igor Sysoev http://sysoev.ru/en/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0306171234240.20729-100000>