Return-Path: Received: from mail-out2.uio.no ([129.240.10.58]:35174 "EHLO mail-out2.uio.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752153AbZFEVWD (ORCPT ); Fri, 5 Jun 2009 17:22:03 -0400 Subject: Re: Read/Write NFS I/O performance degraded by FLUSH_STABLE page flushing From: Trond Myklebust To: "J. Bruce Fields" Cc: Christoph Hellwig , Krishna Kumar , Greg Banks , Brian R Cowan , Chuck Lever , linux-nfs@vger.kernel.org, linux-nfs-owner@vger.kernel.org, Peter Staubach In-Reply-To: <20090605195434.GI14043@fieldses.org> References: <1241126587.15476.62.camel@heimdal.trondhjem.org> <1243615595.7155.48.camel@heimdal.trondhjem.org> <1243618500.7155.56.camel@heimdal.trondhjem.org> <20090530075756.GA27885@infradead.org> <20090601223008.GF5950@fieldses.org> <20090605145450.GA11988@infradead.org> <1244218328.5410.38.camel@heimdal.trondhjem.org> <20090605195434.GI14043@fieldses.org> Content-Type: text/plain Date: Fri, 05 Jun 2009 17:21:50 -0400 Message-Id: <1244236910.5275.5.camel@heimdal.trondhjem.org> Sender: linux-nfs-owner@vger.kernel.org List-ID: MIME-Version: 1.0 On Fri, 2009-06-05 at 15:54 -0400, J. Bruce Fields wrote: > On Fri, Jun 05, 2009 at 12:12:08PM -0400, Trond Myklebust wrote: > > On Fri, 2009-06-05 at 10:54 -0400, Christoph Hellwig wrote: > > > On Mon, Jun 01, 2009 at 06:30:08PM -0400, J. Bruce Fields wrote: > > > > > NFSD stops calling ->fsync without a file struct. > > > > > > > > > > I think the open file cache will help us with that, if we can extend > > > > > it to also cache open file structs for directories. > > > > > > > > Krishna Kumar--do you think that'd be a reasonable thing to do? > > > > > > Btw, do you have at least the basic open files cache queue for 2.6.31? > > > > > > > Now that _will_ badly screw up the write gathering heuristic... > > How? > The heuristic looks at inode->i_writecount in order to figure out how many nfsd threads are currently trying to write to the file. The reference to i_writecount is held by the struct file. The problam is that if you start sharing struct file among several nfsd threads by means of a cache, then the i_writecount will not change, and so the heuristic fails. While we won't miss it much in NFSv3 and v4, it may change the performance of the few systems out there that still believe NFSv2 is the best thing since sliced bread... Trond