Hello maintainers of debootstrap,
Would it be possible to remove the explicit call to 'sync' in
'/usr/sbin/debootstrap'?
This is related to, but not identical to the issue in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700633.
To reproduce:
* Have 2 shells open
* In shell 1: copy a large file on mount point A (I copied a 16GB file)
(this generates some real I/O on the system)
* In shell 2: rm -fr ./sid-chroot;time debootstrap sid ./sid-chroot >
/dev/null (while the copy in the other shell is in progress) (I used
/dev/shm)
Test scenarios:
* copy is running -> debootstrap is slow
* copy is finished -> debootstrap is fast
* copy is running -> 'eatmydata debootstrap' is fast
* copy is running, the 'sync' from /usr/sbin/debootstrap is commented
out -> debootstrap is fast
The fast times are all nearly identical
This leads me to think that the call to 'sync' in
https://salsa.debian.org/installer-team/debootstrap/-/blob/master/debootstrap?ref_type=heads#L869=
is not required.
The call to 'sync' was in the initial commit from 2007-06-16 and (apart
from cosmetic changes) not changed since then.
https://salsa.debian.org/installer-team/debootstrap/-/commit/f45e6190c00065a7ad362fef955ec62b7ebf43a0
With kind regards,
Roland Clobus
PS: I am also happy with wrapping the invocation of debootstrap with
eatmydata for my specific use case