LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NFS mounted file system takes a LONG time to search (https://www.linuxquestions.org/questions/linux-server-73/nfs-mounted-file-system-takes-a-long-time-to-search-4175625275/)

mfoley 03-09-2018 01:26 PM

NFS mounted file system takes a LONG time to search
 
I have an NFS mounted file system. In one directory on this mount there are over 47,000 files. Searching for a file on the NFS server using 'find' takes about 0.2 seconds. Searching for this same file on the NFS client computer using the same 'find' command takes 15+ minutes.

When I run 'iftop' on the NFS Server it is only showing a throughput of about 180kb with the client computer, even though this interface is 1Gb.

I'm at a loss as to what is going on. Why is the network interface so slow?

Slackware64 14.2

ferrari 03-10-2018 08:31 PM

I'd be checking the MTU and rsize settings perhaps. Review these guides
https://cromwell-intl.com/open-sourc...uning/nfs.html
https://www.cyberciti.biz/faq/linux-...t-performance/

mfoley 03-11-2018 02:06 PM

After running various experiments from other hosts with this same file system NFS mounted, I've concluded that it's not NFS at all. Rather, it turns out to be the DirectoryScanner class in Java just takes a long time when traversing a directory with 47,000+ files. I've solved the problem by creating an index of that directory every several minutes and modifying the java/jsp program to search the index instead. So, I blamed poor 'ole NFS for no reason!

dave@burn-it.co.uk 03-16-2018 10:32 AM

A local search will always be faster than a remote search because -as a minimum - the indexes have to be transferred. This can be particularly noticeable over a network.


All times are GMT -5. The time now is 04:28 AM.