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
+12
-2
@@ -55,10 +55,10 @@ function verify_initial_contents() {
|
||||
}
|
||||
|
||||
if has_gpgme; then
|
||||
echo "1..34"
|
||||
echo "1..35"
|
||||
else
|
||||
# 3 tests needs GPG support
|
||||
echo "1..31"
|
||||
echo "1..32"
|
||||
fi
|
||||
|
||||
# Try both syntaxes
|
||||
@@ -74,6 +74,16 @@ cd ${test_tmpdir}
|
||||
verify_initial_contents
|
||||
echo "ok pull contents"
|
||||
|
||||
# And a test with incremental fsync
|
||||
repo_init --no-sign-verify
|
||||
${CMD_PREFIX} ostree --repo=repo pull --per-object-fsync origin main >out.txt
|
||||
assert_file_has_content out.txt "[1-9][0-9]* metadata, [1-9][0-9]* content objects fetched"
|
||||
${CMD_PREFIX} ostree --repo=repo pull --per-object-fsync origin:main > out.txt
|
||||
assert_not_file_has_content out.txt "[1-9][0-9]* content objects fetched"
|
||||
${CMD_PREFIX} ostree --repo=repo fsck
|
||||
verify_initial_contents
|
||||
echo "ok pull --per-object-fsync"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
mkdir mirrorrepo
|
||||
ostree_repo_init mirrorrepo --mode=archive
|
||||
|
||||
Reference in new issue
Block a user