now I am reruning the big procedure :
nohup /usr/bin/time mclient -d mydb -s "CALL gwac_uniquecatalog(99)" >log0430-1800.txt 2>&1 &

I "snapshot" the top command result as follows:
top - 18:00:54 up 26 days, 21:08, 11 users,  load average: 0.99, 0.87, 0.67
Tasks: 277 total,   2 running, 274 sleeping,   1 stopped,   0 zombie
Cpu(s): 12.5%us,  0.1%sy,  0.0%ni, 86.9%id,  0.5%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  16310048k total,  2147148k used, 14162900k free,   272480k buffers
Swap: 33554424k total,      452k used, 33553972k free,  1057720k cached

  PID    USER      PR  NI  VIRT    RES    SHR S %CPU %MEM  TIME+  COMMAND                                                                                                   
21916 mengw     20   0 1613m 136m  12m S 100.8  0.9     8:41.01 mserver5                                                                                                 
    1 root      20   0 19356 1444 1132 S  0.0  0.0   0:03.42 init                                                                                                      
    2 root      20   0     0    0    0 S  0.0  0.0   0:01.61 kthreadd                                                                                                  
    3 root      RT   0     0    0    0 S  0.0  0.0   0:02.32 migration/0                                                                                               
    4 root      20   0     0    0    0 S  0.0  0.0   0:02.02 ksoftirqd/0                                                                                               
    5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                                                                                               
    6 root      RT   0     0    0    0 S  0.0  0.0   0:01.55 watchdog/0                                                                                                
    7 root      RT   0     0    0    0 S  0.0  0.0   0:00.72 migration/1                                                                                               
    8 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/1                                                                                               
    9 root      20   0     0    0    0 S  0.0  0.0   0:02.10 ksoftirqd/1 

mserver5 use cpu 100.8% percent, so there is no concurrent process.

Regards, 
Meng

------------------ 原始邮件 ------------------
发件人: "Martin Kersten";<martin@monetdb.org>;
发送时间: 2014年4月30日(星期三) 下午5:49
收件人: "Communication channel for MonetDB users"<users-list@monetdb.org>;
主题: Re: 回复: why the same procedure (in shell or in sql) cost so differenttime?

On 30/04/14 11:43, integrity wrote:
Hi, 
the elapsed time is 6:30.39, means 6 minutes 30.39 seconds.
No, you have to look at the inputs/output and pagefaults numbers
in both runs.  This will show if you run hot/cold

Having concurrent load on your machine also may have an impact.
For example, browsers can take a substantial amount of memory
and cpu away from database processing.

To understand this, you can look at the output of 'uptime' and 'top'

Regards, Meng
------------------ Original ------------------
From:  "Martin Kersten";<Martin.Kersten@cwi.nl>;
Date:  Wed, Apr 30, 2014 05:38 PM
To:  "users-list"<users-list@monetdb.org>;
Subject:  Re: 回复: why the same procedure (in shell or in sql) cost so differenttime?



On 30/04/14 11:27, integrity wrote:
> Hi,
...
>
> On 30/04/14 10:59, integrity wrote:
>  > Hi All,
>  > I want to execute a batch of small sql stored procedures, for
> convenience, i put them totally in another big stored procedure:
> gwac_uniquecatalog, it cost 58 minutes:
>  > #!/bin/bash
>  > time mclient -d mydb -s "CALL gwac_uniquecatalog(99);"
>  > real    58m3.518s

>  >
>  > The time is so long that I tried to execute the small stored
> procedures one by one in SHELL, it only cost 6.5 minutes
>  > /usr/bin/time ./gwac_uniquecatalog.sh 99
>  > 2.82user 3.25system 6:30.39elapsed 1%CPU (0avgtext+0avgdata
> 10880maxresident)k
>  > 0inputs+0outputs (0major+980011minor)pagefaults 0swaps
>  >
What were the numbers of /usr/bin/time for the long run?
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list
.


_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list