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

kingsmasher1 raj.kumar.sanpui at gmail.com
Thu Mar 19 18:02:56 MDT 2015


Hi Jeremey,

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:

{{{

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?

Thank You

kingsmasher1



On Wed, Mar 18, 2015 at 2:43 AM, Jeremy Allison [via Samba] <
ml-node+s2283325n4682902h30 at n4.nabble.com> wrote:

> On Tue, Mar 17, 2015 at 05:42:26PM +0530, Raj Kumar Sanpui wrote:
>
>
>
> Network traces would help here, as would debug level 10's. 4.2
> should be built naturally with pthread support and so should
> be using a threadpool to schedule multiple IO's here.
>
> First things first - can you try exactly the same test
> against a ext4 filesystem - not your FUSE thing - and
> see if the async IO calls are working correctly there ?
>
> This will help work out if it's a strange FUSE interaction
> or something else about how you might have built the code.
>
> Cheers,
>
>         Jeremy.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://samba.2283325.n4.nabble.com/Samba-4-2-Why-AIO-at-times-does-not-seem-to-work-until-I-restart-Samba-tp4682863p4682902.html
>  To unsubscribe from [Samba 4.2] Why AIO at times, does not seem to work
> until I restart Samba?, click here
> <http://samba.2283325.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4682863&code=cmFqLmt1bWFyLnNhbnB1aUBnbWFpbC5jb218NDY4Mjg2M3wxNTA1ODcwMTM4>
> .
> NAML
> <http://samba.2283325.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://samba.2283325.n4.nabble.com/Samba-4-2-Why-AIO-at-times-does-not-seem-to-work-until-I-restart-Samba-tp4682863p4683079.html
Sent from the Samba - samba-technical mailing list archive at Nabble.com.


More information about the samba-technical mailing list