From: Kimitoshi T. <kt...@cl...> - 2004-03-09 14:19:32
|
Hello all, I want to change priorities of remote jobs on bproc slaves. The normal "renice" command doesn't seem to affect priorities on slaves. (by monitoring /proc/PID/stat) I tried to change priority of a proccess using bpsh. $ bpsh 1 -n sleep 9000 & $ bpstat -p PID Node 17634 1 $ bpsh 1 ps -ef UID PID PPID C STIME TTY TIME CMD ktaka 17634 17632 0 Mar25 ? 00:00:00 sleep 9000 ktaka 17729 17727 0 Mar25 ? 00:00:00 ps -ef $ bpsh 1 renice 20 17634 renice: 17634: getpriority: No such process How can I renice remote proccess? Best regards, Kimitoshi Takahashi |
From: <er...@he...> - 2004-03-09 21:06:19
|
On Tue, Mar 09, 2004 at 11:10:20PM +0900, Kimitoshi Takahashi wrote: > Hello all, > > I want to change priorities of remote jobs on bproc slaves. > The normal "renice" command doesn't seem to affect priorities on slaves. > (by monitoring /proc/PID/stat) > > I tried to change priority of a proccess using bpsh. > > $ bpsh 1 -n sleep 9000 & > $ bpstat -p > PID Node > 17634 1 > $ bpsh 1 ps -ef > UID PID PPID C STIME TTY TIME CMD > ktaka 17634 17632 0 Mar25 ? 00:00:00 sleep 9000 > ktaka 17729 17727 0 Mar25 ? 00:00:00 ps -ef > > $ bpsh 1 renice 20 17634 > renice: 17634: getpriority: No such process > > How can I renice remote proccess? renice is one of those syscalls I missed which means it doesn't do the process ID mapping on the remote node or get forwarded correctly... - Erik |
From: Kimitoshi T. <kt...@cl...> - 2004-03-11 14:48:25
|
Hello Erik, I think it would be nice if the renice command on the master were correctly forwarded to slave nodes so that we are less dependent on queing systemes to prioritize jobs. What do you think ? I still can't understand why I couldn't bpsh renice, since the PID on the slave was obtained by "bpsh 1 ps -ef" and hence it should be local pid. Would you elaborate a little more ? Anyway, I really like the bproc concept, and hope it will realize true light weight SSI. It's a shame that I don't have enough skill to contribute ... Kimitoshi Takahashi er...@he... さんは書きました: >On Tue, Mar 09, 2004 at 11:10:20PM +0900, Kimitoshi Takahashi wrote: >> Hello all, >> >> I want to change priorities of remote jobs on bproc slaves. >> The normal "renice" command doesn't seem to affect priorities on slaves. >> (by monitoring /proc/PID/stat) >> >> I tried to change priority of a proccess using bpsh. >> >> $ bpsh 1 -n sleep 9000 & >> $ bpstat -p >> PID Node >> 17634 1 >> $ bpsh 1 ps -ef >> UID PID PPID C STIME TTY TIME CMD >> ktaka 17634 17632 0 Mar25 ? 00:00:00 sleep 9000 >> ktaka 17729 17727 0 Mar25 ? 00:00:00 ps -ef >> >> $ bpsh 1 renice 20 17634 >> renice: 17634: getpriority: No such process >> >> How can I renice remote proccess? > >renice is one of those syscalls I missed which means it doesn't do the >process ID mapping on the remote node or get forwarded correctly... > >- Erik |
From: <er...@he...> - 2004-03-11 16:15:39
|
On Thu, Mar 11, 2004 at 11:37:32PM +0900, Kimitoshi Takahashi wrote: > Hello Erik, > > I think it would be nice if the renice command on the master were correctly > forwarded to slave nodes so that we are less dependent on queing systemes to prioritize jobs. > What do you think ? It's certainly a good thing to do. It's an unintentional omission. It's on the to-do list of things to fix but there's a lot of things on that list. I'm working on a port to Linux 2.6 in between helping out with other stuff. > I still can't understand why I couldn't bpsh renice, > since the PID on the slave was obtained by "bpsh 1 ps -ef" and hence it should be local pid. > Would you elaborate a little more ? When you do a ps on the slave node (via bpsh) you see the same process IDs that the front end sees. You'll note that a process doesn't appear to change its PID when it moves to the back end. The proc file system is modified to show the pids that the front end sees. This way everything stays consistent when processes move around. The slave node has different process IDs internally but you don't see those. You can see them if you turn off the PID mapping in /proc like this: bpsh 1 -O /proc/sys/bproc/proc_pid_map echo 0 Putting a zero in that file turns off PID mapping. 1 means map for non-root. 2 means map for everybody. It defaults to 2. If you turn it off, then you get to see everything on the node. You should be able to see that the real pid is in that case. If you use the real pid, then I think renice should work. > Anyway, I really like the bproc concept, and hope it will realize > true light weight SSI. Me too :) - Erik |
From: Kimitoshi T. <kt...@cl...> - 2004-04-04 19:49:38
|
Sorry for the very slow response. er...@he... wrote: >> I still can't understand why I couldn't bpsh renice, >> since the PID on the slave was obtained by "bpsh 1 ps -ef" and hence it should be local pid. >> Would you elaborate a little more ? > >When you do a ps on the slave node (via bpsh) you see the same process >IDs that the front end sees. You'll note that a process doesn't >appear to change its PID when it moves to the back end. The proc file >system is modified to show the pids that the front end sees. This way >everything stays consistent when processes move around. The slave >node has different process IDs internally but you don't see those. Thank you very much for the explanation. >You can see them if you turn off the PID mapping in /proc like this: > >bpsh 1 -O /proc/sys/bproc/proc_pid_map echo 0 > >Putting a zero in that file turns off PID mapping. 1 means map for >non-root. 2 means map for everybody. It defaults to 2. If you turn >it off, then you get to see everything on the node. You should be >able to see that the real pid is in that case. If you use the real >pid, then I think renice should work. This worked. Thank you again. Kimitoshi Takahashi |