Configure commit write for files on network shares

When writing to a file it is possible to perform a commit operation, which specifies that all data in cache should be flushed to disc. If the machine crashes without having performed a commit operation, then all data in cache is lost. Therefore many applications often perform commit operations to avoid data loss, at the cost of disc performance.

When the file is placed on a network drive, then the flush request is converted to a SMB_COM_FLUSH message sent to the server, which causes the server to flush its cache and only when it is done, then it responds back to the client. Instead of just affecting the client machine, then it also affects the server, which can cause very slow performance for all clients using the server.

It is possible to configure the server so it will not perform the commit operation, and thus avoiding the slow file operation (The client will have flushed its own cache):

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \LanmanServer \Parameters]
TreatHostAsStableStorage = 1 (Default = 0)

Note this should only be considered if the server is equipped with a redundant disc system along with battery backup.

More Info MS KB840390
More Info MS KB894372

Related Configure hard disk cache to ignore flush requests