[Samba] Winword/Oplock Performance.

Tristan Ball Tristan.Ball at vsl.com.au
Wed Jul 10 02:51:05 GMT 2002


Hi.

When working on a document which has change tracking enabled, and a 
large number of outstanding changes, word is forced to do frequent small 
IO's as you scroll through the document.

Basically this is because word only uses a 64k buffer for documents by 
default. If their are a lot of changes in the document, the physical 
file on disk ends up looking something like:

current test
[old changed text]
current text
[old changed text]
[old changed text]
current text

If the file is large, it can't be kept in the 64k buffer. As you scroll 
through the document, word tries to read in only the blocks of current 
text it needs. Unfortunately this leads to a situation where by a 
page-scroll within word can result in 50 256byte reads. If this is 
accross a network, that leads to a noticble delay.

This is of relevence for samba users because Word often opens a document 
more than once (it has to do with the internal OLE object directory), 
which causes the samba server to revoke the oplock on the file. That 
means all those little IO's go accross the network. NT/2000 servers have 
special code to detect the double open, and it doesn't break the oplock.

As a workaround, see:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q212242
for details on how to increase Word's memory cache for document data 
(64k by default, 512k is working well for me).
For details on oplocks, see the CIFS spec an SNIA.

Cheers,
	T.





More information about the samba mailing list