Repository navigation
options: add --nice process-priority controls - #1011
michaelmess-de wants to merge 24 commits into
Conversation
5a82ac5 to
1ef416f
Compare
aec9c56 to
5962831
Compare
ee71c1a to
f7a838c
Compare
|
Thanks for the work on this but I think the current implementation is too large and complex for the feature it provides, especially when process priority can already be managed with |
|
Hi @steadytao , This merge request is a successor of #933 and #945, thanks to @tridge and @devZer0 for your comments to help to improve the feature. |
f7a838c to
6199dac
Compare
|
Hmmmm. I am still a bit mixed on this one. Will try and organise my thoughts over this week/weekend. |
6199dac to
43dec56
Compare
|
I have reconsidered this after the latest update but the implementation is still more than 1000 lines across 14 files for functionality already available through nice, ionice, service managers and --rsync-path. The additional parsing, platform and remote-process surface is not proportionate to the feature. I do not think we should merge this approach but I would like some opinions from @tridge on the matter. |
43dec56 to
f4f9448
Compare
|
I think the average user will not wrickle around with --rsync-path to try to renice or ionice the process. Instead most people would be happy to just easily specify this as an option. |
f4f9448 to
15c6ccc
Compare
|
Hmmmm. I have been convinced. Will review. |
|
A bit more pressing matters at the moment. Will cycle back to this. |
steadytao
left a comment
There was a problem hiding this comment.
Run git diff --check as well
steadytao
left a comment
There was a problem hiding this comment.
Some other reviews outstanding as well. Thank you for your work thus far.
fb33061 to
13dba81
Compare
|
Hi @steadytao, thank you for your review. I hope that I have successfully resolved all the issues from it, but there are still some failing platform checks that I will have to look at, if they can be fixed or if I have to ignore them for the platform. Cheers, |
steadytao
left a comment
There was a problem hiding this comment.
Thanks you for your work. I had another proper pass over the current head. Please do not add a second light suite. The current three test files are already 955 lines; fold the local and remote strace cases into one Linux-only test and keep the parsing and forwarding coverage portable. The six red jobs do need fixing.
There are also two daemon bugs still outstanding: direct daemon transfers never apply the option after parsing it, and the sign check still lets a client raise I/O priority with be_0. I have left comments on both. Add one real direct-daemon regression once those are fixed as well please.
334d230 to
3a2bb40
Compare
|
Current state is:
When the tests on all three platforms succeed, we shouldn't have a failure issue due to the linux skip list. On other platforms the tests cat be easily skipped, when not supported by the platform. |
|
Going to rework this. |
|
Remaining issue now: The header file linux/ioprio.h is not available on almalinux, thus the test is skipped because the functionality is not available: |
|
Regarding nice/ionice in daemon mode: For renice a non-root and non-capable (CAP_SYS_NICE) user process cannot decrease the nice value; But for ionice the behaviour is different: Even for a normal process it is possible to assign every ionice value to the process, with exception of the realtime priority ("-c1"). Thus (re-)increasing io-priorities is possible, with the exeption of real-time priorities. Thus for ionice the current rsync behaviour is correct, but for nice in daemon mode we should forbid increasing the value. |
Introduced new option --nice=... to specify the nice/ionice level for the local/remote process
With this approach, all valid values for nice and ionice can be applied and successfully set, provided that any necessary permissions are available (root, CAP_SYS_NICE, CAP_SYS_ADMIN) for the affected process.
In case the priority cannot be set (Permission denied), rsync will just issue a warning and continue normally.
For keeping or lowering priority, that means nice values >= 0 and ionice values of NONE, BE_X, IDLE no special permissions are required.