Using epoll in linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everybody,

I'm experiencing some trouble here with high cpu usage when I compile
my application for a large number of calls, and I would like to try
using epoll. I don't know if this would help, but it may be a good
idea to try it out. I tried setting export LINUX_POLL := epoll inside
build.mak, but It didn't use epoll. I've already set the following
parameters:

media_cfg.ec_tail_len  = 0; 
media_cfg.quality  = 1;
media_cfg.clock_rate  = 8000;
media_cfg.no_vad = PJ_TRUE;

debug level is zero, and I compiled both the api and my application
without a debug flag.

using the "top" application (I'm using linux) I could see the thread
that is using the CPU power, it has a PID one number bigger than the
first thread (main application thread). I didn't find a way to get
the name of the thread inside the application just with the pid, but
I'm pretty sure it should be the first thread created by application,
and I don't know which one is it(pjsua worker thread, media,
clock...). with this I may reduce the scope to find the problem. I
don't think It has to do with my code, since I made a new application
that just receives a call and plays a wav when media is ready and it
gets a high cpu usage also. If I start my application with a small
number in pjsua_config::max_calls it has no problems, but if I put a
large number like 500 calls for example, the cpu usage goes high with
as little as 5 calls. I tested the same code against version 0.7.0 of
the api and the same problem happens. My current code is running in
api r1629. The cpu usage is not constant, it comes in bursts of a few
seconds and then some time at a low usage (shows 0% in "top"). if I
increase the number of call the amount of time of low cpu usage
reduces until it disappears with about 20 concurrent calls.

I did some tests with sipp and the cpu usage is low, I don't really
know why, maybe it doesn't send any audio packets or something else.

All my test call that showed the problem where made from softphones
in other computers, different versions too (twinkle in linux and
xlite in windows). I tested the application in different machines,
all running linux.

I'm guessing that the use of epoll may help because I talked about
this problem a long time ago in the list and some people using
windows reported back that they don't have the problem, so this
should be related to something specific to linux, but I'm not really
sure here.

thanks for the great job in the api,


Thiago


      Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento!
http://br.mail.yahoo.com/



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux