[bug?] backup_nice not really respected?

websafe

Verified User
Joined
Jun 15, 2010
Messages
103
Location
Opole, PL
Server Version: 1.50.0


Code:
# grep backup_nice /usr/local/directadmin/conf/directadmin.conf 
backup_nice=10

but, during backup:

Code:
# ps lax | grep /bin/tar

4   739 23638 27088  30  10  11300  1264 wait   SN   ?          0:00 sh -c /bin/nice -n 10 /bin/tar czfp /home/tmp/admin.27088/username/user.resellername.username.tar.gz  --exclude-from=/home/tmp/admin.27088/username/backup/non_readable_files.list  -C /home/tmp/admin.27088/username backup non_readable_files -C /home/username/ --exclude-from=/home/username//.backup_exclude_paths  domains > /dev/null
                         ^^

0   739 23639 23638  39  19  20296  1896 sync_p DN   ?          1:14 /bin/tar czfp /home/tmp/admin.27088/username/user.resellername.username.tar.gz --exclude-from=/home/tmp/admin.27088/username/backup/non_readable_files.list -C /home/tmp/admin.27088/username backup non_readable_files -C /home/username/ --exclude-from=/home/username//.backup_exclude_paths domains
                         ^^

As you can see, the actual /bin/tar process has priority 19, not the expected 10.
 
yes.

The problem is that the first call is correctly as it sets the prio as defined in het directadmin.conf, but the nice -n XX should not be used as nice -n XX ADDS XX to the current nice level.
So the backup doesn't run with nice = 10 but with nice = 20, but as 19 is the maximum level so everything above 19 will be set to 19.
 
Exactly. "add integer..."


Code:
$ nice --help
Usage: nice [OPTION] [COMMAND [ARG]...]
Run COMMAND with an adjusted niceness, which affects process scheduling.
With no COMMAND, print the current niceness.  Niceness values range from
-20 (most favorable to the process) to 19 (least favorable to the process).

Mandatory arguments to long options are mandatory for short options too.
  -n, --adjustment=N   add integer N to the niceness (default 10)
                      ^^^^^
      --help     display this help and exit
      --version  output version information and exit
 
Back
Top