#1097 Issue closed
: Skip 'remount_sync' functionality if systemd is used¶
Labels: enhancement
, cleanup
, fixed / solved / done
jsmeix opened issue at 2016-12-02 09:38:¶
I would like to skip remounting with sync option
when systemd is used.
When multiple "rear mkbackuponly" or "rear restoreonly"
run in parallel the remounting with sync option
of all what is mounted below /mnt/local
gets annoyingly in the way, cf.
https://github.com/rear/rear/issues/1088#issuecomment-264176438
Of course I could implement sophisticated stuff
as workaround but I think this is not needed because:
1.)
I think remounting with sync option is no longer needed
when systemd is used because when systemd is used
reboot, halt, poweroff, and shutdown are replaced by
simple and fail-safe scripts that do a careful umount
plus sync to safely shut down the recovery system, cf.
https://github.com/rear/rear/pull/1011
2.)
I think remounting with sync option is in practice
mainly an annoyance because it makes writing
anything below /mnt/local basically unusable slow
so that in practice the admin cannot do much
in the recovery system after "rear recover" had finished:
RESCUE d25:~ # mount | grep sd /dev/sda2 on /mnt/local type ext4 (rw,relatime,sync,data=ordered) RESCUE d25:~ # time cat /dev/urandom | head -c 1024K >/mnt/local/urandom.data real 0m2.733s user 0m0.004s sys 0m0.283s RESCUE d25:~ # time cat /dev/urandom | head -c 10240K >/mnt/local/urandom.data real 0m26.318s user 0m0.008s sys 0m2.557s RESCUE d25:~ # time cat /dev/urandom | head -c 102400K >/mnt/local/urandom.data real 4m23.044s user 0m0.063s sys 0m25.480s RESCUE d25:~ # mount -o remount /dev/sda2 /mnt/local RESCUE d25:~ # mount | grep sd /dev/sda2 on /mnt/local type ext4 (rw,relatime,data=ordered) RESCUE d25:~ # time cat /dev/urandom | head -c 1024K >/mnt/local/urandom.data real 0m0.162s user 0m0.000s sys 0m0.165s RESCUE d25:~ # time cat /dev/urandom | head -c 10240K >/mnt/local/urandom.data real 0m0.886s user 0m0.000s sys 0m0.898s RESCUE d25:~ # time cat /dev/urandom | head -c 102400K >/mnt/local/urandom.data real 0m7.572s user 0m0.005s sys 0m7.599s
It is about 16 times slower for writing one single MB with 'sync'
and about 29 times slower for writing 10 MB with 'sync'
and about 34 times slower for writing 100 MB with 'sync'
i.e. it gets slower and slower the more there is to write
and to write one GB is in practice impossible because
the admin thinks it has hung up (at least I thought that
several times when I was hit by 'sync' ;-)
jsmeix commented at 2016-12-02 12:49:¶
I consider this issue to be fixed with
https://github.com/rear/rear/pull/1099
[Export of Github issue for rear/rear.]