#7909 Consider enabling nosync
Closed: Fixed 8 months ago by mohanboddu. Opened 2 years ago by mizdebsk.

Please consider turning on nosync setting in mock on Koji builders. This was brought up in Removal of GCC from the buildroot thread on devel mailing list in July.

Nosync aims to improve performance of dnf phase in mock. It achieves this by disabling fsync calls. Fsync calls are not ignored during rpmbuild phase. For more information see upstream documentation linked above.

I temporarily enabled nosync in staging Koji to estimate its effect on build performance. Results will be posted below in separate comments.

Test case 1 - relative comparison of package installation time (in seconds) with and without sync. This test was done by submitting a scratch build of a simplest-possible SRPM with large build dependency chain. Since dominant step of this build is installing build dependencies, comparing task completion times allows estimating relative package installation performance improvement from enabling nosync.

Results in a graph form:


Test case 2 - absolute time gain of installing build group. This test was done by submitting scratch builds of simplest possible package with no build dependencies, during which only build group is installed. Test results show minimal absolute time gain - how much time can be saved per build only for during minimal buildroot installation. Additional time can be saved during buildrequires installation.


Metadata Update from @mohanboddu:
- Issue tagged with: meeting

2 years ago

I'm +1 to doing this. The only case I can think of where it might cause problems is if a package has a test suite that writes some data and runs fsync and then checks it, but I wouldn't expect that to happen too often. If we do hit that we could look at some workaround (disable that test, provide a channel without nosync, etc)

As the issue says, sync calls are ignored only when package manager (DNF) is ran - nosync is not active during rpmbuild phase of package build, so it won't affect package test suites.

Ah, missed that... even better! Thanks!

my 2 cents, I'm using nosync for my local mock builds for more than a year and it works like a charm, so +1

sadly, tmpfs won't work for us as it needs builders to have a bunch of swap, and right now our builders do not have any extra disk space. ;(

An alternative to tmpfs would be adjusting virtual machine disk caching options, which I suggested in the devel thread mentioned above. For builders that are virtual machines (and most of them are), data written to guest virtual disk during mock build would actually be kept in RAM - in host disk cache, and is written back to hardware disk in background, even before vmhost runs out of memory.

nosync should be enabled for all the builders except the armv7 ones (stalled on https://bugzilla.redhat.com/show_bug.cgi?id=1576593).

I think we should open new issues on any other/different changes we want to make, and keep this one just tracking the nosync change.

Still waiting on resolution of https://bugzilla.redhat.com/show_bug.cgi?id=1576593
Once it's fixed, can close this ticket.

Metadata Update from @ignatenkobrain:
- Issue assigned to ignatenkobrain

a year ago

Metadata Update from @ignatenkobrain:
- Issue untagged with: meeting

a year ago

That bug is finally fixed, but we haven't yet moved the arm builders newer. As soon as f31 is out the door, we will want to update them to that.

We can keep this for tracking, or just realize that it will happen when we move them to f31.

We enabled nosync on most of the builders, there are only a few arm builders running f29 which will be discontinued soon.

Closing the ticket.

Metadata Update from @mohanboddu:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

8 months ago

Login to comment on this ticket.

Attachments 2
Attached 2 years ago View Comment
Attached 2 years ago View Comment