From owner-freebsd-stable@FreeBSD.ORG Fri Oct 29 14:31:23 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E85141065694 for ; Fri, 29 Oct 2010 14:31:23 +0000 (UTC) (envelope-from alexz@visp.ru) Received: from mail.visp.ru (srv1.visp.ru [91.215.204.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9B0598FC1B for ; Fri, 29 Oct 2010 14:31:23 +0000 (UTC) Received: from 91-215-205-255.static.visp.ru ([91.215.205.255] helo=zagrebin) by mail.visp.ru with esmtp (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PBpzF-000BFJ-S3; Fri, 29 Oct 2010 18:31:21 +0400 From: "Alexander Zagrebin" To: "'Andriy Gapon'" References: <3D1C350B94A44E5D95BAA1596D1EBF13@vosz.local><4CCABF73.8070707@icyb.net.ua> <4CCACDC0.7050802@icyb.net.ua> Date: Fri, 29 Oct 2010 18:31:21 +0400 Keywords: freebsd-stable Message-ID: <1BDB4D1B02274CC8AA2DD5E68190CB5D@vosz.local> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 In-Reply-To: <4CCACDC0.7050802@icyb.net.ua> Thread-Index: Act3blU3zhBkH9MFR3+frrrfroI88AAB5lww Cc: freebsd-stable@freebsd.org Subject: RE: 8.1-STABLE: zfs and sendfile: problem still exists X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2010 14:31:24 -0000 > > I've tried the nginx with > > disabled sendfile (the nginx.conf contains "sendfile off;"): > > > > $ dd if=/dev/random of=test bs=1m count=100 > > 100+0 records in > > 100+0 records out > > 104857600 bytes transferred in 5.892504 secs (17795083 bytes/sec) > > $ fetch -o /dev/null http://localhost/test > > /dev/null 100% of 100 > MB 41 MBps > > $ fetch -o /dev/null http://localhost/test > > /dev/null 100% of 100 > MB 44 MBps > > $ fetch -o /dev/null http://localhost/test > > /dev/null 100% of 100 > MB 44 MBps > > > > I am really surprised with such a bad performance of sendfile. > Will you be able to profile the issue further? Yes. > I will also try to think of some measurements. A transfer rate is too low for the _first_ attempt only. Further attempts demonstrates a reasonable transfer rate. For example, nginx with "sendfile on;": $ dd if=/dev/random of=test bs=1m count=100 100+0 records in 100+0 records out 104857600 bytes transferred in 5.855305 secs (17908136 bytes/sec) $ fetch -o /dev/null http://localhost/test /dev/null 3% of 100 MB 118 kBps 13m50s^C fetch: transfer interrupted $ fetch -o /dev/null http://localhost/test /dev/null 100% of 100 MB 39 MBps If there was no access to the file during some time, then everything repeats: The first attempt - transfer rate is too low A further attempts - no problems Can you reproduce the problem on your system? -- Alexander Zagrebin