[Samba] Avoiding constant HDD access

Rowland Penny rpenny at samba.org
Thu Nov 8 09:29:26 UTC 2018

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'

       Number of kilobytes the task has caused to be read from disk per second.

      Number of kilobytes the task has caused, or shall cause to be written to disk per second.

     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

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.
> 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 ?


More information about the samba mailing list