From owner-freebsd-net@freebsd.org Mon Apr 16 23:03:36 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73E37F84ADB for ; Mon, 16 Apr 2018 23:03:36 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660070.outbound.protection.outlook.com [40.107.66.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0365D7CBBF for ; Mon, 16 Apr 2018 23:03:35 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM (52.132.66.153) by YQBPR0101MB1282.CANPRD01.PROD.OUTLOOK.COM (52.132.68.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.10; Mon, 16 Apr 2018 23:03:34 +0000 Received: from YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM ([fe80::893c:efc2:d71f:945a]) by YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM ([fe80::893c:efc2:d71f:945a%13]) with mapi id 15.20.0675.015; Mon, 16 Apr 2018 23:03:34 +0000 From: Rick Macklem To: Niels Kobschaetzki , "freebsd-net@freebsd.org" Subject: Re: High rate of NFS cache misses after upgrading from 10.3-prerelease to 11.1-release Thread-Topic: High rate of NFS cache misses after upgrading from 10.3-prerelease to 11.1-release Thread-Index: AQHT0qiQifFFt12p/0eGRV3S1dRLRqP/ezZKgAPq3QCAAKB4nQ== Date: Mon, 16 Apr 2018 23:03:34 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YQBPR0101MB1282; 7:Mz0pDmun13wGYQ+1MapdCq4EN8RtUbmcew40bk/hi4n2U4XDm1Vq1IyelmVtUTCgSe459iUSVlc7XI9SM64RlQ146jkEfQ8TtN2Aiit6jTRaZlbxAVkWqDeM+sRiSLPHREOAoZTE+VyTghZ+pNeNqPo7NRC/3z5M4QQ7lE2kwY475prbVSxdLTNhWEK85h9+mSDqwqY69pVndCeOb4AL3j5lH/o1k4mgo5qYDCQ4R9X/pJrqNtXr9oV9yDb2QAOb x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YQBPR0101MB1282; x-ms-traffictypediagnostic: YQBPR0101MB1282: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231232)(944501327)(52105095)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:YQBPR0101MB1282; BCL:0; PCL:0; RULEID:; SRVR:YQBPR0101MB1282; x-forefront-prvs: 0644578634 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(39380400002)(346002)(376002)(396003)(189003)(199004)(74316002)(6246003)(5250100002)(33656002)(55016002)(25786009)(105586002)(99286004)(9686003)(6436002)(478600001)(786003)(446003)(74482002)(6506007)(53936002)(316002)(8676002)(86362001)(26005)(102836004)(5660300001)(11346002)(110136005)(186003)(106356001)(3660700001)(3280700002)(7696005)(14454004)(2906002)(76176011)(2501003)(486006)(476003)(305945005)(229853002)(81166006)(81156014)(8936002)(68736007)(97736004)(2900100001); DIR:OUT; SFP:1101; SCL:1; SRVR:YQBPR0101MB1282; H:YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: hNXxYyki83fALg8cNIr0qvZGe+24Q1JlwnGnanyi1ws2bmgSPhM1q43jp397GanrydqMkySV7F4QHNMrXiTTTPp1FhRZORL9GX1AD84DfMiYE//VjeiTrueevXxxirTAozCriOHBCSV6AdYH80no+rkmVWSZHOm3auntDvK3t3bA42dUzC8P4rMat5tS4V/q spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: f26e53f3-f61c-4a7e-2d3c-08d5a3ee47cb X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: f26e53f3-f61c-4a7e-2d3c-08d5a3ee47cb X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2018 23:03:34.4053 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB1282 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Apr 2018 23:03:36 -0000 Niels Kobschaetzki wrote: [stuff smipped] >I just checked the code to see if I can figure out where exactly I have >to put the printf(). And then I saw that there are ifdefs for >NFS_ACDEBUG which seems to be a kernel option. When I add NFS_ACDEBUG in >the config-file for the kernel, the build fails with an I don't have sources handy right now, but you can probably just put a line like: #define NFS_ACDEBUG 1 at the top of the file /usr/src/sys/fs/nfsclient/nfs_clsubs.c After building/booting the kernel "sysctl -a" should have a vfs.nfs.acdebug in the list. Set it to "1" to get the basic timeout info. >/usr/src/sys/amd64/conf/ACDEBUG: unknown option "NFS_ACDEBUG" > >I looked in sysctl.h and there it isn't defined. Do I do something wrong >or did this sysctl-tunable got lost at some point in time? >Can I just use this code by removing the ifdef for getting information? > >Sorry, my C is not really existent, thus I have to ask :/ > >The parts (except the part that looks at the sysctl looks like this): >#ifdef NFS_ACDEBUG > if (nfs_acdebug>1) > printf("ncl_getattrcache: initial timeo =3D %d\n", timeo); >#endif > >=85=85 > > >#ifdef NFS_ACDEBUG > if (nfs_acdebug > 2) > printf("acregmin %d; acregmax %d; acdirmin %d; acdirmax >%d\n", > nmp->nm_acregmin, nmp->nm_acregmax, > nmp->nm_acdirmin, nmp->nm_acdirmax); > > if (nfs_acdebug) > printf("ncl_getattrcache: age =3D %d; final timeo =3D %d\n= ", > (time_second - np->n_attrstamp), timeo); >#endif > > >I would remove the ifdefs and the "if (nfs_acdebug =85)" This would work, too, rick