[Samba] Oplocks - when do they help
uri_simchoni at hotmail.com
Sat May 22 11:37:14 MDT 2010
> Date: Sat, 22 May 2010 19:21:32 +0200
> From: Volker.Lendecke at SerNet.DE
> To: uri_simchoni at hotmail.com
> CC: samba at lists.samba.org
> Subject: Re: [Samba] Oplocks - when do they help
> On Sat, May 22, 2010 at 08:10:09PM +0300, Uri Simchoni wrote:
> > So a single-user mdb benefits from oplocks, multi-user mdb
> > suffers from oplocks, and applications that load/store
> > whole files are indifferent to it?
> Not necessarily. I do know that MS Access suffers a lot
> without oplocks, I have seen a factor of 10 between an
> oplocked file and one without oplocks. This happened both
> against Windows and also against Samba.
> Everything else very much depends on the application.
> Without oplocks the Windows redirector (the compontent that
> makes d: come from the net) passes the Win32 API calls
> directly to the wire. So if the application decides to read
> a gigabyte large file byte by byte, then it will severely
> suffer from missing oplocks. With oplocks the Windows
> redirector will coalesce and pre-read much larger blocks. If
> your application at hand however at the win32 level already
> reads in large chunks, you will see not much difference.
> Can you take a look at your applications and see what they
What I'm really after is whether I should worry about oplocks in a Samba server or just turn them off. The reason for worrying is that I have the same file accessed using 2 shares: one "normal" and one that sits upon a special file system (linux fuse-based) that's really a layer above the normal file system. I cannot say what types of applications access these shares - they are for general use.
What I understand is that I should make oplocks work if possible (I understand that for starters, that dev/inode pair through both access points should be the same).
Thanks for the quick reply!
Hotmail: Powerful Free email with security by Microsoft.
More information about the samba