Re: speeding up NFS
On Monday 10 February 2003 16:49, Doug Poland wrote: > > nfsserver:/data /data nfs fsv3,intr,rdirplus,-r=32768,-w=32768,rw > > On the NFS server I have in my /etc/sysctl.conf: > vfs.nfs.async=1 The -r=32768,-w=32768 options did improve the transfert a little bit. I didn't put vfs.nfs.async=1 on the server since someone told me it was not very secure. Thanks. Antoine To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
>> You may be able to increase the -r and -w sizes to improve >> things. > > Yes, well I already tried that but it didn't work (it was even > worse !) > >> My understanding is: you should use UDP mounts if the servers >> are close together (i.e., one hub/switch between them, low >> latency) but use TCP mounts if they are far apart (i.e. many >> hops, high latency, lots of dropped packets).I don't know if >> specifying both -u and -t hurts anything. > > Well, the clients are configured to mount NFS with UDP. > This is what I have in my nfs client fstab. I came up with these numbers in an attempt to get client NFS access speeds up to par with SMB or CIFS connections: nfsserver:/data /data nfs fsv3,intr,rdirplus,-r=32768,-w=32768,rw On the NFS server I have in my /etc/sysctl.conf: vfs.nfs.async=1 Also make sure you have enough nfsiod running on the client to service requests, and enough nfsd on the server to service the clients. YMMV, Doug To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
Search the archives ... I seem to remember this being discussed in great > depth a few years ago. > > You may be able to increase the -r and -w sizes to improve things. Yes, well I already tried that but it didn't work (it was even worse !) > My understanding is: you should use UDP mounts if the servers are close > together (i.e., one hub/switch between them, low latency) but use TCP > mounts if they are far apart (i.e. many hops, high latency, lots of > dropped packets).I don't know if specifying both -u and -t hurts > anything. Well, the clients are configured to mount NFS with UDP. > > But definately search the archives, there was a LOT more useful information > in the previous discussion. > OK, thank you very much. Antoine To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
Selon Dan Nelson <[EMAIL PROTECTED]>: > In the last episode (Feb 09), Antoine Jacoutot said: > > I wanted to know if someone could help me speed up NFS transfers with > > FreeBSD-4.7-STABLE. With Linux clients+server, the transfers are > > exactly twice faster than with freeBSD, so I am sure I must have > > screwed the configuration somewhere. > > Writes or reads? I bet Linux doesn't sync on NFS writes like it's > supposed to. If you set the sysctl vfs.nfsrv.async=1 on your FreeBSD > nfs server, does it match Linuxes speed No... ;-( To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
On Sun, Feb 09, 2003 at 05:48:25PM -0600, Dan Nelson wrote: > In the last episode (Feb 09), Tillman said: > > Which sysctl is this? The closest I can find is: > > > > # sysctl -a | grep nfs | grep sync > > vfs.nfs.async: 0 > > Same one. They split the server sysctls out into nfsrv in 5.*. That makes sense. > > If that's the one, it may still not be necessary. I'm getting about > > 8.5-9 Megabytes/s on NFS reads from a Linux 2.4 client (on a 100Mbit > > switched LAN) with it set to 0, as measured by Bonnie++. This is > > fairly close to the 12MB/s fast ethernet theoretical maximum, so I'm > > happy with performance. > > It only applies to writes. With it set to 0 (the default), FreeBSD > follows the NFS spec and does not return from NFSv2 write or NFSv3 > commit calls without having synced the data to disk. This can slow you > down if you are not on a battery-backed RAID or ramdisk. With NFSv3 > it's not so bad since it supports async client writes (i.e. separate > write and commit calls). When I was benchmarking with bonnie++, I found NFSv2 with async writes turned on to be only marginally faster than v3 with sync'ed commits (under 10% difference). Given the additional safety, I like using sync :-) Thanks for the info, -T -- A man may fight the greatest enemy, take the longest journey, survive the most grievous wound -- and still be helpless in the hands of the woman he loves. - Zensunni Wisdom from the Wandering To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
On Sun, Feb 09, 2003 at 06:43:58PM -0500, Bill Moran wrote: > Tillman wrote: > > I'm getting about > > 8.5-9 Megabytes/s on NFS reads from a Linux 2.4 client (on a 100Mbit > > switched LAN) with it set to 0, as measured by Bonnie++. This is fairly > > close to the 12MB/s fast ethernet theoretical maximum, so I'm happy with > > performance. > > What did you change to get it running that fast? Many many bonnie++ runs and careful charting of the results :-) Client side (Linux 2.4): Mount with mountvers=3,hard,intr,nolock,udp,wsize=8192,rsize=8192 Note that w/r sizes above 8k require a small kernel patch to Linux - and I found that it's typically a tad /slower/ than 8k in any case. Not worth it according to the benchmarking I did. In general, version 3 was much better performing than version 2 (where async vs. sync was more of an issue). On the server side, ensure that you have enough nfsd's to handle all requests by keeping an eye on the `ps` output. When one or more of the nfsd's have no CPU time, then you've just started to cross the line into too many (which is about right). Also, ensure that you're not disk I/O limited on the server side. I'm currently using a couple of vinum arrays where I'm reading at about 30MB/s and the random seeks are high (about 530/sec). This puts any blame for slowness on the network (and NFS), which simplified tuning. I'd welcome benchmarks to the contrary, I could always use more NFS performance ;-) -T -- Yield to temptation; it may not pass your way again. Robert Heinlein To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
In the last episode (Feb 09), Tillman said: > Which sysctl is this? The closest I can find is: > > # sysctl -a | grep nfs | grep sync > vfs.nfs.async: 0 Same one. They split the server sysctls out into nfsrv in 5.*. > If that's the one, it may still not be necessary. I'm getting about > 8.5-9 Megabytes/s on NFS reads from a Linux 2.4 client (on a 100Mbit > switched LAN) with it set to 0, as measured by Bonnie++. This is > fairly close to the 12MB/s fast ethernet theoretical maximum, so I'm > happy with performance. It only applies to writes. With it set to 0 (the default), FreeBSD follows the NFS spec and does not return from NFSv2 write or NFSv3 commit calls without having synced the data to disk. This can slow you down if you are not on a battery-backed RAID or ramdisk. With NFSv3 it's not so bad since it supports async client writes (i.e. separate write and commit calls). -- Dan Nelson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
Tillman wrote: I'm getting about 8.5-9 Megabytes/s on NFS reads from a Linux 2.4 client (on a 100Mbit switched LAN) with it set to 0, as measured by Bonnie++. This is fairly close to the 12MB/s fast ethernet theoretical maximum, so I'm happy with performance. What did you change to get it running that fast? -- Bill Moran Potential Technologies http://www.potentialtech.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
On Sun, Feb 09, 2003 at 01:28:39PM -0600, Dan Nelson wrote: > In the last episode (Feb 09), Antoine Jacoutot said: > > I wanted to know if someone could help me speed up NFS transfers with > > FreeBSD-4.7-STABLE. With Linux clients+server, the transfers are > > exactly twice faster than with freeBSD, so I am sure I must have > > screwed the configuration somewhere. > > Writes or reads? I bet Linux doesn't sync on NFS writes like it's > supposed to. If you set the sysctl vfs.nfsrv.async=1 on your FreeBSD > nfs server, does it match Linuxes speed? Which sysctl is this? The closest I can find is: # sysctl -a | grep nfs | grep sync vfs.nfs.async: 0 If that's the one, it may still not be necessary. I'm getting about 8.5-9 Megabytes/s on NFS reads from a Linux 2.4 client (on a 100Mbit switched LAN) with it set to 0, as measured by Bonnie++. This is fairly close to the 12MB/s fast ethernet theoretical maximum, so I'm happy with performance. -T -- Page 41: Two of the most important Unix traditions are to share and to help people. - Harley Hahn, _The Unix Companion_ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
Antoine Jacoutot wrote: Hi ! I wanted to know if someone could help me speed up NFS transfers with FreeBSD-4.7-STABLE. With Linux clients+server, the transfers are exactly twice faster than with freeBSD, so I am sure I must have screwed the configuration somewhere. Here are the options used for mounting: rw,intr,hard,-r=8192,-w=8192,-U And here is the server's rc.conf: nfs_reserved_port_only="YES" nfs_server_enable="YES" nfs_server_flags="-h 192.168.0.1 -u -t -n 4" rpc_lockd_enable="YES" rpc_statd_enable="YES" Search the archives ... I seem to remember this being discussed in great depth a few years ago. You may be able to increase the -r and -w sizes to improve things. My understanding is: you should use UDP mounts if the servers are close together (i.e., one hub/switch between them, low latency) but use TCP mounts if they are far apart (i.e. many hops, high latency, lots of dropped packets). I don't know if specifying both -u and -t hurts anything. But definately search the archives, there was a LOT more useful information in the previous discussion. -- Bill Moran Potential Technologies http://www.potentialtech.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: speeding up NFS
In the last episode (Feb 09), Antoine Jacoutot said: > I wanted to know if someone could help me speed up NFS transfers with > FreeBSD-4.7-STABLE. With Linux clients+server, the transfers are > exactly twice faster than with freeBSD, so I am sure I must have > screwed the configuration somewhere. Writes or reads? I bet Linux doesn't sync on NFS writes like it's supposed to. If you set the sysctl vfs.nfsrv.async=1 on your FreeBSD nfs server, does it match Linuxes speed? -- Dan Nelson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message