From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans Reiser Subject: Re: slow stat() ? Date: Sun, 30 Nov 2003 23:47:00 -0800 Message-ID: <3FCAF1F4.6040106@namesys.com> References: <1070299845.12809.98.camel@tiny.suse.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: list-help: list-unsubscribe: list-post: Errors-To: flx@namesys.com In-Reply-To: <1070299845.12809.98.camel@tiny.suse.com> List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Chris Mason Cc: bernz@bernztech.org, reiserfs-list@namesys.com Chris Mason wrote: >On Mon, 2003-12-01 at 12:21, David Bernick wrote: > > >>Hi all, >> >>First, what I'm running Reiser on: >> >>Supermicro dual Xeon motherboard with 2x2.6Ghz xeons in hyperthreaded >>mode. 3ware 7500-8 (or whatever the call the 8 port ATA card) with 8x250GB >>disks attatched. 4GB RAM. >> >>Software: >>RedHat 9 with latest up2date >>Kernel 2.4.22 no patches >>The journal is not on a separate set of spindles. >> >>/proc/sys/vm/max-readahead=512 >>/proc/sys/vm/min-readahead=128 >>/proc/sys/vm/bdflush >>100 5000 640 2560 150 30000 60 20 0 >> >>Okay. Now for the issue at hand. When the logical disk is being read from, >>reiser is fast and effecient. We have millions (10M?) of files (about 1M >>each) in thousands of directories. Reiser reads well (exporting the disk >>over NFS) and we're very impressed by it. It's a bit slow on the writes >>and the system load goes up marginally, but that's not a big deal. The >>thing that puzzles me is that when we perform functions like "find" or in >>perl "-e filename" or anything that uses fstat() or stat64() or any of >>those functions brings the system usage to 100% and the load climbs >>quickly. >> >>Are there any patches, kernel updates, tuning, etc that can help with this >>problem? >> >> > >You could boot with profile=2 and send the results of a readprofile >command taken after the system load goes very high. This will slow down >your box for general usage, so you would only want to run with profile=2 >for a short time. > >My guess is the stats are being done across a large directory tree and >this is generating lots of atime updates. You could mount -o >noatime,nodiratime, which will reduce the amount of work reiserfs does >on each stat. > >atimes are used by many mail programs to find out the last time you read >your mailbox file. nodiratime probably won't affect most applications. > >-chris > > > > > > profiling will also tell you if the performance problem is in user space.....;-) -- Hans