Date: Wed, 10 Feb 2016 12:31:39 +0100 From: "Ronald Klop" <ronald-lists@klop.ws> To: svn-src-all@freebsd.org Subject: Re: svn commit: r295465 - head/usr.sbin/services_mkdb Message-ID: <op.ycl7m2gokndu52@53555a16.cm-6-6b.dynamic.ziggo.nl> In-Reply-To: <201602100940.u1A9ejb6086175@repo.freebsd.org> References: <201602100940.u1A9ejb6086175@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 10 Feb 2016 10:40:45 +0100, Stefan Esser <se@freebsd.org> 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.ycl7m2gokndu52>