Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip 'remount_sync' functionality if systemd is used #1097

Closed
jsmeix opened this issue Dec 2, 2016 · 1 comment
Closed

Skip 'remount_sync' functionality if systemd is used #1097

jsmeix opened this issue Dec 2, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@jsmeix
Copy link
Member

jsmeix commented Dec 2, 2016

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.
#1088 (comment)

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.
#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 jsmeix added cleanup enhancement Adaptions and new features labels Dec 2, 2016
@jsmeix jsmeix added this to the Rear v2.00 milestone Dec 2, 2016
@jsmeix jsmeix self-assigned this Dec 2, 2016
jsmeix added a commit that referenced this issue Dec 2, 2016
…s_used_issue1097

Skip remount sync when systemd is used.
Remounting all what is mounted below /mnt/local
with sync option is no longer needed when systemd is used
because when systemd is used reboot, halt, poweroff,
and shutdown are replaced by scripts that do umount
plus sync to safely shut down the recovery system,
see #1011
and #1097
Furthermore remounting with sync option could become
in practice a major annoyance because it makes writing
anything below /mnt/local basically unusable slow,
see #1097
@jsmeix
Copy link
Member Author

jsmeix commented Dec 2, 2016

I consider this issue to be fixed with
#1099

@jsmeix jsmeix closed this as completed Dec 2, 2016
jsmeix added a commit that referenced this issue Dec 5, 2016
…is_used_issue1097

Skip remount async when systemd is used.
Remounting with async option is not needed
when systemd is used because when systemd
is used remounting with sync option is skipped and
to aviod needless operations remounting with async
option is also skipped, see
#1097
and
#1099
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant