From owner-freebsd-stable@FreeBSD.ORG Sat Nov 7 20:42:48 2009 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 9CFB31065672; Sat, 7 Nov 2009 20:42:48 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id 0686A8FC13; Sat, 7 Nov 2009 20:42:47 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 25so494505eya.9 for ; Sat, 07 Nov 2009 12:42:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=J+IeO8WFaYJU4R+atcehkRzY2PtOwLTC2bEdxOOsooU=; b=hzxJa8sPdIklQeigyZkpFfhF5btSI4mT/EPE0iFLfHgxlOkFT5XhSm1Eh/LVJGck7k C4OVZAzFDNrFFu0J2P+3Qk9T9y9AY1qBYEnmkAkzameH7cnieW8eDT3ZD211lwvSKXvl N9qRNB13rqN5b11KbsboSERpS8TgX1fQS/29Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=DKFbBzvf42L/ZwDipKg966SHkLh19iYTJAhobuS3mSPXg6kVLwlOBWKVaKl+R/EdzP HoKeiMoOJooIl1ZuN+9of1/p52FoQu8gtdkHkPCHKJ+vO0aHO1+bpcSL9Hq2gjU0Ptqh wfBFzV6SqwOBSmBAyUOPCuLucaZSZTdPJ0yQ8= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.91.82 with SMTP id g60mr1850027wef.98.1257626567097; Sat, 07 Nov 2009 12:42:47 -0800 (PST) In-Reply-To: <4AF5D611.7060408@quip.cz> References: <772532900-1257123963-cardhu_decombobulator_blackberry.rim.net-1402739480-@bda715.bisx.prod.on.blackberry> <4AEEBD4B.1050407@quip.cz> <4AEEDB3B.5020600@quip.cz> <4AF46CA9.1040904@quip.cz> <9bbcef730911061101h5356d2acob2ac8791afe112@mail.gmail.com> <4AF5D611.7060408@quip.cz> From: Ivan Voras Date: Sat, 7 Nov 2009 21:42:27 +0100 X-Google-Sender-Auth: 0ce8a3466e8bd976 Message-ID: <9bbcef730911071242m5ad91720xcccb7586c6848ffd@mail.gmail.com> To: Miroslav Lachman <000.fbsd@quip.cz> Content-Type: text/plain; charset=UTF-8 Cc: freebsd-fs@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Performance issues with 8.0 ZFS and sendfile/lighttpd 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: Sat, 07 Nov 2009 20:42:48 -0000 2009/11/7 Miroslav Lachman <000.fbsd@quip.cz>: > > And as you noted, read, write, fault, total and percent are not updated on > machine with ZFS, so I can't compare it with UFS2 based machine. > Is this bug in top fixed in 8.x? Will you file a PR? (you know more about FS > related things than me :]) Not much... it depends on from where the stats are collected - there is a fair bit of file system infrastructure that ZFS bypasses and if these stats come from it, they cannot be collected. The stat is apparently updated around sys/kern/vfs_cluster.c: 233 . I'm not very familiar with this layer but since it uses struct buf and the ZFS doesn't use bufcache, this is probably one of the things that is bypassed, though it would be nice if it weren't since this code also defines and uses the vfs.write_behind and vfs.read_max sysctls. Also, since ZFS uses its own threads for IO and the stats are for curthread, it looks like it would maybe need careful work to actually assign the IO stats to the correct thread; otherwise it may be sufficient to add it to vdev_disk.c in vdev_disk_physio(). I don't really know this code and this is mostly mechanical analisys - it might be wrong. At least I'd like to read someone's comment about what is curthread in this code path.