This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Oct  7 15:42, Brian Ford wrote:
> I'm not exactly an executive, so it took me a while ;-).  Here's my best
> shot:

Thanks!

> I/O
>   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.
> 
> Metadata
>   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

This is an interesting point, though I'm not sure I understand it
correctly. 

IIUC, I make maximum use of metadata caching by using the
GetFileInformationByHandleEx aka NtQueryInformationFile function.  And
the cached information is only one of the aforementioned info classes.
That means, *if* QFI is used, there's no hit to ask for the
NumberOfLinks info.  OTOH, the FileId info is not cached.  That's kind
of annoying.

However, it's quite clear that you have to open the file anyway
if you need all info.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]