From owner-freebsd-questions@freebsd.org Tue Aug 4 21:19:51 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ECCF9B3DDE for ; Tue, 4 Aug 2015 21:19:51 +0000 (UTC) (envelope-from mark@exonetric.com) Received: from relay.exonetric.net (relay0.exonetric.net [178.250.72.161]) by mx1.freebsd.org (Postfix) with ESMTP id 004E9E58 for ; Tue, 4 Aug 2015 21:19:50 +0000 (UTC) (envelope-from mark@exonetric.com) Received: from [192.168.10.238] (186.211.187.81.in-addr.arpa [81.187.211.186]) by relay.exonetric.net (Postfix) with ESMTPSA id D7D922C158; Tue, 4 Aug 2015 22:13:01 +0100 (BST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: pw operations slow under zfs load From: Mark Blackman In-Reply-To: Date: Tue, 4 Aug 2015 22:12:59 +0100 Cc: freebsd-questions@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: javocado X-Mailer: Apple Mail (2.2102) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2015 21:19:51 -0000 > On 4 Aug 2015, at 22:07, javocado wrote: >=20 > Hi, >=20 > We have a pretty busy ZFS pool running on an 8.3 AMD system. We are > noticing that when the pool is busy pw-related operations seem to = take a > long time to complete: >=20 > # time pw unlock 1000 > 0.007u 0.036s 0:39.72 0.0% 45+1953k 0+113io 0pf+0w >=20 > # time pw lock 1000 > 0.032u 0.022s 1:09.63 0.0% 24+1132k 0+114io 0pf+0w >=20 > Wile the command is running, we note that the process is locked in the = D > state: >=20 > root 85051 0.0 0.0 5832 960 0 D+ 1:53PM 0:00.02 > /usr/sbin/pwd_mkdb -u 1000 /etc/master.passwd >=20 > We also note that there is next to 0 disk activity on the boot volume: >=20 > # gstat -f ad >=20 > dT: 1.005s w: 1.000s filter: ad > L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name > 0 0 0 0 0.0 0 0 0.0 0.0| ad6 > 0 0 0 0 0.0 0 0 0.0 0.0| ad8 > 0 0 0 0 0.0 0 0 0.0 0.0| ad10 > 0 0 0 0 0.0 0 0 0.0 0.0| ad12 >=20 > And plenty of free mem: >=20 > Mem: 400M Active, 3391M Inact, 128G Wired, 1935M Cache, 14G Buf, 6055M = Free >=20 > So, what's going on here? How does a busy pool with it's own set of = drives > (which operate off an HBA) affect the speed of operations involving = the > boot volume (a UFS-formatted SSD connected to the mobo)? Maybe some ktrace operations are in order? I remember, about 15 years = ago, discovering that that =E2=80=98-s=E2=80=99 option can make a big = difference. -s cachesize Specify in megabytes the size of the memory cache used by the = hash- ing library. On systems with a large user base, a small = cache size can lead to prohibitively long database file rebuild times. = As a rough guide, the memory usage of pwd_mkdb in megabytes will = be a little bit more than twice the figure specified here. The = default is 2 megabytes. - Mark =20