LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2008, 07:49 AM   #1
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Rep: Reputation: 37
NFS a little slow to mount


Hello everyone,

I have a question about NFS running on my two Ubuntu systems.

When I mount an NFS export from the NFS server, initially the mount takes 30 seconds before it is mounted.

Of course once mounted, things are fine, I can copy large files no problem and the speeds are acceptable.

My question is, why does the mount itself take so long to process?

The export on the NFS server looks something like this:

/media/hdc1 192.168.0.1(rw,no_root_squash,async)
 
Old 03-31-2008, 11:08 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
It depends how large is NFS export and how fast is connection.Maybe mounting automaticly on boot would get it faster.
 
Old 03-31-2008, 11:19 AM   #3
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,828

Rep: Reputation: 256Reputation: 256Reputation: 256
nfs is tricky. Sometimes it mounts right away, and other times it waits.
 
Old 03-31-2008, 12:26 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Do you have portmap running on both the NFS client machine and the server?
 
Old 03-31-2008, 08:26 PM   #5
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Original Poster
Rep: Reputation: 37
Quote:
It depends how large is NFS export and how fast is connection.Maybe mounting automaticly on boot would get it faster.
The NFS Export is about 17Gb of data. The connection is over gigabit ethernet LAN.

I have not tried putting an entry in the fstab of the client to auto-mount on boot.

Quote:
Do you have portmap running on both the NFS client machine and the server?
Not sure.

Last edited by greengrocer; 03-31-2008 at 08:54 PM.
 
Old 03-31-2008, 10:52 PM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,149

Rep: Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203
Lightbulb

The only way to definitively resolve such problems is to watch the connection with a packet-sniffer like ethereal. But if you're getting a 30-second (or similar) delay, there's a very good chance that it's a timeout.

Here's one thing to check: what does /etc/resolv.conf say?

Let's say that it contains something like this:
Code:
search foobar.myhost.net
nameserver 111.112.113.114
nameserver 221.222.223.224
Okay, then, try this command-line command: dig@111.112.113.114 your_nfs_host

Does it reply instantly, or does it wait ... say ... 30 seconds?

If so, your computer might be posting a request to the first nameserver, then waiting a long time before trying the second one. A classic "timeout."

You're looking for something like that. Whenever a computer waits, not only for a "human-noticeable" amount of time but a "human-annoying" amount of time, it is probably ... as the thespians among us would instantly grok ... "waiting for Godot."
 
Old 04-01-2008, 06:59 AM   #7
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Original Poster
Rep: Reputation: 37
dig@<ip address of router> results in bash command not found.

But I can give some ping statistics:

64 bytes from 192.168.x.x: icmp_seq=1 ttl=255 time=0.763 ms
64 bytes from 192.168.x.x: icmp_seq=2 ttl=255 time=0.738 ms
64 bytes from 192.168.x.x: icmp_seq=3 ttl=255 time=0.768 ms
64 bytes from 192.168.x.x: icmp_seq=4 ttl=255 time=0.929 ms
64 bytes from 192.168.x.x: icmp_seq=5 ttl=255 time=4.10 ms
64 bytes from 192.168.x.x: icmp_seq=6 ttl=255 time=6.77 ms
64 bytes from 192.168.x.x: icmp_seq=7 ttl=255 time=0.740 ms
64 bytes from 192.168.x.x: icmp_seq=8 ttl=255 time=0.734 ms
64 bytes from 192.168.x.x: icmp_seq=9 ttl=255 time=0.735 ms
64 bytes from 192.168.x.x: icmp_seq=10 ttl=255 time=0.732 ms
64 bytes from 192.168.x.x: icmp_seq=11 ttl=255 time=0.730 ms
64 bytes from 192.168.x.x: icmp_seq=12 ttl=255 time=0.740 ms
64 bytes from 192.168.x.x: icmp_seq=13 ttl=255 time=6.02 ms
64 bytes from 192.168.x.x: icmp_seq=14 ttl=255 time=1.95 ms
64 bytes from 192.168.x.x: icmp_seq=15 ttl=255 time=0.729 ms

Which look quick enough to me.

And as I said, once the nfs resource is mounted on the client, then file transfers are quick. I can stream video across the network smoothly etc.

Last edited by greengrocer; 04-01-2008 at 07:02 AM.
 
Old 04-01-2008, 07:12 AM   #8
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Original Poster
Rep: Reputation: 37
Quote:
Do you have portmap running on both the NFS client machine and the server?
Hey thanks for the suggestion.

I installed portmap on the client

Code:
sudo apt-get install portmap
The portmap daemon was started automatically and i did:

Code:
 mount 192.168.x.x:/media/foo /media/foo
and the NFS export was mounted within about 2 seconds. A rather large improvement

Many thanks to you Hangdog42
 
Old 04-01-2008, 08:12 AM   #9
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
I've learned that one the hard way myself. Glad that was all it was.
 
  


Reply


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
Slow NFS Mount between Gentoo & FreeBSD Gsee Linux - Networking 3 10-23-2006 05:34 PM
Extremely slow mount times for NFS wayloud Linux - Networking 2 06-04-2005 01:58 AM
Slow NFS mount, server questions dezza Linux - Networking 1 11-17-2004 03:49 AM
NFS mount very slow Toxe Linux - Networking 5 10-25-2004 11:26 AM
What would make an NFS mount EXTREMELY slow ? lostboy Linux - General 3 06-17-2004 10:20 PM


All times are GMT -5. The time now is 03:47 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration