I need to run some long and heavy commands but at the same time I'd like to keep my desktop system responsive. Examples: btrfs deduplication, btrfs balance, etc. I don't mind if such commands take longer to finish if I give them a lower priority, but my system should be responsive at all times. Using
nice -n 19 and
ionice -c 3 should solve my problem, but I'm not sure which command should come first for maximum benefit.
# nice -n 19 ionice -c 3 btrfs balance start --full-balance /
# ionice -c 3 nice -n 19 btrfs balance start --full-balance /
Is there some subtle difference between options A and B? Are they equivalent perhaps?