Change wcommitsize default from one empirical value to another.
The new value is more predictable with growing RAM size: hibufspace maxvnodes old new i386: 256MB 32980992 15800 2198732 2097152 2GB 94027776 107677 878764 4194304 amd64: 256MB 32980992 15800 2198732 2097152 1GB 114114560 68062 1678155 4194304 4GB 217055232 111807 1955452 4194304 16GB 1717846016 337308 5097465 16777216 64GB 1734918144 1164427 1490479 16777216 256GB 1734918144 4426453 391983 16777216 Reviewed by: rmacklem MFC after: 2 weeks
This commit is contained in:
parent
d5792866b0
commit
afdfc9a40d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281738
@ -1324,10 +1324,13 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
|
|||||||
nmp->nm_timeo = NFS_TIMEO;
|
nmp->nm_timeo = NFS_TIMEO;
|
||||||
nmp->nm_retry = NFS_RETRANS;
|
nmp->nm_retry = NFS_RETRANS;
|
||||||
nmp->nm_readahead = NFS_DEFRAHEAD;
|
nmp->nm_readahead = NFS_DEFRAHEAD;
|
||||||
if (desiredvnodes >= 11000)
|
|
||||||
nmp->nm_wcommitsize = hibufspace / (desiredvnodes / 1000);
|
/* This is empirical approximation of sqrt(hibufspace) * 256. */
|
||||||
else
|
nmp->nm_wcommitsize = NFS_MAXBSIZE / 256;
|
||||||
nmp->nm_wcommitsize = hibufspace / 10;
|
while ((long)nmp->nm_wcommitsize * nmp->nm_wcommitsize < hibufspace)
|
||||||
|
nmp->nm_wcommitsize *= 2;
|
||||||
|
nmp->nm_wcommitsize *= 256;
|
||||||
|
|
||||||
if ((argp->flags & NFSMNT_NFSV4) != 0)
|
if ((argp->flags & NFSMNT_NFSV4) != 0)
|
||||||
nmp->nm_minorvers = minvers;
|
nmp->nm_minorvers = minvers;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user