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 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
> it opens it with READ_CONTROL | FILE_READ_ATTRIBUTES.
> 
> This improved the performance of stat significally, without changing
> the behaviour.
> 
> FROM:
> /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

-- 
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]