From: Bruce Allen Subject: Re: slow NFS performance extracting bits from large files Date: Mon, 16 Dec 2002 14:17:45 -0600 (CST) Sender: nfs-admin@lists.sourceforge.net Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: nfs@lists.sourceforge.net, nfs-admin@lists.sourceforge.net Return-path: To: Bruce Allan In-Reply-To: Errors-To: nfs-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Id: Discussion of NFS under Linux development, interoperability, and testing. List-Unsubscribe: , List-Archive: Hi Bruce, Problem solved. The point is that the code requires a lot of disks seeks (20,000), which cost milliseconds each. This is the dominant cost, not the read()s. Please see the thread with Paul Haas who nailed the problem on his first reply. Bruce Allen On Mon, 16 Dec 2002, Bruce Allan wrote: > > > > > Hi Bruce (good name, btw), > > It would help if you posted information about your network. Alternately, > you could read the "Optimizing NFS Performance" section of the Linux > NFS-HOWTO located at http://nfs.sourceforge.net/nfs-howto/ > > Regards, > --- > Bruce Allan > Software Engineer, Linux Technology Center > IBM Corporation, Beaverton OR > 503-578-4187 IBM Tie-line 775-4187 > > > > > Bruce Allen > .uwm.edu> cc: Bruce Allen > Sent by: Subject: [NFS] slow NFS performance extracting bits from large files > nfs-admin@lists.sour > ceforge.net > > > 12/15/2002 11:02 PM > > > > > > I've searched/browsed the mail archive and the online documentation but am > still a bit clueless about where to start. > > I am working on a scientific data analysis application which needs to > extract a little bit of data from around 10,000 files. The files > themselves are each around 1 MB in size. The application does: > > for (i=0; i<10000; i++){ > open() ith file > read() 32 bytes from beginning > lseek() to somewhere in the middle of the file > read() 620 bytes from the middle of the file > close() ith file > } > > If I run this with the data set on a local disk, the total run time is > around 1 sec -- very reasonable since I am transferring around 6 MB of > data. > > If I run this on an NFS-mounted disk the performance is 100 times worse. > Both client and server are stock RH 7.3. Note that if I run it a second > time, when the data is presumably cached, it takes just a few seconds to > run. > > Is it obvious what needs to be changed/tuned to improve this performance? > Or if not, could someone suggest a tool and a strategy for tracing down > the cause of the poor performance? > > Sincerely, > Bruce Allen > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > NFS maillist - NFS@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nfs > > > > ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs