NFS Mounted file server slow
by ahs480 from LinuxQuestions.org on (#4Z7VD)
There is a home file server for users and that is NFS mounted on many client servers on the network. All servers are running CentOS 6.
Users login to these client servers(eg. server-19) where the file server(file_server) is mounted and is the default home directory when users SSH.
Code:[ad@server-19 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Root_VG-Root
438G 49G 367G 12% /
tmpfs 63G 0 63G 0% /dev/shm
/dev/sda1 870M 111M 715M 14% /boot
file_server:/export/group
64T 60T 4.0T 94% /home/group (mounted fileserver)The default home directory for all users is: /home/group/<username>
A basic "ls" command takes time. For example, to create a file, "test.txt" took nearly 18s and once 1.8s for "xyz.txt" as shown below:
Code:$ time touch ~/test.txt
real 0m18.868s <--(very slow)
user 0m0.002s
sys 0m0.002s
$ time touch ~/xyz.txt
real 0m1.843s <--(slow)
user 0m0.001s
sys 0m0.001s
I think the network seems fine as I am able to ping, verify the date and other local commands without any delays.
Code:$ time date && time ping -c 4 www.google.com && time date
Mon Feb 11 14:22:20 EST 2020
real 0m0.003s <--(It's fast)
user 0m0.001s
sys 0m0.003s
PING www.google.com (172.217.12.132) 56(84) bytes of data.
64 bytes from lga34s19-in-f4.1e100.net (172.217.12.132): icmp_seq=1 ttl=55 time=1.17 ms
64 bytes from lga34s19-in-f4.1e100.net (172.217.12.132): icmp_seq=2 ttl=55 time=1.05 ms
64 bytes from lga34s19-in-f4.1e100.net (172.217.12.132): icmp_seq=3 ttl=55 time=1.06 ms
64 bytes from lga34s19-in-f4.1e100.net (172.217.12.132): icmp_seq=4 ttl=55 time=1.07 ms
--- www.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 1.056/1.092/1.176/0.054 ms
real 0m3.012s <--(It's fast)
user 0m0.002s
sys 0m0.001s
Mon Feb 11 14:22:23 EST 2020
real 0m0.002s <--(It's fast)
user 0m0.000s
sys 0m0.001s
What is causing the file server to slow?


Users login to these client servers(eg. server-19) where the file server(file_server) is mounted and is the default home directory when users SSH.
Code:[ad@server-19 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Root_VG-Root
438G 49G 367G 12% /
tmpfs 63G 0 63G 0% /dev/shm
/dev/sda1 870M 111M 715M 14% /boot
file_server:/export/group
64T 60T 4.0T 94% /home/group (mounted fileserver)The default home directory for all users is: /home/group/<username>
A basic "ls" command takes time. For example, to create a file, "test.txt" took nearly 18s and once 1.8s for "xyz.txt" as shown below:
Code:$ time touch ~/test.txt
real 0m18.868s <--(very slow)
user 0m0.002s
sys 0m0.002s
$ time touch ~/xyz.txt
real 0m1.843s <--(slow)
user 0m0.001s
sys 0m0.001s
I think the network seems fine as I am able to ping, verify the date and other local commands without any delays.
Code:$ time date && time ping -c 4 www.google.com && time date
Mon Feb 11 14:22:20 EST 2020
real 0m0.003s <--(It's fast)
user 0m0.001s
sys 0m0.003s
PING www.google.com (172.217.12.132) 56(84) bytes of data.
64 bytes from lga34s19-in-f4.1e100.net (172.217.12.132): icmp_seq=1 ttl=55 time=1.17 ms
64 bytes from lga34s19-in-f4.1e100.net (172.217.12.132): icmp_seq=2 ttl=55 time=1.05 ms
64 bytes from lga34s19-in-f4.1e100.net (172.217.12.132): icmp_seq=3 ttl=55 time=1.06 ms
64 bytes from lga34s19-in-f4.1e100.net (172.217.12.132): icmp_seq=4 ttl=55 time=1.07 ms
--- www.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 1.056/1.092/1.176/0.054 ms
real 0m3.012s <--(It's fast)
user 0m0.002s
sys 0m0.001s
Mon Feb 11 14:22:23 EST 2020
real 0m0.002s <--(It's fast)
user 0m0.000s
sys 0m0.001s
What is causing the file server to slow?