[Samba 4.2] Why AIO at times, does not seem to work until I restart Samba?

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Mar 20 02:07:00 MDT 2015


On Thu, Mar 19, 2015 at 05:02:56PM -0700, kingsmasher1 wrote:
> Thanks for the response, yes we performed a series of tests, and it works
> perfect from the regular filesystem.
> 
> Apologies, i missed to mention this to you earlier. The reason we were
> using AIO was, when Samba invokes open( ) there is a corresponding open( )
> in the fuse as well, for that file, and the next call to read( ) from Samba
> which in turn gets invoked in fuse, and there we have a blocking call, till
> the file is downloaded in the fuse filesystem from the datacenter. Blocking
> in the sense, we don't block it, but we have a polling mechanism, using
> select( ) poll( ) to check when that file is available, and till the file
> is available, it keeps on polling. I thought since you mentioned Samba 4.2
> is multi-threaded it should not make any difference, and also it is working
> with AIO, except at times, when it stops (becomes unresponsive, till the
> read is complete), and in which case, we need to re-start Samba.
> 
> This blocking call was earlier happening in open( ) but Miklose (fuse
> developer) suggested us to move it to read( ) and try with AIO, as the
> Samba share was becoming unresponsive during the phase of this blocking
> call.
> 
> We used AIO, and as i mentioned above* it works, *but at times, it again
> becomes unresponsive, in which case restarting Samba, is the only way it
> starts working.
> 
> Today, we tried disabling the write-cache using hdparm and try the same as
> the man page says, AIO works if write cache is disabled.
> We faced some isssues there, while disabling:

Which manpage is this? Samba's AIO is independent of disk
cache settings.

> {{{
> 
> IFM-LEICA:/home/insite1 # hdparm -W0 /dev/sdb
> 
> /dev/sdb:
>  setting drive write-caching to 0 (off)
>  HDIO_DRIVE_CMD(identify) failed: Invalid exchange
>  HDIO_DRIVE_CMD(flushcache) failed: Invalid exchange
>  HDIO_DRIVE_CMD(setcache) failed: Invalid exchange
>  HDIO_DRIVE_CMD(flushcache) failed: Invalid exchange
>  HDIO_DRIVE_CMD(identify) failed: Invalid exchange
> 
> }}}
> 
> But again, even after doing this, there was no luck.
> 
> This issue, is really a critical one for us, not sure why AIO does not
> work at times, can you kindly suggest something?

To be honest, I believe doing the root cause analysis for this is beyond
what you will get on the lists here for free.  You should consult with
someone from http://samba.org/samba/support with good expertise in the
file server area. Fixing the issue will mean to spend some time over
network traces, strace logs and staring at code.

With best regards,

Volker Lendecke

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list