Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] High cpu usage
From: Jingcha Joba (pukkimonkey_at_[hidden])
Date: 2013-02-28 11:42:56


Hi ,

First, I don't see any cpu utilization but %time (of a function wrt others in a process/application).
Generally for high cpu utilization, there could be many reason. Two of them that comes to my mind is,

1. Depends on the network stack, eg. the "tcp" way will use more CPU than the "openib" way.
2. Polling is generally good for performance but comes with a penalty of high CPU utilization.

Also not sure if a context switch costs CPU utilization, if so gettimeofday could be a reason as for each call there is a user to kernel switch and back to user.

--
Joba
Sent from my iPhone
On Feb 28, 2013, at 7:34 AM, Bokassa <bokassa_at_[hidden]> wrote:
> Hi,
>   I notice that a simple MPI program in which rank 0 sends 4 bytes to each rank and receives a reply uses a 
>   considerable amount of CPU in system call.s
> 
>   % time     seconds  usecs/call     calls    errors syscall
> ------ ----------- ----------- --------- --------- ----------------
> 61.10    0.016719           3      5194           gettimeofday
> 20.77    0.005683           2      2596           epoll_wait
> 18.13    0.004961           2      2595           sched_yield
>  0.00    0.000000           0         4           write
>  0.00    0.000000           0         4           stat
>  0.00    0.000000           0         2           readv
>  0.00    0.000000           0         2           writev
> ------ ----------- ----------- --------- --------- ----------------
> 100.00    0.027363                 10397           total
> 
> and
> 
>  Process 2512 attached - interrupt to quit
> 16:32:17.793039 sched_yield()           = 0 <0.000078>
> 16:32:17.793276 gettimeofday({1362065537, 793330}, NULL) = 0 <0.000070>
> 16:32:17.793460 epoll_wait(4, {}, 32, 0) = 0 <0.000114>
> 16:32:17.793712 gettimeofday({1362065537, 793773}, NULL) = 0 <0.000097>
> 16:32:17.793914 sched_yield()           = 0 <0.000089>
> 16:32:17.794107 gettimeofday({1362065537, 794157}, NULL) = 0 <0.000083>
> 16:32:17.794292 epoll_wait(4, {}, 32, 0) = 0 <0.000072>
> 16:32:17.794457 gettimeofday({1362065537, 794541}, NULL) = 0 <0.000115>
> 16:32:17.794695 sched_yield()           = 0 <0.000079>
> 16:32:17.794877 gettimeofday({1362065537, 794927}, NULL) = 0 <0.000081>
> 16:32:17.795062 epoll_wait(4, {}, 32, 0) = 0 <0.000079>
> 16:32:17.795244 gettimeofday({1362065537, 795294}, NULL) = 0 <0.000082>
> 16:32:17.795432 sched_yield()           = 0 <0.000096>
> 16:32:17.795761 gettimeofday({1362065537, 795814}, NULL) = 0 <0.000079>
> 16:32:17.795940 epoll_wait(4, {}, 32, 0) = 0 <0.000080>
> 16:32:17.796123 gettimeofday({1362065537, 796191}, NULL) = 0 <0.000121>
> 16:32:17.796388 sched_yield()           = 0 <0.000127>
> 16:32:17.796635 gettimeofday({1362065537, 796722}, NULL) = 0 <0.000121>
> 16:32:17.796951 epoll_wait(4, {}, 32, 0) = 0 <0.000089>
> 
> What is the purpose of this behavior.
> 
> Thanks,
>            David
> 
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users