DavidKruse_Analyzing_Metadata_Caching_Windows_SMB2_Client
DavidKruse_Analyzing_Metadata_Caching_Windows_SMB2_Client
CREATE CREATE
CREATE
QUERY
CLOSE
QUERY QUERY
CREATE
QUERY
CLOSE CLOSE CLOSE
Distributed Applications
Very typical in HPC scenarios which require data sharing
between concurrently running tasks on multiple nodes.
Producer / consumer type of scenario
Workaround is to force apps (or system) to use
mechanisms like change notifications.
Legacy Applications
Applications which mix long and short names.
Applications coded for specific behavior patterns.
Access based enumeration (ABE)
Different views of a directory based on user.
Cache size
Maximum number of entries
Elastic thresholds to handle bursts of activity
Dynamic trimming of cache over time.
Cache lifetime
Fixed vs. dynamic
Tradeoff between performance and correctness.
Cache eviction policy
The following chart shows the impact (in terms of the # of network frames
exchanged) of the file-info and directory caches for a simple file browsing
scenario of a directory with 60 files.
Frame Count
350
300
250
200
150
100 Frame Count
50
0
No FileInfo Dir+FileInfo
metadata cache Cache
caching
The data (frame counts) in the below table was provided by Marc Ullman
and Ken Harris from MathWorks to highlight the effect of the metadata
cache sizes for a “compile over the network” workload typical of large
engineering environments.
Windows 7 Windows 7 Windows 7 Windows 7
Default Settings (Large MTU enabled) (Large MTU enabled)
FileInfoCacheEntries = 64 FileInfoCacheEntries = 32K FileInfoCacheEntries = 32K FileInfoCacheEntries = 32K
DirectoryCacheEntries = 16 DirectoryCacheEntries = 32K DirectoryCacheEntries = 32K DirectoryCacheEntries = 32K
FileNotFoundCacheEntries=128 FileNotFoundCacheEntries=32K FileNotFoundCacheEntries=32K FileNotFoundCacheEntries=32K
Cache lifetime = 10s, 10s, 5s Cache lifetime = 60s, 60s, 60s Cache lifetime = 60s, 60s, 60s Cache lifetime = 600s, 600s, 600s
{ Ka1, 0 }
Handle Caching
Handle caching is revoked if Kself of new open is not equal
to Kself of conflicting open at create time. (Same as
specified for opens to files.)
Delete and rename of folders is the most common issue
that handle caching helps resolve.
Read Caching
Read caching is revoked on directory metadata update if
Kparent of the child who triggered the modification is not
equal to Kself of the open on which the least was obtained.
Create new, modification of metadata, deletion of a file, or
updating timestamps on close would be most common.
2010 Storage Developer Conference. Microsoft Corporation. All Rights Reserved.
23
Modeled Performance Results
CmdLineFileDelete -2 -3 -2
CmdLineFileDownload -2 -2 -2
CmdLineFileUpload -1 -2
CmdLineNavigate -3 -4 -4
ExplorerDragDropFileDownload -4 -7 -2
ExplorerDragDropFileUpload -6 -8 -4
ExplorerFileDelete -2 -13 -14 -10
ExplorerNavigate -8 -11 -4
ExplorerSelect -1 -1 -2
WordEditAndSave -3 -6
WordFileClose -2 -17 -19 -8
WordFileOpen -21 -25 -14
Thanks!