Hello All,
I have a question about a “nice” resource. How this resource should actually work? This is some kind of priority? I added this resource to the “resources” in sched_config and assigned different “nice” value to each node but it does nothing… I tried “qsub -I -l nice=” and always got the same node. Documentation mention this resource(AG-316, RG-323) but it is too brief.
Thank you
Have you tried adding it to you select line. For example
-l select=1:ncpus=3:nice=2
RG-323: “Can be requested only outside of a select statement.”
$ qsub -I -l select=2:ncpus=1:nice=2
qsub: Resource invalid in “select” specification: nice
The special resource “nice” would not be expected to have an effect on the node selection for the job, it is expected to change the nice process value, though. Here is an example showing how it works (**emphasis in top output mine**):
[user1@centos7 tmp]$ echo "sleep 100000" | qsub
33.centos7.prog.altair.com
[user1@centos7 tmp]$ echo "sleep 100000" | qsub -lnice=10
34.centos7.prog.altair.com
[root@centos7 tmp]# qstat -a
centos7.prog.altair.com:
Req'd Req'd Elap
Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
--------------- -------- -------- ---------- ------ --- --- ------ ----- - -----
33.centos7.prog user1 workq STDIN 4327 1 1 -- -- R 00:01
34.centos7.prog user1 workq STDIN 4368 1 1 -- -- R 00:01
[root@centos7 tmp]# qstat -a
centos7.prog.altair.com:
Req'd Req'd Elap
Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
--------------- -------- -------- ---------- ------ --- --- ------ ----- - -----
33.centos7.prog user1 workq STDIN 4327 1 1 -- -- R 00:01
34.centos7.prog user1 workq STDIN 4368 1 1 -- -- R 00:01
Job 33, no nice request:
[root@centos7 tmp]# ps -efj | grep 4327
user1 4327 3265 4327 4327 0 12:50 ? 00:00:00 -bash
user1 4361 4327 4327 4327 0 12:50 ? 00:00:00 -bash
user1 4362 4361 4327 4327 0 12:50 ? 00:00:00 sleep 100000
root 4440 3079 4439 3079 0 12:52 pts/0 00:00:00 grep --color=auto 4327
[root@centos7 tmp]# top -b -p4362 -n1
top - 12:53:43 up 19:13, 3 users, load average: 0.01, 0.06, 0.06
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 0.1 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8011144 total, 7038784 free, 391616 used, 580744 buff/cache
KiB Swap: 2183164 total, 2183164 free, 0 used. 7340456 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4362 user1 20 **0** 107892 624 532 S 0.0 0.0 0:00.00 sleep
Job 34, nice=10 request:
[root@centos7 tmp]# ps -efj | grep 4368
user1 4368 3265 4368 4368 0 12:50 ? 00:00:00 -bash
user1 4402 4368 4368 4368 0 12:50 ? 00:00:00 -bash
user1 4403 4402 4368 4368 0 12:50 ? 00:00:00 sleep 100000
root 4456 3079 4455 3079 0 12:54 pts/0 00:00:00 grep --color=auto 4368
[root@centos7 tmp]# top -b -p4403 -n1
top - 12:54:13 up 19:14, 3 users, load average: 0.01, 0.06, 0.06
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 0.1 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8011144 total, 7039156 free, 391228 used, 580760 buff/cache
KiB Swap: 2183164 total, 2183164 free, 0 used. 7340836 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4403 user1 30 **10** 107892 624 532 S 0.0 0.0 0:00.00 sleep
OK, thank you for the answer.
I’ve filed a doc bug for this.