Bug 241600 - nfs v3 peformance regression
nfs v3 peformance regression
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Layton
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-28 15:29 EDT by Marcus Alves Grando
Modified: 2007-11-16 20:14 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-02 13:12:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Kernel 2.6.9-42.0.10 performance on nfs (2.18 KB, text/plain)
2007-05-28 15:33 EDT, Marcus Alves Grando
no flags Details
Kernel 2.6.9-55 performance on nfs (2.18 KB, text/plain)
2007-05-28 15:35 EDT, Marcus Alves Grando
no flags Details
Nfs tests with 2.6.9-42.0.10.EL (v2) (4.44 KB, text/plain)
2007-06-01 09:46 EDT, Marcus Alves Grando
no flags Details
Nfs tests with 2.6.9-55.4.EL.jtltest.9smp (v2) (4.45 KB, text/plain)
2007-06-01 09:47 EDT, Marcus Alves Grando
no flags Details

  None (edit)
Description Marcus Alves Grando 2007-05-28 15:29:18 EDT
Description of problem:

When i update from AS 4.4 to AS 4.5 my server lost performance in nfs client.

Version-Release number of selected component (if applicable):

kernel-smp-2.6.9-55.EL

How reproducible:

Steps to Reproduce:
1. Boot kernel 2.6.9-55.ELsmp
2. mount nfs server
3. cd <mountpoint> && iozone -i 0 -i 1 -r 32 -s 256m -t 2 -F 1 2
4. See read rasults
5. Boot kernel 2.6.9-42.0.10.ELsmp
6. mount nfs server
7. cd <mountpoint> && iozone -i 0 -i 1 -r 32 -s 256m -t 2 -F 1 2
8. Compare read results on two kernels

Not affected version:

kernel-smp-2.6.9-42.0.10.EL
Comment 1 Marcus Alves Grando 2007-05-28 15:33:07 EDT
Created attachment 155555 [details]
Kernel 2.6.9-42.0.10 performance on nfs
Comment 2 Marcus Alves Grando 2007-05-28 15:35:38 EDT
Created attachment 155556 [details]
Kernel 2.6.9-55 performance on nfs
Comment 3 Jeff Layton 2007-05-30 12:26:12 EDT
There were some substantial changes made to fix problems with cache coherency
between multiple clients in 4.5. Earlier kernels often didnt invalidate the
cache when they should have, so that may account for some of the difference
you're seeing here. If you're able, could you test against the kernels on my
people page?

http://people.redhat.com/jlayton

and post the results here? They have some patches that may help NFS performance.


Comment 4 Marcus Alves Grando 2007-05-30 15:01:33 EDT
Same thing. Another patch or test?

# uname -r
2.6.9-55.4.EL.jtltest.9smp
# iozone -i 0 -i 1 -r 32 -s 256m -t 2 -F 1 2
	Iozone: Performance Test of File I/O
	        Version $Revision: 3.279 $
		Compiled for 32 bit mode.
		Build: linux 
[...]
	Record Size 32 KB
	File size set to 262144 KB
	Command line used: iozone -i 0 -i 1 -r 32 -s 256m -t 2 -F 1 2
	Output is in Kbytes/sec
	Time Resolution = 0.000001 seconds.
	Processor cache size set to 1024 Kbytes.
	Processor cache line size set to 32 bytes.
	File stride size set to 17 * record size.
	Throughput test with 2 processes
	Each process writes a 262144 Kbyte file in 32 Kbyte records
[...]
	Children see throughput for  2 readers 		=   44300.36 KB/sec
	Parent sees throughput for  2 readers 		=   44294.51 KB/sec
	Min throughput per process 			=   22140.38 KB/sec 
	Max throughput per process 			=   22159.97 KB/sec
	Avg throughput per process 			=   22150.18 KB/sec
	Min xfer 					=  261920.00 KB
[...]
#
Comment 5 Jeff Layton 2007-06-01 08:32:33 EDT
I've tried reproducing this here and am not seeing the same degree of
performance degradation that you are. The first 3 passes of that test show
roughly equivalent performance. The last test *does* show a more significant
difference, but I'd sort of expect that since earlier kernels didn't invalidate
the cache when it should have (I'll look closer at that to see if I can verify
what's happening there).

That said, my test rig doesn't have the throughput that yours evidently does. I
can probably get time on one, but it may take me a little while before I can get it.

There's a lot going on in this test, so I think we need to narrow down where the
problem is. I'd be interested to see if you can reproduce this with a simpler
run. Maybe one that just does the initial writing of the file from a single
thread. Do you see the performance differential with that?

Also, when doing these tests, it would be good to also collect "nfsstat -a"
output afterward so we can see whether we have a spike in the number of a
particular call. Unfortunately there's not an easy way to zero out those stats,
so you'll want to reboot, do the test (with with no other traffic to the mount
from the client) and then collect nfsstat afterward as soon as possible.
Comment 6 Jeff Layton 2007-06-01 09:06:40 EDT
For the record, on my test mounting a Linux host with default options. Only
posting the results of the last test since the first tests were already pretty
close:

-42.0.10.EL:

        Children see throughput for 2 re-readers        =   21416.05 KB/sec
        Parent sees throughput for 2 re-readers         =   21327.33 KB/sec
        Min throughput per process                      =    4756.18 KB/sec 
        Max throughput per process                      =   16659.87 KB/sec
        Avg throughput per process                      =   10708.02 KB/sec
        Min xfer                                        =   75200.00 KB

Client nfs v3:
null         getattr      setattr      lookup       access       readlink     
0         0% 22        0% 0         0% 9         0% 16        0% 0         0% 
read         write        create       mkdir        symlink      mknod        
22360    40% 32073    58% 2         0% 0         0% 0         0% 0         0% 
remove       rmdir        rename       link         readdir      readdirplus  
2         0% 0         0% 0         0% 0         0% 0         0% 9         0% 
fsstat       fsinfo       pathconf     commit       
0         0% 1         0% 0         0% 436       0% 

-55.EL:

        Children see throughput for 2 re-readers        =   12078.67 KB/sec
        Parent sees throughput for 2 re-readers         =   12065.85 KB/sec
        Min throughput per process                      =    5420.79 KB/sec 
        Max throughput per process                      =    6657.89 KB/sec
        Avg throughput per process                      =    6039.34 KB/sec
        Min xfer                                        =  213440.00 KB

Client nfs v3:
null         getattr      setattr      lookup       access       readlink     
0         0% 23        0% 0         0% 7         0% 17        0% 0         0% 
read         write        create       mkdir        symlink      mknod        
30152    48% 31385    50% 2         0% 0         0% 0         0% 0         0% 
remove       rmdir        rename       link         readdir      readdirplus  
2         0% 0         0% 0         0% 0         0% 0         0% 9         0% 
fsstat       fsinfo       pathconf     commit       
0         0% 1         0% 0         0% 64        0% 

...so we see a rather large jump in read calls on the newer kernel with this
test, but that doesn't really surprise me since the -55 kernel will invalidate
the cache in more situations than the -42.0.10 kernel did.

Comment 7 Marcus Alves Grando 2007-06-01 09:43:09 EDT
Comment on attachment 155555 [details]
Kernel 2.6.9-42.0.10 performance on nfs

# nfsstat -a
Client packet stats:
packets    udp	      tcp	 tcpconn
0	   0	      0 	 0	 
Client rpc stats:
calls	   retrans    authrefrsh
6	   0	      0       
Client nfs v2:
null	   getattr    setattr	 root	    lookup     readlink   
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 
read	   wrcache    write	 create     remove     rename	  
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 
link	   symlink    mkdir	 rmdir	    readdir    fsstat	  
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 

Client nfs v3:
null	   getattr    setattr	 lookup     access     readlink   
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 
read	   write      create	 mkdir	    symlink    mknod	  
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 
remove	   rmdir      rename	 link	    readdir    readdirplus
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 
fsstat	   fsinfo     pathconf	 commit     
0	0% 6	  100% 0       0% 0	  0% 

# uname -r
2.6.9-42.0.10.ELsmp
# cd /nfs/mail01ns07 ; iozone -i 0 -i 1 -r 32 -s 256m -t 1 -F 1
	Iozone: Performance Test of File I/O
		Version $Revision: 3.279 $
		Compiled for 32 bit mode.
		Build: linux 

	Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
		     Al Slater, Scott Rhine, Mike Wisner, Ken Goss
		     Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
		     Randy Dunlap, Mark Montague, Dan Million, 
		     Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy,
		     Erik Habbinga, Kris Strecker, Walter Wong.

	Run began: Fri Jun  1 10:35:07 2007

	Record Size 32 KB
	File size set to 262144 KB
	Command line used: iozone -i 0 -i 1 -r 32 -s 256m -t 1 -F 1
	Output is in Kbytes/sec
	Time Resolution = 0.000001 seconds.
	Processor cache size set to 1024 Kbytes.
	Processor cache line size set to 32 bytes.
	File stride size set to 17 * record size.
	Throughput test with 1 process
	Each process writes a 262144 Kbyte file in 32 Kbyte records

	Children see throughput for  1 initial writers	=  575368.06 KB/sec
	Parent sees throughput for  1 initial writers	=   56815.93 KB/sec
	Min throughput per process			=  575368.06 KB/sec 
	Max throughput per process			=  575368.06 KB/sec
	Avg throughput per process			=  575368.06 KB/sec
	Min xfer					=  262144.00 KB

	Children see throughput for  1 rewriters	=  607398.19 KB/sec
	Parent sees throughput for  1 rewriters 	=   63355.92 KB/sec
	Min throughput per process			=  607398.19 KB/sec 
	Max throughput per process			=  607398.19 KB/sec
	Avg throughput per process			=  607398.19 KB/sec
	Min xfer					=  262144.00 KB

	Children see throughput for  1 readers		= 1184595.88 KB/sec
	Parent sees throughput for  1 readers		= 1182239.54 KB/sec
	Min throughput per process			= 1184595.88 KB/sec 
	Max throughput per process			= 1184595.88 KB/sec
	Avg throughput per process			= 1184595.88 KB/sec
	Min xfer					=  262144.00 KB

	Children see throughput for 1 re-readers	= 1198585.88 KB/sec
	Parent sees throughput for 1 re-readers 	= 1186440.93 KB/sec
	Min throughput per process			= 1198585.88 KB/sec 
	Max throughput per process			= 1198585.88 KB/sec
	Avg throughput per process			= 1198585.88 KB/sec
	Min xfer					=  262144.00 KB



iozone test complete.
# nfsstat -a
Client packet stats:
packets    udp	      tcp	 tcpconn
0	   0	      0 	 0	 
Client rpc stats:
calls	   retrans    authrefrsh
16411	   0	      0       
Client nfs v2:
null	   getattr    setattr	 root	    lookup     readlink   
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 
read	   wrcache    write	 create     remove     rename	  
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 
link	   symlink    mkdir	 rmdir	    readdir    fsstat	  
0	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 

Client nfs v3:
null	   getattr    setattr	 lookup     access     readlink   
0	0% 9	   0% 0       0% 4	 0% 4	    0% 0       0% 
read	   write      create	 mkdir	    symlink    mknod	  
0	0% 16384  99% 1       0% 0	 0% 0	    0% 0       0% 
remove	   rmdir      rename	 link	    readdir    readdirplus
1	0% 0	   0% 0       0% 0	 0% 0	    0% 0       0% 
fsstat	   fsinfo     pathconf	 commit     
0	0% 6	   0% 0       0% 2	 0%
Comment 8 Marcus Alves Grando 2007-06-01 09:46:29 EDT
Created attachment 155877 [details]
Nfs tests with 2.6.9-42.0.10.EL (v2)
Comment 9 Marcus Alves Grando 2007-06-01 09:47:36 EDT
Created attachment 155878 [details]
Nfs tests with 2.6.9-55.4.EL.jtltest.9smp (v2)
Comment 10 Marcus Alves Grando 2007-06-01 09:51:08 EDT
New tests attached, now i test with 1 thread only. One think that i see is:

* New kernel
read       write
8194   33% 16390  66%

* Old kernel
read       write
0       0% 16384  99%
Comment 11 Jeff Layton 2007-06-01 10:26:48 EDT
Again, that test makes it very difficult to see what's happening. We see some
extra reads, but in which phase of the test were they incurred? We can't tell
from this. I'd like to focus for now on the first phase of the test (initial write).

One thing that would help is specifying -i 0 only (without -i 1) so we get rid
of the read/reread test for now. Since the "initial writers" test shows a
performance delta in your setup, I'd be interested to see if we're incurring
extra read calls with the new kernel with just an -i 0 test.

Unfortunately it looks like -i0 still does the "rewrite" test. It would be ideal
to just do the "initial write" test, but I'm not sure how to do that with iozone.

Also, could you let me know exactly what mount options you're using and some
info about what sort of server this is?
Comment 12 Marcus Alves Grando 2007-06-01 11:06:03 EDT
Well, after you say about more invalidade caches i test performance with another
tool, a personal tool that simulate email IO in nfs server. My nfs server is one
EMC NS700 and i can see same performance with the new kernel and the old kernel.
I test only read yet and i'll test write too later.

My mount options are:
rw,noexec,nfsvers=3,proto=tcp,intr,nolock,rsize=32768,wsize=32768

Now i suspect that's not a bug, and what i see are old performance because
caches in iozone tests.

I'll test more...
Comment 13 Jeff Layton 2007-06-01 11:30:27 EDT
Thanks, let me know what you find...

While I'd expect a bit of performance degradation in some situations with the
new kernel, it's certainly possible that there are performance impacting bugs in
there as well. The trick is to narrow down the reproducer as much as possible so
that we can definitively figure out why one is slower than the other for a
particular test.
Comment 14 Jeff Layton 2007-06-04 09:22:53 EDT
Setting to NEEDINFO reporter to await Marcus' testing...
Comment 15 Jeff Layton 2007-07-02 13:12:14 EDT
No response to this for some time. Closing as NOTABUG. Please reopen if you have
further info.

Note You need to log in before you can comment on or make changes to this bug.