bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Speeding up GNU tar file I/O ?


From: Kaveh R. Ghazi
Subject: Re: [Bug-tar] Speeding up GNU tar file I/O ?
Date: Sun, 22 Jan 2006 10:57:32 -0500 (EST)

 > > Could the chdir machanism I described above be considered instead?
 > 
 > A reasonable suggestion, but these days it might be better to use
 > openat instead of chdir.  That is what CVS coreutils is doing.  (It
 > uses some new gnulib code to port to systems that lack openat.)
 > 
 > openat is currently only available in recent-enough versions of glibc
 > and Solaris, so the code is a bit slower elsewhere, but the difference
 > is not great and I don't think we need to worry overmuch about
 > performance on older systems.

I know about openat, but solaris2.7 doesn't have it.  So while it may
speed up a modern system, those systems usually do a better job of
caching these long pathname directory lookups anyway.  It doesn't
solve my problem on solaris2.7 and openat doesn't work on my current
linux box either.

The fallback implementation of openat that I saw in coreutils uses
fchdir to simulate the parent directory file descriptor argument to
openat.  It jumps through hoops to save the CWD and restore it.  So
you're adding several extra system calls for each fake openat.  It
would be just as slow or most likely slower than the current mechanism
for those platforms without a native openat.

I'll try to measure the difference of chdir using star and see how big
it is on older boxes.

                --Kaveh
--
Kaveh R. Ghazi                  address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]