samba 3.6.9-164 - is "kernel oplocks = no" option viable on purely Samba shared FS?

Ira Cooper ira at
Mon Sep 22 09:00:48 MDT 2014

kernel oplocks = no will not disable all oplocks, it disables the use of
kernel oplocks, which should allow for the use of (IMHO) Samba's internal
oplocks which are superior, if you are using the share just for SMB.

If you want to disable oplocks, I believe you want: oplocks = no .

You may also want to look at enabling level2 oplocks. (With: level2 oplocks
= yes )

As far as consistency goes: Oplocks are an optimization.  They are actually
to allow client side caching of data.  Removing them should not have a
negative impact on correctness.  (If anything it should be better.)



On Mon, Sep 22, 2014 at 12:32 AM, Karel Lang AFD <lang at> wrote:

> Hi,
> anyone tried to speed up samba file transfer over the network by turning
> off the kernel opportunity locking - the so called:
> "kernel oplocks = no" on production server, if yes, were the results safe
> enough (in regards of data consistency)?
> 2 questions:
> 1.
> In scenario, where you have purely data storage filesystem (no apps, no
> databases anything), shared only over Samba and accessed by windows client
> workstations - would it be OK to use the "kernel oplocks = no" option?
> 2.
> is the "kernel oplocks = no" still Global option??
> it used to be a global option, but i read somewhere that devs wanted to
> code it as 'Share' option - which would be great for testing ..
> I'm asking this because i found out some 2years old discussion from list,
> where Christian Ambach was doing something about it. But i can't find more
> 'fresh' info and official 'Samba 3 howto' documentations lists the 'kernel
> oplocks' as 'Global' option..
> I tried to post this question to regular 'general' samba forums, but as
> noone replied there, i figgured this could be the right place to ask ..
> thank you

More information about the samba-technical mailing list