mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
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:
parent
7c01ae3bd4
commit
58d14dae6d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172557
@ -60,8 +60,8 @@ void (*aio_swake)(struct socket *, struct sockbuf *);
|
||||
*/
|
||||
|
||||
u_long sb_max = SB_MAX;
|
||||
static u_long sb_max_adj =
|
||||
SB_MAX * MCLBYTES / (MSIZE + MCLBYTES); /* adjusted sb_max */
|
||||
u_long sb_max_adj =
|
||||
SB_MAX * MCLBYTES / (MSIZE + MCLBYTES); /* adjusted sb_max */
|
||||
|
||||
static u_long sb_efficiency = 8; /* parameter for sbreserve() */
|
||||
|
||||
|
@ -100,6 +100,8 @@ static int nfssvc_addsock(struct file *, struct sockaddr *,
|
||||
static void nfsrv_zapsock(struct nfssvc_sock *slp);
|
||||
static int nfssvc_nfsd(struct thread *);
|
||||
|
||||
extern u_long sb_max_adj;
|
||||
|
||||
/*
|
||||
* NFS server system calls
|
||||
*/
|
||||
@ -206,10 +208,7 @@ nfssvc_addsock(struct file *fp, struct sockaddr *mynam, struct thread *td)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (so->so_type == SOCK_STREAM)
|
||||
siz = NFS_MAXPACKET + sizeof (u_long);
|
||||
else
|
||||
siz = NFS_MAXPACKET;
|
||||
siz = sb_max_adj;
|
||||
error = soreserve(so, siz, siz);
|
||||
if (error) {
|
||||
if (mynam != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user