From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653647622126.tru64-unix-managers.marc@archive.invalid> From: Marian Szebenyi Date: Fri, 25 May 2001 20:51:31 +0000 To: tru64-unix-managers Subject: SUMMARY: NFS - how get write as fast as read? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653647622126 The question involved NFS over a gigabit ethernet connection and actually had two parts: 1) How can I get the best speed from the gigabit connection for NFS, given that it works well for FTP already? 2) How can I get NFS writes to be as fast as reads? There were lots of responses - thanks to Pat O'Brien, William Bochnik, Selden Ball, Steve Daniel, Serguei Patchkovskii, Andrew Boswell, and "sysadmin@astro.su.se". 1) Parameters to tweak for gigabit: Number of nfs and nfsiod threads (set in nfssetup or sysman nfs) - I had done this already. Increasing number of nfsiod threads was helpful, up to a point. Too many threads degrades performance, but using 15-31 instead of the default 7 was good. NFS rsize and wsize parameters (set as an option in the mount command) - unfortunately, these are not allowed to go higher than 8K on my system. inet parameters tcp_recvspace and tcp_sendspace (if using TCP) or udp_recvspace and udp_sendspace (if using UDP) (set with sysconfig or dxkerneltuner). Didn't help me a whole lot, but may be important in some circumstances. alt parameter send_ticks (set with sysconfig or dxkerneltuner) - try setting to 10 instead of the default 2500. Interface speed (set with ifconfig) - set to 9000 instead of default 1500. This didn't work for me because the switch in the system can't handle jumbo packets, but should be good if you have the proper hardware. Autonegotiate on or off for the gigabit card (set with ifconfig). Didn't make any difference in my case, but might sometimes. 2) NFS read vs. write. The short answer is: it's not possible to get write to go as fast as read, because: When writing, NFS insists that each block of data be written to disk before it will send the next block. This is safe, but slow. It would seem to help to use bigger blocks, but since wsize is limited to 8K (possibly 32K on some systems), one can't do much in this respect. When reading, the read is considered complete when the data get into memory on the receiving computer, and memory access is of course faster than disk access. Moreover, if you are accessing the same data repeatedly caching will come into effect and subsequent transfers will be very fast. The only solution to speeding up writing relative to reading would seem to be Selden Ball's suggestion to install Prestoserve hardware and software, which caches data to be written to disk in memory first. Should certainly help, although it's not exactly a quick, free fix. Information on Prestoserve is available on the Compaq web site, http://tru64unix.compaq.com/faqs/publications/base_doc/DOCUMENTATION/V51_HTML/ARH98ATE/TITLE.HTM. Personally, I think I will try to arrange things here to avoid use of NFS, particularly for writing. Marian Szebenyi MacCHESS, Cornell University dms35@cornell.edu