Re: [1/2OT] the stat D

2013-01-24 Thread lina

 
 I am new to the xargs, so I don't know how to let it run in background.

typo, *not* run in background.

Thanks,


-- 
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/51010050.2070...@gmail.com



Re: [1/2OT] the stat 'D'

2013-01-24 Thread Morel BĂ©renger

 I am new to the xargs, so I don't know how to let it run in background.
 The waiting is going to kill me, I mean so slow.


 Thanks ahead for your suggestions,

No idea about what is xargs, but I guess that simply calling your script
from a console with a '' at end of command will be ok, aka $myscript.sh



-- 
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/0950073b1f30cbbdeb01eb6542c7a6b0.squir...@www.sud-ouest.org



Re: [1/2OT] the stat D

2013-01-24 Thread lina
On Thursday 24,January,2013 05:34 PM, lina wrote:
 Hi,
 
 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
 
 echo1
 2  idx.txt
 
 for i in `seq w 1 1 16`
 do
 
 cal_dist -i $i.in -o $i.out  idx.txt 
 
 done

The xargs alternative is something like:

$ seq -w 1 1 16 | xargs -n 1 -P 8 -I A cal_dist ../../dist_A.out

But there is a problem, I need to select the idx.txt, namely pick 1
2 in prompt during the running of cal_dist, but I am a bit stuck with
this.


-- 
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/5101070c.7020...@gmail.com



Re: [1/2OT] the stat D

2013-01-24 Thread Sven Joachim
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

 echo1
 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.

 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.

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/87d2wu50nb@turtle.gmx.de



Re: [1/2OT] the stat D

2013-01-24 Thread lina
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

 echo1
 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



Re: [1/2OT] the stat D

2013-01-24 Thread lina

 
 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.

In particular, users are asked to run only one background job at a
time. from

http://www.washington.edu/computing/unix/background.html

now I know why there are so many D for those background jobs.

if I am wrong, please let me know,

Thanks,


-- 
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/51014b10.5040...@gmail.com