Re: slow ls -l -- could use a little help to finish this one up

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

 



> [ ... ]  "ls -f"?  That just reads the directory files raw,
> and it is "supposed" to be faster in many cases. [ ... ]

Whether it is 'raw' or not, it does not 'stat' the inodes
pointed at by directory entries, so avoids that particularly
expensive operation.

In that it is not that different from 'ls' without '-l', except
that on many systems the string "ls" is an alias for "ls -l", so
to do 'ls' without '-l' one should type '/bin/ls' or '\ls'. That
aliasing is particularly terrible for filesystems like Lustre
for which 'stat' implies a network roundtrip BTW.

In the present case it is more interesting to compare '/bin/ls',
'/bin/ls -l -n' and '/bin/ls -l', in particular because the '-n'
option avoids the uid-username lookup that seems to be slow.

Try using 'ltrace -T -e __lxstat,readdir,getpwuid /bin/ls ...'
to see what is going on with the various options.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux