linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Software RAID & Filesystem Cache
@ 2004-08-05 17:49 Mike Hardy
  2004-08-05 18:54 ` Philip Molter
  2004-08-07 14:04 ` Philip Molter
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Hardy @ 2004-08-05 17:49 UTC (permalink / raw)
  To: 'linux-raid@vger.kernel.org'


Philip Molter wrote:
> Mike Hardy wrote:
>        [ ... snip ... ]
>> The readahead is the first place I'd look though. All in all, it 
>> appears that 2.6 kernels need a great deal more I/O tuning before they 
>> can be put in production. While I like the flexibility that's 
>> available, the default settings seem to be a major negative change 
>> from 2.4. This sort of thing is just now being quantified and 
>> hopefully it gets sorted out in the next couple of releases
> 
> 
> [ .. snip ... ]
> 
> My first suspicion was readahead as well, but I couldn't find any of the 
> sysctl options to control readahead in the kernel (as there were under 

I'm honestly not trying to be a smart-ass by posting this since I
haven't played with these *a single bit* - however, this was what I found:

<berlin>/sys % find . | grep ahead
./block/hdf/queue/read_ahead_kb
./block/hdg/queue/read_ahead_kb
./block/hdc/queue/read_ahead_kb
./block/hda/queue/read_ahead_kb

Maybe those are the appropriate knobs to twiddle? If so, it appears
they've gone per-device, and they've moved to sysfs...

-Mike

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Software RAID & Filesystem Cache
@ 2004-08-05 16:31 Philip Molter
       [not found] ` <411268C7.9070804@h3c.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Molter @ 2004-08-05 16:31 UTC (permalink / raw)
  To: linux-raid

What is the relationship to software RAID, filesystem caching, and I/O? 
  Here's why I ask:

I have a software application that uses RRD files to monitor numerous 
devices.  All told, we're talking about 21GB of RRD files, about 75% of 
which are being updated every 5 minutes.  Each RRD file is about 3MB in 
size, and updating an RRD file involves a lot of seeking, and writing 
small bits of data to very small parts.  The application should never be 
reading the entire file into memory.  On a properly running system, 
reads are done almost entirely out of filesystem cache on a 4GB box. 
Checking iostat, there is very little read util (<10KB/s over 5 minutes).

Now, I have a box with 12 37GB Raptor 10000RPM drives hooked up to a 
3ware 8500-12 controller.  In software RAID10 under kernel 2.4 (1024k 
chunks), the system works as expected.  Read load is light.  The box has 
plenty of I/O to spare (which it should; those drives are monsters).  In 
software RAID10 under kernel 2.6 (1024k chunks), read load is 
excessively heavy.  Each *drive* reports anywhere from 8-12MB/s (5 
minute average).  The RAID10 device itself reports 95-120MB/s (5 minute 
average).  There is no way the application is actually requesting to 
read that much data.  I trust the figures reported by iostat, though, 
because the application cannot keep up and the system feels excessively 
heavy.  In software RAID10 under kernel 2.6 (32k chunks), the read load 
is lighter, on the order of 1MB/s per disk and 10-12MB/s for the RAID10 
device.  If I convert the box to hardware RAID, the box functions 
normally.  Read levels are even better than 2.4 software RAID 
configuration (literally, less than 1KB/s over a 5 minute average). 
Each configuration is doing exactly the same work, with the exact same 
code and data.  The only difference is the kernel and software RAID 
configurations.

It's almost as if every read request to software RAID under 2.6 is 
bypassing the filesystem cache and furthermore, reading the entire 
chunk, not just the bit of information it needs (that's the only way I 
can explain the drop in read activity between 1024k and 32k).

Kernels are:
2.4.20-31.9 (roughtly 2.4.22)
2.6.7-1.494.2.2 (roughtly 2.6.8-rc2)

Filesystem is ext3

The RAIDs are setup as 6 RAID1 mirrors (2 drives each), striped together.

Any insight is greatly appreciated.
Philip

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-08-07 14:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-05 17:49 Software RAID & Filesystem Cache Mike Hardy
2004-08-05 18:54 ` Philip Molter
2004-08-07 14:04 ` Philip Molter
  -- strict thread matches above, loose matches on Subject: below --
2004-08-05 16:31 Philip Molter
     [not found] ` <411268C7.9070804@h3c.com>
2004-08-05 17:34   ` Philip Molter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).