[linux-cifs-client] Re: cifs readahead cache

Steve French smfrench at gmail.com
Mon Sep 22 18:03:46 GMT 2008


CIFS uses the Linux page cache which can use quite a bit of memory for read
ahead ("cat /proc/meminfo" can show how much overall), especially if the
file you are reading is oplocked (usually the case when no one is writing to
it or only one application has it open).   The code that calls
cifs_readpages and calculates how far to read ahead is in /mm (outside of
cifs).    The cifs read size is 16K because it is expensive (slow) to
allocate many contiguous pages when memory is fragmented, but the cifs read
size can be configured by increasing the CIFS MaxBufSize (which is a cifs
module install parameter) and setting rsize on the mount.   In some
sequential workloads this will help, but for most servers (other than Samba)
I would not expect increasing the size beyond 60K to help performance, and
when memory is fragmented it may hurt performance.

On Sun, Sep 21, 2008 at 10:30 PM, Angus wrote:

> Hi. I have a question about the CIFS's readahead cache. I notice that in
> Linux (Suse 10.2) it is limited to a size of something like 16kb. Is it
> possible to increase it further?
>



-- 
Thanks,

Steve
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list