1

I'm putting together a filesystem crawler for SMB/CIFS file shares. One of the requirements is that file ownership is captured. Adding a call to GetFileSecurity() for every file to the basic folder traversal logic increases the scan time tenfold.

Any way to that speed up? As outlined here, one can gain some performance by plugging into a lower level API. Is there one for the Lanman redirector? Maybe there are some redirector settings I could tweak?

EDIT: some SMB tuning parameters listed here: https://www.monitis.com/blog/2013/05/31/tuning-windows-2012-file-system-part-3

RSS stands for Receive Side Scaling, RDMA stands for Remote Direct Memory Access. Some more info here: https://technet.microsoft.com/en-us/library/hh831795.aspx

EDIT2: the server only supports SMB2. It's a Netapp Vfiler.

Community
  • 1
  • 1
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • You may be able to gain some improvement by calling GetFileSecurity() in parallel with the folder scan rather than synchronously. But if the underlying storage is spinning disk, fetching actual file data is inevitably going to be much slower than simply reading the directory contents. – Harry Johnston Apr 07 '16 at 01:25
  • It's multithreaded (i, e. parallel) as it is, and the share is over a massive disk array. Hard to tell whether the limiting factor is the network or the disks on the other end, especially since I'm not the one running the NAS. However, I could gain some speed by eliminating request serialization on redirector level; I wonder how can I detect if it exists. – Seva Alekseyev Apr 07 '16 at 01:29

0 Answers0