From owner-freebsd-stable@freebsd.org Thu Feb 11 16:04:17 2016 Return-Path: Delivered-To: freebsd-stable@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 9BD41AA52FB for ; Thu, 11 Feb 2016 16:04:17 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout10.t-online.de (mailout10.t-online.de [194.25.134.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65E5E196B; Thu, 11 Feb 2016 16:04:17 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd34.aul.t-online.de (fwd34.aul.t-online.de [172.20.26.145]) by mailout10.t-online.de (Postfix) with SMTP id 0B45556B527; Thu, 11 Feb 2016 17:04:09 +0100 (CET) Received: from [192.168.119.17] (rxUvP8ZcwhpsrOIQTREeke5DmbVsXZ1pJvqGx1upnpDxuRgfZgfohGUSe7Lik3+ZHb@[87.151.208.3]) by fwd34.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1aTtis-4KFU120; Thu, 11 Feb 2016 17:04:02 +0100 Subject: Re: passwd and pw speed regression? To: freebsd-stable@freebsd.org References: <56BCA298.9060000@sentex.net> From: Stefan Esser X-Enigmail-Draft-Status: N1110 Message-ID: <56BCB0EF.9060204@freebsd.org> Date: Thu, 11 Feb 2016 17:03:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56BCA298.9060000@sentex.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-ID: rxUvP8ZcwhpsrOIQTREeke5DmbVsXZ1pJvqGx1upnpDxuRgfZgfohGUSe7Lik3+ZHb X-TOI-MSGID: 41e73540-8115-472e-8c03-f8bed9b8a0fa X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 16:04:17 -0000 Am 11.02.2016 um 16:02 schrieb Mike Tancsa: > I noticed that on a new RELENG_10 box we are building, password updates > are taking a very long time to build. On the old RELENG_8 box, doing > something simple like adding a user > > # time pw useradd test12345 > 0.062u 0.063s 0:00.14 85.7% 54+988k 196+134io 0pf+0w > > # time pw userdel test12345 > 0.164u 0.044s 0:00.20 100.0% 28+1181k 0+18io 0pf+0w > > > On the new RELENG_10 box, > > # time pw useradd test12345 > 0.060u 0.120s 0:58.89 0.3% 58+146k 12+6485io 0pf+0w > > # time pw userdel test12345 > 0.125u 0.133s 0:58.80 0.4% 46+214k 13+9326io 0pf+0w > > > # wc /etc/passwd > 6113 14792 376128 /etc/passwd > > > Yes, almost 60 seconds to add a user to the password file? > > Does anyone know what is going on to account for the large difference > and how to work around it ? I am guessing You are affected by the problem mentioned in https://reviews.freebsd.org/D5186 The output file is written with O_SYNC a record at a time and this is slow (100 to 200 records per second on a non-SSD drive). This will be fixed in -CURRENT soon and I think the fix should qualify for inclusion in the next 10-BETA, thereafter. Regards, STefan > https://svnweb.freebsd.org/base?view=revision&revision=285205 > > is the issue. Apart from keeping local source code changes, is there not > a better way to not have reasonable speeds ? > > ---Mike