Date: Mon, 24 Jul 2006 10:56:50 -0400 (EDT) From: rick@snowhite.cis.uoguelph.ca To: fs@freebsd.org Subject: freebsd4.11 patch for nfs over tcp Message-ID: <200607241456.KAA63411@snowhite.cis.uoguelph.ca>
next in thread | raw e-mail | index | archive | help
I figured that putting patches for FreeBSD4 in the bugtracker was passe, so I'm posting it here. I noticed that performance of nfs over TCP was abismal under certain circumstances. It turned out that TCP_NODELAY wasn't being set, because sopt_dir wasn't filled in. Here's a simple diff -c patch, rick ps: sopt_dir also isn't set for KEEPALIVE, but it doesn't matter for that one. --- FreeBSD4.11 diff -c patch *** nfs_socket.c.orig Mon Jul 24 10:37:45 2006 --- nfs_socket.c Mon Jul 24 10:38:39 2006 *************** *** 339,344 **** --- 339,345 ---- bzero(&sopt, sizeof sopt); sopt.sopt_level = IPPROTO_TCP; + sopt.sopt_dir = SOPT_SET; sopt.sopt_name = TCP_NODELAY; sopt.sopt_val = &val; sopt.sopt_valsize = sizeof val; *** nfs_syscalls.c.orig Mon Jul 24 10:37:57 2006 --- nfs_syscalls.c Mon Jul 24 10:39:12 2006 *************** *** 376,381 **** --- 376,382 ---- bzero(&sopt, sizeof sopt); sopt.sopt_level = IPPROTO_TCP; + sopt.sopt_dir = SOPT_SET; sopt.sopt_name = TCP_NODELAY; sopt.sopt_val = &val; sopt.sopt_valsize = sizeof val;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607241456.KAA63411>