[Samba] Avoiding constant HDD access
Andrew Bartlett
abartlet at samba.org
Thu Nov 8 18:40:23 UTC 2018
On Thu, 2018-11-08 at 09:29 +0000, Rowland Penny wrote:
> On Thu, 08 Nov 2018 22:08:51 +1300
> Andrew Bartlett <abartlet at samba.org> wrote:
>
> > On Thu, 2018-11-08 at 08:48 +0000, Rowland Penny via samba wrote:
> > >
> > > Yes, but it isn't doing a read, it is trying to do a write and then
> > > being cancelled.
> >
> > Rowland,
> >
> > Can you point us as the evidence that leads you to that conclusion?
>
> OK, the OP posted lines like these:
>
> 04:11:08 AM UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command
> 04:11:28 AM 0 832 0.00 0.20 0.20 0 /usr/sbin/smbd -D
>
> And from 'man pidstat'
>
> kB_rd/s
> Number of kilobytes the task has caused to be read from disk per second.
>
> kB_wr/s
> Number of kilobytes the task has caused, or shall cause to be written to disk per second.
>
> kB_ccwr/s
> Number of kilobytes whose writing to disk has been cancelled by the task.
> This may occur when the task truncates some dirty pagecache.
> In this case, some IO which another task has been accounted for will not be
> happening.
>
> kB_rd/s is 0.00
> kB_wr/s and kB_ccwr/s are both 0.20
>
> So, from my reading, nothing is being read, but something is trying to
> write, but being cancelled.
>
> I could of course be totally wrong, but if I am the 'pidstat' manpage
> needs rewriting.
It is speculation, but this might be due to a mutex-enabled TDB. Each
read from a tdb would now be a write while the mutex is set. This
might not have been seen in the past when fcntl() was in use.
The cancellation might be the mutex being unlocked again.
> >
> > I think you are extrapolating too much from an smb.conf line, even
> > when serving read only shares, there are a lot of things in Samba
> > that can case both reads and writes.
>
> Not really extrapolating anything from smb.conf, I only pointed out
> that 'read only = no' and 'writable = no' are exact opposites of each
> other and shouldn't be in the same share together, or do you disagree ?
OK. Either way I don't think it is relevant to the diagnosis. The
last statement unambiguously wins.
Thanks,
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba
mailing list