Linux NFS development
 help / color / mirror / Atom feed
* nfs performance problem
@ 2002-11-05 18:03 poczta.dotcom.pl
  2002-11-05 19:17 ` Ragnar Kjørstad
  0 siblings, 1 reply; 27+ messages in thread
From: poczta.dotcom.pl @ 2002-11-05 18:03 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

Hi All

I have really slow working nfs.
Server is build on:
- dual pentium Xeon 2GHz,
- 2 3ware 7500 controllers,
- raid 5 on 7 160GB discs on controler 1 
- raid 5 on 6 160GB disks on cotroller 2 

Serwer is used for ~500k maildirs, 
all clients (~20) are freebsd boxes, when nfs transfer is around 1MB/s for writing and 1.5MB/s for reading 
listing user directories even with very few file stakes up to 15 seconds.

I tried nfs-ALL patch, but it didn' t help.

I run 256 nfs daemons,

echo 2097152 > /proc/sys/net/core/rmem_max
echo 2097152 > /proc/sys/net/core/rmem_default


nsfstat output:

Server rpc stats:
calls      badcalls   badauth    badclnt    xdrcall
25271043   17885061   0          17885061   0

Server nfs v3:
null       getattr    setattr    lookup     access     readlink
25      0% 1159    0% 89718   0% 11702395 46% 10953437 43% 34868   0%
read       write      create     mkdir      symlink    mknod
925727  3% 226250  0% 44964   0% 1089    0% 2299    0% 0       0%
remove     rmdir      rename     link       readdir    readdirplus
35040   0% 42      0% 121064  0% 535     0% 534720  2% 0       0%
fsstat     fsinfo     pathconf   commit
585179  2% 36      0% 0       0% 12493   0%

mount over tcp gives frequent errors on freebsd clients side:
kernel: nfs send error 32 from nfs server xxx.xxx.xxx.xxx:/export

thanks for any help, 

rafal


[-- Attachment #2: Type: text/html, Size: 3748 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread
* RE: nfs performance problem
@ 2002-11-05 20:56 Lever, Charles
  0 siblings, 0 replies; 27+ messages in thread
From: Lever, Charles @ 2002-11-05 20:56 UTC (permalink / raw)
  To: 'Matt Heaton'; +Cc: nfs

> Cachefs will help quite a lot in my opinion because it 
> doesn't just store
> the files in RAM,
> it uses the hard drive.  So if you have an NFS client with an 
> extra 5 gig
> that you can
> designate as cache then reads to the NFS server will go down 
> DRAMATICALLY as
> it will hit local cache on the NFS clients drive.

yes, that's true, until you consider that without something
like v4 delegation, the client still has to contact the server
to keep its cache up to date.

matt, you really do want a faster server in this case.


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 27+ messages in thread
* RE: nfs performance problem
@ 2002-11-05 22:09 Lever, Charles
  0 siblings, 0 replies; 27+ messages in thread
From: Lever, Charles @ 2002-11-05 22:09 UTC (permalink / raw)
  To: nfs; +Cc: 'Benjamin LaHaise'

> On a side note, make sure you have the filesystem mounted 
> with the noatime flag if you can afford losing atimes.

to be scrupulously clear, that's on the server side, not on
the client side.  the NFS client ignores the "noatime" mount
option, since file access timestamps are managed on the server.


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: nfs performance problem
@ 2002-11-06 17:08 pwitting
  0 siblings, 0 replies; 27+ messages in thread
From: pwitting @ 2002-11-06 17:08 UTC (permalink / raw)
  To: nfs

> From: =?iso-8859-1?Q?Ragnar_Kj=F8rstad?= <nfs@ragnark.vestdata.no>
> On Tue, Nov 05, 2002 at 08:55:41PM +0100, poczta.dotcom.pl wrote:
> > > How is local performance?

> > local read/writes are ok

> > > What filesystem do you use?

> > reiserfs on top of lvm (to be able to get snapshots)

I'm just going to throw my two cents in here. It sounds like the box is
getting a lot of random IO (~500k maildirs) which means he is most likely
seeing a LOT of seek issues, and RAID 5 is probably a really bad choice.
Cheap controllers and fast RAID 5 just don't go together, there's too much
math going on (the parity bit moves, remember) Matt, you really need to
trust the folks on the list on this and try it. You'll lose some capacity
(drop from 800GB to 480GB per array), but hopefully the performance boost
will be worth it.

Now, on the plus side, you're already using LVM, so I have a better idea
than RAID 1+0 for your situation. Build six RAID 1 arrays, then use LVM to
create a single logical volume out of the group. The randomness should
ensure that if your server receives 4 simultaneous read/write requests, they
will each have their own "spindle", an there will be no performance robbing
back and forth seeking, meaning the requests get handled faster, meaning
there's less chance for the system to start thrashing with seek requests.

I usually think of each RAID volume as a "virtual spindle", capable of
handling 1 request at a time. While each individual transaction might be
slower, (no striping to speed things up) there's six lanes to handle the
requests. Server thinking versus Workstation thinking.

Hopefully you can experiment with this, If this things production already it
may be too late.


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: nfs performance problem
@ 2002-11-07 15:19 Baker, Byran
  2002-11-07 15:49 ` Matt Heaton
  2002-11-07 17:32 ` Ragnar Kjørstad
  0 siblings, 2 replies; 27+ messages in thread
From: Baker, Byran @ 2002-11-07 15:19 UTC (permalink / raw)
  To: 'nfs@lists.sourceforge.net'

We have a couple of NFS servers with 3ware cards.  One is a 3ware 7850 (8
Maxtor 160GB - 5400RPM) and one is a 3ware 7500-12, both configured with
RAID 5 + Hot Spare.  I have all the latest NFS patches applied.  If I access
an NFS mounted directory on one of these systems and copy a bunch of little
files (1-2KB), I get 150-250 tps.  If I access larger files (90% > 1MB each)
I will normally see 25-60MB/s transfer with 500-700 tps, with peaks of over
1000 tps - A good indication that disk seek is to blame for the problem with
the small files.

Thanks,
-Byran

From: "Matt Heaton" <admin@0catch.com>
To: "poczta.dotcom.pl" <myciel@dotcom.pl>,
	<nfs@lists.sourceforge.net>
Subject: Re: [NFS] nfs performance problem
Date: Tue, 5 Nov 2002 13:22:25 -0700

I have 3ware cards as well (2 7500 Series 8 drive), just like yours.  ALso
with 120 GIG drives (7200)
RPM.  Whever I get 150-200 tps in iostat then my NFS runs SO SLOW.  I also
only get 1 MB, to 1.5 MB
over NFS.  The local speed seems to be ok, not great though.   MY OPINION is
that this is because of seek time on the raid
array.   I am serving very small files, just like you are.  I am requesting
about 200-300 files per second from
each NFS server.  So even though our throughput of only 1.5 MB isn't high.
The number of files per second is
actually quite high, and causes things to slow down because of seek time
issues.  PLEASE GIVE US CACHEFS SOMEONE??

Does anyone have experience with IDE Raid arrays that get over 250 tps in
iostat that work fine?  I would
be VERY VERY VERY interested to find out.

L8r...

Matt


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 27+ messages in thread
* nfs performance problem
@ 2007-10-25 13:10 Andreas Schuldei
  2007-10-25 13:53 ` Bernd Schubert
  2007-10-25 15:25 ` Chuck Lever
  0 siblings, 2 replies; 27+ messages in thread
From: Andreas Schuldei @ 2007-10-25 13:10 UTC (permalink / raw)
  To: nfs

Hi!

I need to tune a nfs server and client. on the server we have
several Tbyte of ~2Mbyte files and we need to transfer them read
only to the client. latency and throughput are crucial.

What nfs server should i use? i started with the
nfs-kernel-server on top of a kernel 2.6.22 on debian on the
server side. the client is a debian etch server (2.6.18 kernel)
with 1Gbyte e1000 intel network driver. later on we consider two
network cards on both machines to transfer 2Gbit/s. Jumboframes
are an option (how much will they help?)

Right now i have only four disks in the server and i get 50Mbyte
out of each of them, simultaniously, for real world loads (random
reads across the disk, trying to minimizing the seeks by reading
the files in one go with

for i in a b h i ; do ( find /var/disks/sd$i -type f | xargs -I=B0 dd if=3D=
=B0 bs=3D2M of=3D/dev/null status=3Dnoxfer 2>/dev/null & ) ; done

so with this (4*50 Mbyte/s) i should be able to saturate both
network cards.

accessing the disks with apache2-mpm-worker we get ~90Mbyte/s out
of the server, partly with considerable latency in the order of
magnitude of 10s.

I was hoping to get at least the same performance with much
better latency with nfs.

on the server i start 128 nfs servers (RPCNFSDCOUNT=3D128) and export
the disks like this:

/usr/sbin/exportfs -v
/var/disks/sda <world>(ro,async,wdelay,root_squash,no_subtree_check,anonuid=
=3D65534,anongid=3D65534)
/var/disks/sdb <world>(ro,async,wdelay,root_squash,no_subtree_check,anonuid=
=3D65534,anongid=3D65534)
/var/disks/sdh <world>(ro,async,wdelay,root_squash,no_subtree_check,anonuid=
=3D65534,anongid=3D65534)
/var/disks/sdi <world>(ro,async,wdelay,root_squash,no_subtree_check,anonuid=
=3D65534,anongid=3D65534)


on the client i mount them like this:

lotta:/var/disks/sda on /var/disks/sda type nfs (ro,hard,intr,proto=3Dtcp,r=
size=3D32k,addr=3D217.213.5.44)
lotta:/var/disks/sdb on /var/disks/sdb type nfs (ro,hard,intr,proto=3Dtcp,r=
size=3D32k,addr=3D217.213.5.44)
lotta:/var/disks/sdh on /var/disks/sdh type nfs (ro,hard,intr,proto=3Dtcp,r=
size=3D32k,addr=3D217.213.5.44)
lotta:/var/disks/sdi on /var/disks/sdi type nfs (ro,hard,intr,proto=3Dtcp,r=
size=3D32k,addr=3D217.213.5.44)

but when i then do the same dd again on the client i get
disappointing 60-70Mbyte/s altogether. from a single disk i get
~25Mbytes/s on the client side.

i played with some buffers /proc/sys/net/core/rmem_max and
/proc/sys/net/core/rmem_default and increased them to 256M on the
client.

i was suspecting that the nfs server reads the files in too small
chunks and tried to help it with =


for i in a  h i  ; do ( echo $((1024*6)) > /sys/block/sd$i/queue/read_ahead=
_kb ) ; done

to get it to read in the files in one go.

I would hope to at least double the speed. do
you have a benchmark tool that can tell me the latency? i tried
iozone and tried forcing it to only do read tests and did not get
any helpfull error or output at all. =



on the server:

nfsstat
Server rpc stats:
calls      badcalls   badauth    badclnt    xdrcall
98188885   0          0          0          0

Server nfs v3:
null         getattr      setattr      lookup       access       readlink
5599      0% 318417    0% 160       0% 132643    0% 227130    0% 0         =
0%
read         write        create       mkdir        symlink      mknod
97256921 99% 118313    0% 168       0% 0         0% 0         0% 0         =
0%
remove       rmdir        rename       link         readdir      readdirplus
162       0% 0         0% 0         0% 0         0% 0         0% 105556    =
0%
fsstat       fsinfo       pathconf     commit
0         0% 1270      0% 0         0% 7153      0%



cat /proc/net/rpc/nfsd
rc 0 118803 98069945
fh 0 0 0 0 0
io 3253902194 38428672
th 128 10156908 1462.848 365.212 302.100 252.204 311.632 187.508 142.708 14=
2.132 198.168 648.640
ra 256 97097262 0 0 0 0 0 0 0 0 0 64684
net 98188985 16 98188854 5619
rpc 98188885 0 0 0 0
proc2 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
proc3 22 5599 318417 160 132643 227130 0 97256921 118313 168 0 0 0 162 0 0 =
0 0 105556 0 1270 0 7153
proc4 2 0 0
proc4ops 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0=
 0 0 0 0 0 0 0 0






-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: nfs performance problem
@ 2007-10-25 14:39 Andreas Schuldei
  0 siblings, 0 replies; 27+ messages in thread
From: Andreas Schuldei @ 2007-10-25 14:39 UTC (permalink / raw)
  To: Bernd Schubert; +Cc: nfs

* Bernd Schubert (bernd-schubert@gmx.de) [071025 15:54]:
> Hello Andreas,
> 
> On Thursday 25 October 2007 15:10:29 Andreas Schuldei wrote:
> > lotta:/var/disks/sda on /var/disks/sda type nfs
> > (ro,hard,intr,proto=tcp,rsize=32k,addr=217.213.5.44) lotta:/var/disks/sdb
> 
> try to increase rsize and wsize as much as possible, the maximum can be 
> adjusted in /proc/fs/nfsd/max_block_size on the nfs server.

the with a max_block_size and rsize=512k i did not achive a noticable performance impact.
increasing it to 2M decreased the performance to 12-12Mbytes/s per disk. do i need to adjust more 
tuneables to benefit from the increased size?


> > i was suspecting that the nfs server reads the files in too small
> > chunks and tried to help it with
> >
> > for i in a  h i  ; do ( echo $((1024*6)) >
> > /sys/block/sd$i/queue/read_ahead_kb ) ; done
> 
> Are your partitions on lvm or md? This wouldn't help then, AFAIK for lvm you 
> can't do it via /sys, but must always use blockdev

they are on xfs directly on disk, no lvm or md involved.

> > to get it to read in the files in one go.
> >
> > I would hope to at least double the speed. do
> > you have a benchmark tool that can tell me the latency? i tried
> > iozone and tried forcing it to only do read tests and did not get
> > any helpfull error or output at all.
> 
> First of all, what is you *local* performance?

i mentioned that i get 50Mbyte/s out of each disk, even
when doing the dd on all four disks at the same time.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2007-10-29 13:01 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-05 18:03 nfs performance problem poczta.dotcom.pl
2002-11-05 19:17 ` Ragnar Kjørstad
2002-11-05 19:55   ` poczta.dotcom.pl
2002-11-05 20:22     ` Matt Heaton
2002-11-05 20:39       ` Benjamin LaHaise
2002-11-05 20:46         ` Matt Heaton
2002-11-05 21:24           ` Benjamin LaHaise
2002-11-05 23:32     ` Ragnar Kjørstad
2002-11-06  8:59       ` myciel
2002-11-06 10:16         ` Ragnar Kjørstad
2002-11-06 11:46           ` myciel
  -- strict thread matches above, loose matches on Subject: below --
2002-11-05 20:56 Lever, Charles
2002-11-05 22:09 Lever, Charles
2002-11-06 17:08 pwitting
2002-11-07 15:19 Baker, Byran
2002-11-07 15:49 ` Matt Heaton
2002-11-07 17:32 ` Ragnar Kjørstad
2007-10-25 13:10 Andreas Schuldei
2007-10-25 13:53 ` Bernd Schubert
2007-10-27  9:25   ` Andreas Schuldei
2007-10-25 15:25 ` Chuck Lever
2007-10-25 19:34   ` Andreas Schuldei
2007-10-26 14:18     ` Chuck Lever
2007-10-26 17:01     ` Talpey, Thomas
2007-10-27  1:35       ` dean hildebrand
     [not found]         ` <c5befdd30710261835q50d34026h4dad32090db8a084@mail.gmail.co m>
2007-10-29 12:59           ` Talpey, Thomas
2007-10-25 14:39 Andreas Schuldei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox