LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-09-2018, 01:26 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
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
 
Old 03-10-2018, 08:31 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,790

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
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/
 
Old 03-11-2018, 02:06 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
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!
 
Old 03-16-2018, 10:32 AM   #4
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
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.
 
  


Reply

Tags
network, nfs, speed


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian 9 system takes a long time to shut down shivkiyer Linux - General 11 01-19-2018 02:44 PM
close() system call takes long time to finish tullo Linux - Kernel 9 03-21-2016 04:02 AM
fclose() operation takes very long time to execute on ext4 file system rudreshsm Linux - Kernel 4 09-13-2012 08:31 AM
Why it takes a long time to delete a file? slackmate Slackware 7 03-06-2010 07:41 PM
Why does File Search takes so long ? tostado Linux - Software 2 09-24-2002 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration