From owner-freebsd-fs@FreeBSD.ORG Wed Feb 15 16:35:13 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAA59106564A for ; Wed, 15 Feb 2012 16:35:13 +0000 (UTC) (envelope-from gallasch@free.de) Received: from smtp.free.de (smtp.free.de [91.204.6.103]) by mx1.freebsd.org (Postfix) with ESMTP id 4A7798FC08 for ; Wed, 15 Feb 2012 16:35:12 +0000 (UTC) Received: (qmail 21794 invoked from network); 15 Feb 2012 17:07:25 +0100 Received: from smtp.free.de (HELO orwell.free.de) (gallasch@free.de@[91.204.4.103]) (envelope-sender ) by smtp.free.de (qmail-ldap-1.03) with AES128-SHA encrypted SMTP for ; 15 Feb 2012 17:07:25 +0100 References: <15861.1329298812.1414986334451204096@ffe12.ukr.net> <92617.1329301696.6338962447434776576@ffe5.ukr.net> <96280.1329309582.18313701080496209920@ffe5.ukr.net> In-Reply-To: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Message-Id: Content-Transfer-Encoding: quoted-printable From: Kai Gallasch Date: Wed, 15 Feb 2012 17:07:24 +0100 To: freebsd-fs@freebsd.org X-Mailer: Apple Mail (2.1084) Subject: Re: ZFS and mem management X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2012 16:35:13 -0000 Am 15.02.2012 um 15:02 schrieb Ivan Voras: > On 15/02/2012 13:39, Pavlo wrote: >>=20 >>=20 >>=20 >> Unfortunately we can't afford disabling prefetch. It is too much of = an >> overhead. >>=20 >> Also I made some tests. I have process that maps file using mmap() = and >> writes or reads first byte of each page of mapped file with some = data. >=20 > Note that ZFS is designed so that it interacts somewhat badly with > mmap() and other kernel services which rely on coherency between VM = and > IO such as sendfile(). At the very best, you will have two in-kernel > copies of all data buffers used with such interfaces, but there have > been sporadic reports that there are other bugs with it. So best practice for running apache2 on FreeBSD ZFS is making sure = EnableMMAP and EnableSendfile are disabled in httpd.conf, right? (both are turned off by default) [httpd.conf] # EnableMMAP and EnableSendfile: On systems that support it,=20 # memory-mapping or the sendfile syscall is used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted=20 # filesystems or if support for these functions is otherwise # broken on your system. # EnableMMAP off EnableSendfile off Kai.=