zfs-discuss@opensolaris.org
[Top] [All Lists]

Re: [zfs-discuss] ls -lt for links slower than for regular files

Subject: Re: [zfs-discuss] ls -lt for links slower than for regular files
From: Bob Friesenhahn
Date: Tue, 8 Apr 2008 14:55:47 -0500 CDT
On Tue, 8 Apr 2008, ap60@xxxxxxxxxxxxx wrote:
> a few seconds and the links list in, perhaps, 60 seconds.  Is there a
> difference in what ls has to do when listing links versus listing regular 
> files
> in ZFS that would cause a slowdown?

Since you specified '-t' the links have to be "dereferenced" (find the 
file that is referred to) which results in opening the directory to 
see if the file exists, and what its properties are.  With 50K+ files, 
opening the directory and finding the file will take tangible time. 
If there are multiple directories in the symbolic link path, then 
these directories need to be opened as well.  Symbolic links are not 
free.

More RAM may help if it results in keeping the directory data hot in 
the cache.

If the links were hard links rather than symbolic links, then 
performance will be similar to a regular file (since it is then a 
regular file).

Bob
======================================
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

_______________________________________________
zfs-discuss mailing list
zfs-discuss@xxxxxxxxxxxxxxx
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

<Prev in Thread] Current Thread [Next in Thread>