CIFS read-ahead

Richard Sharpe rsharpe at
Thu Jul 10 17:06:24 GMT 2003

On Thu, 10 Jul 2003, Nicholas M. Kirsch wrote:

> I have a very large (several terabyte) filesystem and I want good
> single-stream read performance from it. The applications which do this are
> many, including media streaming and simple file access in a single-stream
> linear fashion.

Is it likely that multiple clients will request the same data? If that is 
the case, won't the server cache help you deliver better performance? 

Of course, once enough clients are asking for enough files, or the total 
file size is larger than the cache (and FreeBSD has some limitations in 
that area ATM), then you are back to reading from disk/iSCSI or wherever.
> I am working on a NAS appliance, which uses Samba 3.0 to provide CIFS
> access to its content. Will your cache read code instruct the client to
> read-ahead? What appears to happen is the CIFS client sends a read
> request, and waits for the answer before sending another. In this
> scenario, throughput will be limited by latency. It appears as if NFS gets
> around this by sending multiple read requests at a single time.

CIFS is a request response protocol and I believe that the redirector is 
synchronous, in that it will not initiate read requests in an async 
fashion. The best you can do is push the read block size up to the max, 
and I am not sure if Windows supports that. The max is 128kB per read.

Richard Sharpe, rsharpe[at], rsharpe[at], 

More information about the samba-technical mailing list