Koozali.org: home of the SME Server

What about the oplocks now?

vinces

What about the oplocks now?
« on: February 17, 2007, 11:26:55 AM »
Hi.

I'm running a SME 7.1 server with a windev 5.5 program shared for 5 computers on an Ibay. The speed is very slow compared to a windows server.
I'm not sure but I think it's the oplocks and I was wondering if we can nowadays turn off oplocks. I saw messages talking about a risk of index corruptions but it was at the time of samba2 I think.

Is it a good idea to turn off oplocks?

Thanks and my apologies for my poor english

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: What about the oplocks now?
« Reply #1 on: February 17, 2007, 05:50:58 PM »
Quote from: "vinces"

Is it a good idea to turn off oplocks?


Turning off oplocks is likely to make your application slower, not faster.

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Re: What about the oplocks now?
« Reply #2 on: February 18, 2007, 09:43:07 AM »
Quote from: "CharlieBrady"
Quote from: "vinces"

Is it a good idea to turn off oplocks?


Turning off oplocks is likely to make your application slower, not faster.


Not always. oplocks are great if the data is only used by one client, or is read mostly, or write by one client and read by all others. However, if the data is mixed read-write you get "oplock ping-pong". Client A grabs the oplock, does its stuff and holds the oplock. Client B wants the file, so has to go through an oplock request and oplock break cycle, and wait for Client A to flush the data back to the server. It then gets the oplock and caches the data. Now Client C (or even Client A) comes along...

Oplocks should be off for data  files which are likely to be written concurrently by multiple clients, such as shared database files.
............