Sun Jan 24 12:51:32 2021 UTC ()
Use 32K as the default NFSv3 read and write data sizes on aarch64, matching
i386 and amd64.


(jmcneill)
diff -r1.50 -r1.51 src/sbin/mount_nfs/mount_nfs.8
diff -r1.14 -r1.15 src/sys/arch/aarch64/include/param.h

cvs diff -r1.50 -r1.51 src/sbin/mount_nfs/mount_nfs.8 (expand / switch to unified diff)

--- src/sbin/mount_nfs/mount_nfs.8 2020/10/03 18:29:02 1.50
+++ src/sbin/mount_nfs/mount_nfs.8 2021/01/24 12:51:32 1.51
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: mount_nfs.8,v 1.50 2020/10/03 18:29:02 wiz Exp $ 1.\" $NetBSD: mount_nfs.8,v 1.51 2021/01/24 12:51:32 jmcneill Exp $
2.\" 2.\"
3.\" Copyright (c) 1992, 1993, 1994, 1995 3.\" Copyright (c) 1992, 1993, 1994, 1995
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 30.\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95
31.\" 31.\"
32.Dd October 3, 2020 32.Dd January 24, 2021
33.Dt MOUNT_NFS 8 33.Dt MOUNT_NFS 8
34.Os 34.Os
35.Sh NAME 35.Sh NAME
36.Nm mount_nfs 36.Nm mount_nfs
37.Nd mount NFS file systems 37.Nd mount NFS file systems
38.Sh SYNOPSIS 38.Sh SYNOPSIS
39.Nm 39.Nm
40.Op Fl 23AbCcdilPpqsTUuX 40.Op Fl 23AbCcdilPpqsTUuX
41.Op Fl a Ar maxreadahead 41.Op Fl a Ar maxreadahead
42.Op Fl D Ar deadthresh 42.Op Fl D Ar deadthresh
43.Op Fl g Ar maxgroups 43.Op Fl g Ar maxgroups
44.Op Fl I Ar readdirsize 44.Op Fl I Ar readdirsize
45.Op Fl L Ar leaseterm 45.Op Fl L Ar leaseterm
@@ -346,27 +346,28 @@ to watch: @@ -346,27 +346,28 @@ to watch:
346.It 346.It
347Increasing the read and write size with the 347Increasing the read and write size with the
348.Fl r 348.Fl r
349and 349and
350.Fl w 350.Fl w
351options respectively will increase throughput if the network 351options respectively will increase throughput if the network
352interface can handle the larger packet sizes. 352interface can handle the larger packet sizes.
353.Pp 353.Pp
354The default size for NFS version 2 is 8K when using UDP, 354The default size for NFS version 2 is 8K when using UDP,
35564K when using TCP. 35564K when using TCP.
356.Pp 356.Pp
357The default size for NFS version 3 is platform dependent: 357The default size for NFS version 3 is platform dependent:
358on 358on
359.Nx Ns /amd64 359.Nx Ns /aarch64 ,
 360.Nx Ns /amd64 ,
360and 361and
361.Nx Ns /i386 , 362.Nx Ns /i386 ,
362the default is 32K, for other platforms it is 8K. 363the default is 32K, for other platforms it is 8K.
363Values over 32K are only supported for TCP, 364Values over 32K are only supported for TCP,
364where 64K is the maximum. 365where 64K is the maximum.
365.Pp 366.Pp
366Any value over 32K is unlikely to get you more performance, unless 367Any value over 32K is unlikely to get you more performance, unless
367you have a very fast network. 368you have a very fast network.
368.It 369.It
369If the network interface cannot handle larger packet sizes or a 370If the network interface cannot handle larger packet sizes or a
370long train of back to back packets, you may see low performance 371long train of back to back packets, you may see low performance
371figures or even temporary hangups during NFS activity. 372figures or even temporary hangups during NFS activity.
372.Pp 373.Pp

cvs diff -r1.14 -r1.15 src/sys/arch/aarch64/include/param.h (expand / switch to unified diff)

--- src/sys/arch/aarch64/include/param.h 2020/02/01 09:21:49 1.14
+++ src/sys/arch/aarch64/include/param.h 2021/01/24 12:51:32 1.15
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: param.h,v 1.14 2020/02/01 09:21:49 skrll Exp $ */ 1/* $NetBSD: param.h,v 1.15 2021/01/24 12:51:32 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -121,26 +121,32 @@ @@ -121,26 +121,32 @@
121#if PGSHIFT > 12 121#if PGSHIFT > 12
122#define MSIZE 256 /* size of an mbuf */ 122#define MSIZE 256 /* size of an mbuf */
123#else 123#else
124#define MSIZE 512 /* size of an mbuf */ 124#define MSIZE 512 /* size of an mbuf */
125#endif 125#endif
126 126
127#ifndef MCLSHIFT 127#ifndef MCLSHIFT
128#define MCLSHIFT 11 /* convert bytes to m_buf clusters */ 128#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
129 /* 2K cluster can hold Ether frame */ 129 /* 2K cluster can hold Ether frame */
130#endif /* MCLSHIFT */ 130#endif /* MCLSHIFT */
131 131
132#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ 132#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
133 133
 134#ifndef NFS_RSIZE
 135#define NFS_RSIZE 32768 /* Default NFS read data size */
 136#endif
 137#ifndef NFS_WSIZE
 138#define NFS_WSIZE 32768 /* Default NFS write data size */
 139#endif
134 140
135#ifndef MSGBUFSIZE 141#ifndef MSGBUFSIZE
136#define MSGBUFSIZE 65536 /* default message buffer size */ 142#define MSGBUFSIZE 65536 /* default message buffer size */
137#endif 143#endif
138 144
139#define COHERENCY_UNIT 128 145#define COHERENCY_UNIT 128
140#define CACHE_LINE_SIZE 128 146#define CACHE_LINE_SIZE 128
141 147
142#define MAXCPUS 256 148#define MAXCPUS 256
143 149
144#ifdef _KERNEL 150#ifdef _KERNEL
145 151
146#ifndef __HIDE_DELAY 152#ifndef __HIDE_DELAY