On Thursday 24,January,2013 06:35 PM, Sven Joachim wrote: > On 2013-01-24 10:34 +0100, lina wrote: > >> I have some process if run in background, it always very slow, like: >> >> $ ps f | awk '{print $1, $2,$3,$4, $5}' >> >> 124201 pts/13 Ss+ 0:00 -bash >> 29572 pts/116 Ss+ 0:00 -bash >> 29275 pts/63 Ss+ 0:00 -bash >> 22080 pts/14 Ss+ 0:00 -bash >> 11581 pts/2 Ss 0:00 -bash >> 2920 pts/2 R+ 0:00 \_ >> 2921 pts/2 S+ 0:00 \_ >> 2922 pts/2 S+ 0:00 \_ >> 108014 pts/13 D 3:16 cal_dist >> 108013 pts/13 D 3:17 cal_dist >> 108012 pts/13 D 2:57 cal_dist >> 108011 pts/13 D 3:00 cal_dist >> 108010 pts/13 D 3:17 cal_dist >> 108009 pts/13 D 3:18 cal_dist >> 108008 pts/13 D 3:15 cal_dist >> 108007 pts/13 D 3:00 cal_dist >> 108006 pts/13 D 3:15 cal_dist >> 108005 pts/13 D 3:16 cal_dist >> 108004 pts/13 D 3:16 cal_dist >> 108003 pts/13 D 3:16 cal_dist >> 108002 pts/13 D 3:16 cal_dist >> 108001 pts/13 D 3:16 cal_dist >> 108000 pts/13 D 3:16 cal_dist >> 107999 pts/13 D 3:16 cal_dist >> >> I use something like >> >> echo"1 >> 2" > idx.txt >> >> for i in `seq w 1 1 16` > > This is not a valid call of seq, you probably meant `seq -w 1 1 16` > instead.
Typo here, haha ... thanks, > >> do >> >> cal_dist -i $i.in -o $i.out < idx.txt & >> >> done > > I have no idea what cal_dist is or does, but the processes are in state > "uninterruptible sleep" (that's what D stands for), i.e. they are > waiting for system calls to complete. Typically the only syscalls that > take any noticeable time are related to I/O, so most likely the > processes are waiting for your hard disk to deliver data from the $i.in > files. Or they are doing lots of fsync(2) calls on the $i.out files > which can cause a dramatic slowdown on some filesystems. Last night I spent some time to check the "D" stat. It's kinda of tricky, why my intuition tells me that those jobs run in foreground, not background, won't have such problem. Perhaps that's why I wish to run in foreground, I am not so familiar with "make j" in this situation, neither familiar with the xargs. > > Cheers, > Sven > > -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/510127d0.9000...@gmail.com