From owner-svn-src-all@freebsd.org Wed Feb 10 11:47:28 2016 Return-Path: Delivered-To: svn-src-all@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 4F780AA3A08 for ; Wed, 10 Feb 2016 11:47:28 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 198A11BCB for ; Wed, 10 Feb 2016 11:47:27 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aTSzl-0003pA-3e for svn-src-all@freebsd.org; Wed, 10 Feb 2016 12:31:46 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: svn-src-all@freebsd.org Subject: Re: svn commit: r295465 - head/usr.sbin/services_mkdb References: <201602100940.u1A9ejb6086175@repo.freebsd.org> Date: Wed, 10 Feb 2016 12:31:39 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201602100940.u1A9ejb6086175@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: ba572e8a3bde05b4b19613c12a9e49fc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 11:47:28 -0000 On Wed, 10 Feb 2016 10:40:45 +0100, Stefan Esser wrote: > Author: se > Date: Wed Feb 10 09:40:45 2016 > New Revision: 295465 > URL: https://svnweb.freebsd.org/changeset/base/295465 > > Log: > Remove O_SYNC from the options passed to dbmopen(). > The services db is created as a temporary file that is moved over the > existing file after completion. Thus there is no need to immediately > flush all created db records to the temporary file. > This speeds up creation of the services db by a factor of 500 on my > ZFS based /var/db filesytem (from 110 seconds to 0.235 seconds). > MFC after: 1 week Nice! My ARM installation on an USB stick was so slow I stopped waiting for this and started to do tricks of running a tmp dir on the building host. Regards, Ronald. > Modified: > head/usr.sbin/services_mkdb/services_mkdb.c > > Modified: head/usr.sbin/services_mkdb/services_mkdb.c > ============================================================================== > --- head/usr.sbin/services_mkdb/services_mkdb.c Wed Feb 10 09:19:29 > 2016 (r295464) > +++ head/usr.sbin/services_mkdb/services_mkdb.c Wed Feb 10 09:40:45 > 2016 (r295465) > @@ -141,7 +141,7 @@ main(int argc, char *argv[]) > err(1, "Cannot install exit handler"); > (void)snprintf(tname, sizeof(tname), "%s.tmp", dbname); > - db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL | O_SYNC, > + db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL, > (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH), DB_HASH, &hinfo); > if (!db) > err(1, "Error opening temporary database `%s'", tname); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"