LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-26-2014, 10:22 AM   #1
Pf945sm
LQ Newbie
 
Registered: Dec 2013
Posts: 11

Rep: Reputation: Disabled
Question NFS write performance drops to a crawl after few seconds and can't be cancelled


Server and clients are Debian Wheezy 7.4, fully updated.

Network is full gigabit, managed HP procurve switches, full cat6 cabling.

The problem with NFS is when I copy a large file to the server the performance starts fast, 980mbit, flat line (I watch this with system monitor). Then it dips for a few seconds, and comes back at 980mbit. It does this once or twice and then it drops to come back at 5mbit, drops, etc. From then on it fluctuates but never exceeds 10 or 12mbit. It takes ages to copy a few gigabyte to the server. This copy job can't be stopped or cancelled, can't even be killed from another terminal with root. Eventually, it finishes.

This same thing happens whether I use dd or rsync to the server. If it's using the NFS share, it shows this behavior.

When I share the same directory using Samba, there is no problem.

When I test with iperf, there's no problem.

I tested using different rsize/wsize values, different clients. All show the same behavior.

I found an interesting article about Broadcom NIC's not offloading properly and using ethtool to enable/disable offloading settings on the NIC. The server has a Realtek NIC but I tried it anyways, different offloading settings but it changed nothing.

When I copy something over Samba, system monitor shows a flat line from beginning to end, at 980mbit. Even files of 10GB or larger doesn't matter. Couple of minutes later its done.

The fact that samba en iperf both work fine from different clients leads me to conclude that all the hardware and config is actually oke, and so is the the disk with the shared directory (same disk for NFS and Samba).

Reading from the server over NFS has no problem. Also, writing to an NFS share from the server on a client has no problem either.

It looks like NFS has a problem in my situation but I can't figure it out. I would really like to use NFS over Samba (which has its own problems), most of my stuff runs Debian, only 1 pc runs Windows. Ironic Samba would work better than NFS ...

I think I need to troubleshoot NFS but I've never debugged NFS so I'm hoping some NFS wizard here can help me troubleshoot this.

Thanks in advance.

Last edited by Pf945sm; 03-26-2014 at 10:25 AM.
 
Old 03-26-2014, 10:34 AM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
How did you create the NFS share? Manually (editing relevant files) or via a tool (like Webmin). Sounds like a config error on your machine, could a simple syntax error somewhere
 
Old 03-26-2014, 10:37 AM   #3
Pf945sm
LQ Newbie
 
Registered: Dec 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Manually added to /etc/exports:

/data 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)
 
Old 03-26-2014, 10:38 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,149

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
How many disks is the NFS share striped over? What speed are they?
 
Old 03-26-2014, 11:22 AM   #5
Pf945sm
LQ Newbie
 
Registered: Dec 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
How many disks is the NFS share striped over? What speed are they?
To test, I have created shares on the SSD (ext4, >400MB/s), regular harddisks with ext3 or ext4 (>100MB/s), stripe sets of 2 or 3 disks with mdadm (200MB/s) or, currently, a 6-disk RAIDZ2 on ZFS (>400MB/s). Either way, performance is always higher than gigabit network, otherwise dd or samba would suffer the same fate. Mind you, after a while into the copy job, performance drops to 5-10mbit.

The problem is not with storage. Locally between volumes I copy with 400-500MB/s, sustained.
 
Old 03-26-2014, 11:59 AM   #6
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
i had to disable sync mode on my nas and had problem solved
 
Old 03-26-2014, 12:27 PM   #7
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,149

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Quote:
Originally Posted by gengisdave View Post
i had to disable sync mode on my nas and had problem solved
Yes. make sure you are exporting and mounting as async or you will get slower performance (although safer). Also check /var/log/syslog for any messages indicating timeouts or deadlocks.
 
Old 03-26-2014, 12:53 PM   #8
Pf945sm
LQ Newbie
 
Registered: Dec 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gengisdave View Post
i had to disable sync mode on my nas and had problem solved
Cool, that fixed it!

I'm stumped though, I'm quite sure I tested that too, its one of the first hits when searching for NFS performance. I must have messed up the testing somehow .
 
  


Reply

Tags
nfs, performance, write



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
NFS I/O slows client to a crawl k-gun12 Linux - Server 1 03-16-2011 01:11 PM
Software Raid 6 - poor read performance / fast write performance Kvothe Linux - Server 0 02-28-2011 03:11 PM
TCP performance drops after upgrading kernel to 2.6.29 aldryk Linux - Networking 5 01-13-2010 08:39 AM
NFS Transfers Bring Everything to a Crawl... sancho Linux - Networking 0 04-12-2008 01:59 PM
Disk IO Performance Drops Off kcusscam Linux - Hardware 1 11-20-2007 10:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:39 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