[Samba] Possible Issue with Samba Blocking I/O and CPU
jra at samba.org
Thu Jun 10 11:09:33 MDT 2010
On Thu, Jun 10, 2010 at 12:40:22PM -0400, Andy Liebman wrote:
>> With this setting of write cache, if the apps have a good locality
>> of data reference you'll almost never hit the disk, as everything
>> will be served out of that memory cache.
>> Sorry I can't be too helpful here, but this really doesn't look like
>> a Samba problem.
> Thanks Jeremy,
> It's not really possible that I could "almost never hit the disk". I am
> writing 80 MB/sec of new data to the storage, and I'm reading 220 MB/sec
> of data from the storage. Doing this hours on end without any repeated
> data. The size of this Samba cache is very small compared to all of
> that data.
"almost never hit the disk" is on a per-client basis :-).
If a client were mainly reading/writing within a local
area in a file, that fits within the 256m cache, then it
will be served mainly out of that cache. Of course it will
hit the disk once the file gets closed etc. Consider it
like a "oplock buffer area" in terms of reducing smbd disk
> Since sending my first email, I have another 2 hours of flawless
> performance. This contrasts with days on end of these "periodic
> dropouts" before we set the "write cache" line.
It's a kernel issue - by setting write cache you are changing the
smbd read/write patterns to the disk. How much you change them depends on the
locality of reference of the client apps, as I mention above.
> I realize there might be a kernel issue. But I want to understand why
> setting "write cache" might mitigate it, and where there is any serious
> downside to specifying a write cache?
Only extra memory usage. But I'd persue the underlying disk
problem with the kernel devs. If they don't fix the underlying
bug you've no guarantee it won't bite you somewhere else.
More information about the samba