Cygwin Filesystem Performance degradation 1.7.5 vs 1.7.7, and methods for improving performance

Brian Ford
Thu Oct 7 20:42:00 GMT 2010

On Thu, 7 Oct 2010, Corinna Vinschen wrote:

> On Oct  7 10:12, Brian Ford wrote:
> > If you folks haven't already seen the information presented here it might
> > be interesting.  I know I found it useful for coding the applications we
> > use to move massive amounts of data and numbers of files around.
> >
> >
> Powerpoint?  *shudder*
> Any chance you could provide an executive summary?

I'm not exactly an executive, so it took me a while ;-).  Here's my best

  Use IOCP/overlapped w/ FILE_FLAG_NO_BUFFERING & large request sizes for best performance
  Fill RAID disk queue and/or network bandwidth delay product pipe with requests
    up to 8 outstanding is reasonable
      SMB1 max 60k read, 64k write
      SMB2 1M works well; max < 16M to avoid resource issues
  If async 2/ large requests not possible
    Use buffering w/ access hints (random/sequential)
    Set file size before writing to avoid extends
    Avoid multiple open handles to same file at same time on <= Win 7
      Handles collapse if same access mode, share mode, create options, etc.

  SMB1 caches only file attributes, timestamps. and sizes by default
    GetFileAttributes, GetFileSize, GetFileTime
  SMB2 caches directory enumeration too
    adds FindFirstFile/FindNextFile
  Maximize cache use via GetFileInformationByHandle(Ex):
    Only FileBasicInfo, FileStandardInfo, and FileNameInfo are cached
    Cache others in App
    Use on SMB2 only to enumerate directories

Brian Ford
Staff Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...

More information about the Cygwin-developers mailing list