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

Corinna Vinschen
Thu Oct 7 10:58:00 GMT 2010

On Oct  7 08:51, Yoni Londner wrote:
> Hi,
> Attached is a patch on symlink_info::check.
> I changed symlink_info::check so it will create a file handle with
> GENERIC_READ permissions only when it needs it. in all other cases
> This improved the performance of stat significally, without changing
> the behaviour.
> /bin$ time ls -l > /dev/null
> real    0m3.875s
> user    0m0.108s
> sys     0m0.452s
> TO:
> /bin$ time ls -l > /dev/null
> real    0m0.562s
> user    0m0.171s
> sys     0m0.296s

I still suspect that you have some different trouble on your machine.

Yes, opening files without FILE_READ_DATA (or GENERIC_READ) might be
actually faster and opening files always with GENERIC_READ in the first
place might have been a bad idea.

But a slow down by a factor of 6 is something I can't reproduce at all.
Neither on XP nor on W7.

Anyway, I relent.  Your patch is not complete, though.  It's not only
missing a ChangeLog entry (*frown*), it's also not taking the file read
in fhandler_base::fstat_helper in the noacl case into account.  This
read needs the GENERIC_READ flag.  However, the GENERIC_READ flag is now
only set for two types of symlinks.  That's unfortunately exactly the
case which does not need the GENERIC_READ in fstat_helper since symlinks
are never read there.  This in turn means, we always have to open the
file in that case, not only when called from fstat.

So, I'll come up with another patch in a few hours, which takes that
into account.  It also seems that the "access" flag in conv_hdl isn't
required at all.  I'll also drop that and just keep the handle (and the
file info, of course).

Oh and, *please*, stop top posting and full quoting.  It's really not
required to keep all the ballast.  That's what the mailing list archive
is for.  Thank you.


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

More information about the Cygwin-developers mailing list