Fastest security check of file tree on NFS

Posted by fungs on Server Fault See other posts from Server Fault or by fungs
Published on 2012-06-05T13:32:59Z Indexed on 2012/06/05 16:42 UTC
Read the original article Hit count: 184

Filed under:
|
|

I am currently experiencing very bad performance using the following on an NFS network folder:

time find . | while read f; do test -L "$f" && f=$(readlink -m $f); grp="$(stat -c %G $f)"; perm="$(stat -c %A $f)"; done

Question 1) Within the loop permissions are checked using the variables grp and perm. Is there a way to lower the amount of disc I/O for these kind of checks over the network (e.g. read all meta data at once using find)?

Question 2) It seems like the NFS isn't tuned very well, the same operation on a similar network link via SSHFS take only one third of the time. All parameters are auto-negotiated. Any suggestions?

© Server Fault or respective owner

Related posts about permissions

Related posts about nfs