pull: Add --per-object-fsync
This is the opposite of https://github.com/ostreedev/ostree/issues/1184 Motivated by OpenShift seeing etcd performance issues during OS updates: https://github.com/openshift/machine-config-operator/issues/1897 Basically, if we switch to invoking `fsync()` as we go, it makes ostree performance worse (in my tests, 31s to write 2G versus 7s if we delay sync) but it avoids *huge* outliers in `fsync()` time for etcd.
This commit is contained in:
1 parent
4752dd02cf
commit
a615d35762
8 files changed
+131
-47
No files matched your search
@@ -38,13 +38,17 @@ G_BEGIN_DECLS
|
||||
#define _OSTREE_MAX_OUTSTANDING_FETCHER_REQUESTS 8
|
||||
#define _OSTREE_MAX_OUTSTANDING_DELTAPART_REQUESTS 2
|
||||
|
||||
/* In most cases, writing to disk should be much faster than
|
||||
* fetching from the network, so we shouldn't actually hit
|
||||
* this. But if using pipelining and e.g. pulling over LAN
|
||||
* (or writing to slow media), we can have a runaway
|
||||
* situation towards EMFILE.
|
||||
/* We want some parallelism with disk writes, but we also
|
||||
* want to avoid starting tens or hundreds of threads
|
||||
* (via GTask) all writing to disk. Eventually we may
|
||||
* use io_uring which handles backpressure correctly.
|
||||
* Also, in "immediate fsync" mode, this helps provide
|
||||
* much more backpressure, helping our I/O patterns
|
||||
* be nicer for any concurrent processes, such as etcd
|
||||
* or other databases.
|
||||
* https://github.com/openshift/machine-config-operator/issues/1897
|
||||
* */
|
||||
#define _OSTREE_MAX_OUTSTANDING_WRITE_REQUESTS 16
|
||||
#define _OSTREE_MAX_OUTSTANDING_WRITE_REQUESTS 3
|
||||
|
||||
/* Well-known keys for the additional metadata field in a summary file. */
|
||||
#define OSTREE_SUMMARY_LAST_MODIFIED "ostree.summary.last-modified"
|
||||
@@ -147,6 +151,7 @@ struct OstreeRepo {
|
||||
GError *writable_error;
|
||||
gboolean in_transaction;
|
||||
gboolean disable_fsync;
|
||||
gboolean per_object_fsync;
|
||||
gboolean disable_xattrs;
|
||||
guint zlib_compression_level;
|
||||
GHashTable *loose_object_devino_hash;
|
||||
|
||||
Reference in new issue
Block a user