Statistics on number of oplocks taken out on a Samba server
Jim Morris
Jim at Morris.net
Thu Jan 3 21:06:01 GMT 2002
Richard Sharpe wrote:
> Does anyone have any statistics on the max and average number of oplocks
> taken out by Windows clients against a Samba server?
>
> Is it like 1/20 per client, 2/20, 0.5/10? Any gut feels at all?
On several small to medium sized LAN's (up to 50 active Windows
clients), I have often taken a "snapshot" of the lock status of Samba
using smbstatus. I normally see no more than 10 to 20 active oplocks
shown by smbstatus at any single point in time, even on the 50 user network.
My observations are that the use of oplocks is VERY application
dependent. Some proprietary database applications I have worked on code
for can open as many as 100 dBASE files on a Samba share. Depending on
Samba and client settings, that could be as many as 100 outstanding
oplocks. Get several users running that application (written in Borland
C++ Builder), and you can see a LOT of oplock and oplock break related
log messages in the Samba log files, depending on the log level.
Contrast that to a user running Word editing a document, who will only
have a lock on the document(s) being edited. A user just connected to a
share or browsing it with Windows Explorer will not have any outstanding
oplocks.
That said - in all LAN environments I work with, only data files are
stored on the Samba server - applications are typically installed
locally on the client systems. So you typically will only see one oplock
per open file. If the apps were running from a network drive, I am sure
oplock use would be significantly higher.
I don't know if my highly NON-empirical data is any help, but there it
is! ;-)
Jim Morris (Jim at Morris.net)
More information about the samba-technical
mailing list