On Thu, 24 Feb 2011 22:06:43 +0100 Piergiorgio Sartor <piergiorgio.sartor@xxxxxxxx> wrote: > Hi all, > > few posts ago was mentioned that the unit of the stripe > cache are "pages per device", usually 4K pages. > > Questions: > > 1) Does "device" means raid (md) device or component > device (HDD)? component device. In drivers/md/raid5.[ch] there is a 'struct stripe_head'. It holds one page per component device (ignoring spares). Several of these comprise the 'cache'. The 'size' of the cache is the number oof 'struct stripe_head' and associated pages that are allocated. > > 2) The max possible value seems to be 32768, which > means, in case of 4K page per md device, a max of > 128MiB of RAM. > Is this by design? Would it be possible to increase > up to whatever is available? 32768 is just an arbitrary number. It is there in raid5.c and is easy to change (for people comfortable with recompiling their kernels). I wanted an upper limit because setting it too high could easily cause your machine to run out of memory and become very sluggish - or worse. Ideally the cache should be automatically sized based on demand and memory size - with maybe just a tunable to select between "use a much memory as you need - within reason" verse "use a little memory as you can manage with". But that requires thought and design and code and .... it just never seemed like a priority. NeilBrown > > Thanks, > > bye, > -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html