Set the NFS server sockbuf high watermarks to the system defaults

(up form 32KB). The low highwatermark setting caused UDP fullsock
request drops, throttling thruput greatly.
Reported by: Kris Kennaway
Approved by: re@ (Ken Smith)
This commit is contained in:
mohans 2007-10-12 03:56:27 +00:00
parent e279fe58cf
commit 11057bb00f
2 changed files with 5 additions and 6 deletions

View File

@ -60,8 +60,8 @@ void (*aio_swake)(struct socket *, struct sockbuf *);
*/ */
u_long sb_max = SB_MAX; u_long sb_max = SB_MAX;
static u_long sb_max_adj = u_long sb_max_adj =
SB_MAX * MCLBYTES / (MSIZE + MCLBYTES); /* adjusted sb_max */ SB_MAX * MCLBYTES / (MSIZE + MCLBYTES); /* adjusted sb_max */
static u_long sb_efficiency = 8; /* parameter for sbreserve() */ static u_long sb_efficiency = 8; /* parameter for sbreserve() */

View File

@ -100,6 +100,8 @@ static int nfssvc_addsock(struct file *, struct sockaddr *,
static void nfsrv_zapsock(struct nfssvc_sock *slp); static void nfsrv_zapsock(struct nfssvc_sock *slp);
static int nfssvc_nfsd(struct thread *); static int nfssvc_nfsd(struct thread *);
extern u_long sb_max_adj;
/* /*
* NFS server system calls * NFS server system calls
*/ */
@ -206,10 +208,7 @@ nfssvc_addsock(struct file *fp, struct sockaddr *mynam, struct thread *td)
} }
} }
#endif #endif
if (so->so_type == SOCK_STREAM) siz = sb_max_adj;
siz = NFS_MAXPACKET + sizeof (u_long);
else
siz = NFS_MAXPACKET;
error = soreserve(so, siz, siz); error = soreserve(so, siz, siz);
if (error) { if (error) {
if (mynam != NULL) if (mynam != NULL)