[Rpm-maint] [rpm-software-management/rpm] Add macro to force fsync() on close() (#187)

Phil Dibowitz notifications at github.com
Mon Apr 3 22:33:26 UTC 2017


This patch adds a new macro that has rpm call fsync() before each close(). The
feature is off by default since most people will not want this, and is turned
on either with a macro or command-line flag.

There are a few reasons for wanting this:

1. To ensure that an RPM installation never fulls IO queues so much that
the production workload has to wait for it to be flushed when calling sync()
(think of databases)

2. For systems with very large numbers of disks to limit the amount of diskcache
an RPM installation can cause eviction of to limit IO thrash.

At Facebook, for the described workloads, we've found significant improvement on
our IO load when turning on this feature. Exact numbers are a bit hard to
quantify, but we are working on them. We see less threads of production
databases stacking up when yum/rpm/dnf are running, for example.

One word of caution: this will give good results on SSDs, but using this on
rotational disks won't make you happy.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/187

-- Commit Summary --

  * Add macro to force fsync() on close()

-- File Changes --

    M lib/fsm.c (4)
    M rpmio/rpmio.c (22)
    M rpmio/rpmio.h (7)
    M rpmpopt.in (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/187.patch
https://github.com/rpm-software-management/rpm/pull/187.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/187
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170403/957ff229/attachment.html>


More information about the Rpm-maint mailing list