Re: fread delays?
From: Stuart (bigdakine_at_aol.com)
Date: 08/11/04
- Next message: Stuart: "Re: fread delays?"
- Previous message: Chris Thompson: "Re: UFS logging on SDS mirrored filesystems?"
- In reply to: Barry Margolin: "Re: fread delays?"
- Next in thread: Stuart: "Re: fread delays?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 11 Aug 2004 09:43:09 -0700
Barry Margolin <barmar@alum.mit.edu> wrote in message news:<barmar-B89510.21410407082004@comcast.dca.giganews.com>...
> In article <ae00b9e3.0408071350.2b862075@posting.google.com>,
> bigdakine@aol.com (Stuart) wrote:
>
> > Basically, the software is a realtively simple code that uses fseek,
> > and then performs an fread on about 200 files. Now when I execute this
> > code after a long stretch (>1day) since the last time, it will use
> > about 18secs of wall clock time. Each subsequent time, perhaps a tenth
> > of a second, unless there is another long stretch when it is not used.
> ...
> > Does this have to do with disk cacheing? Still, 18secs seems like a
> > long time to do freads on like 220 files, uncached or not. Is there a
> > tunning issue lurking somewhere? The disks involved are
> > MAXTOR-ATLAS10K4 drives.
>
> Yes, it's most likely due to caching. The first time you run it, none
> of the file data is in memory, so it has to read it in from disk. And
> since you're doing lots of seeking, it's hard for it to optimize it with
> read-ahead. So you're jumping all over the disk, and the latency of
> moving the read arm really adds up.
So what exactly is it caching? The information in the inodes? Because
subsequent runs are requesting vastly different "seeks". Subsequent
runs are requesting information that is not physically close together
with the information requested previously on the disk.
We do not have a continual operational need for this software.
However, when we do need it, we need it to execute it as fast as
possible. I guess one thing I could do is run it in the cron a few
times a day, to keep the cache in memory. Thats an ugly kludge, but
other than that, I don't see what else I can do.
THanks,
Stuart
- Next message: Stuart: "Re: fread delays?"
- Previous message: Chris Thompson: "Re: UFS logging on SDS mirrored filesystems?"
- In reply to: Barry Margolin: "Re: fread delays?"
- Next in thread: Stuart: "Re: fread delays?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|