[Samba] Oplocks - when do they help

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat May 22 11:21:32 MDT 2010


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

Volker


More information about the samba mailing list