[asterisk-users] asterisk optimalization
marek cervenka
cervajs at fpf.slu.cz
Thu Jan 24 23:05:21 CST 2008
> marek cervenka <cervajs at fpf.slu.cz> writes:
>
>> hi,
>>
>> i'm testing asterisk 1.4/1.2 in the following scenario
>> centos5/cpu quad xeon E5335 2.0Ghz
>> - test clients behind nat
>> - 1500+ testing instances - reregister option from 1min to 1hour
>> - qualify set to 5000
>>
>> top shows over 100% cpu. cpu cores sometimes go to 95%
>> with htop i see ~16threads but only one child have ~95% cpu
>> (how i can get info about that thread? what he is doing?)
>>
> oprofile can probably tell you. It can be a bit difficult to get
> all the debugging information into the right places so oprofile works,
> but it's very helpful.
this is strace -p ppid_of_problematic_thread
can you look if you see any anomalies?
--cut--
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 14
connect(14, {sa_family=AF_INET, sin_port=htons(50195),
sin_addr=inet_addr("filtered")}, 16) = 0
getsockname(14, {sa_family=AF_INET, sin_port=htons(32777),
sin_addr=inet_addr("filtered")}, [16]) = 0
close(14) = 0
time(NULL) = 1201236754
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
gettimeofday({1201236754, 532554}, NULL) = 0
sendto(11, "OPTIONS sip:filtered at 10.72.20.4"..., 497, 0,
{sa_family=AF_INET, sin_port=htons(5060), sin_addr=inet_addr("filtered")},
16) = 497
gettimeofday({1201236754, 532798}, NULL) = 0
gettimeofday({1201236754, 532909}, NULL) = 0
gettimeofday({1201236754, 533010}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 533903}, NULL) = 0
poll([{fd=11, events=POLLIN}], 1, 17) = 0
gettimeofday({1201236754, 551423}, NULL) = 0
gettimeofday({1201236754, 551535}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 551994}, NULL) = 0
poll([{fd=11, events=POLLIN, revents=POLLIN}], 1, 20) = 1
recvfrom(11, "SIP/2.0 200 OK\r\nTo: <sip:filtered"..., 4095, 0,
{sa_family=AF_INET, sin_port=htons(5060), sin_addr=inet_addr("filtered")},
[16]) = 422
gettimeofday({1201236754, 557006}, NULL) = 0
gettimeofday({1201236754, 557065}, NULL) = 0
gettimeofday({1201236754, 557397}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 557794}, NULL) = 0
poll([{fd=11, events=POLLIN}], 1, 14) = 0
gettimeofday({1201236754, 571604}, NULL) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 14
connect(14, {sa_family=AF_INET, sin_port=htons(50195),
sin_addr=inet_addr("filtered")}, 16) = 0
getsockname(14, {sa_family=AF_INET, sin_port=htons(32777),
sin_addr=inet_addr("filtered")}, [16]) = 0
close(14) = 0
time(NULL) = 1201236754
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
gettimeofday({1201236754, 572328}, NULL) = 0
sendto(11, "OPTIONS sip:filtered at 10.0.0.4 S"..., 481, 0,
{sa_family=AF_INET, sin_port=htons(5060), sin_addr=inet_addr("filtered")},
16) = 481
gettimeofday({1201236754, 572462}, NULL) = 0
gettimeofday({1201236754, 572498}, NULL) = 0
gettimeofday({1201236754, 572566}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 572859}, NULL) = 0
poll([{fd=11, events=POLLIN}], 1, 1) = 0
gettimeofday({1201236754, 573604}, NULL) = 0
gettimeofday({1201236754, 573651}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 573872}, NULL) = 0
poll([{fd=11, events=POLLIN}], 1, 5) = 0
gettimeofday({1201236754, 578602}, NULL) = 0
gettimeofday({1201236754, 578652}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 578863}, NULL) = 0
poll([{fd=11, events=POLLIN, revents=POLLIN}], 1, 11) = 1
recvfrom(11, "\0\0\0\0", 4095, 0, {sa_family=AF_INET,
sin_port=htons(5060), sin_addr=inet_addr("filtered")}, [16]) = 4
gettimeofday({1201236754, 587424}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 587639}, NULL) = 0
poll([{fd=11, events=POLLIN}], 1, 2) = 0
gettimeofday({1201236754, 589599}, NULL) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 14
connect(14, {sa_family=AF_INET, sin_port=htons(50195),
sin_addr=inet_addr("filtered")}, 16) = 0
getsockname(14, {sa_family=AF_INET, sin_port=htons(32777),
sin_addr=inet_addr("filtered")}, [16]) = 0
close(14) = 0
time(NULL) = 1201236754
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
gettimeofday({1201236754, 590247}, NULL) = 0
sendto(11, "OPTIONS sip:filtered at 10.0.222.2"..., 499, 0,
{sa_family=AF_INET, sin_port=htons(5060), sin_addr=inet_addr("filtered")},
16) = 499
gettimeofday({1201236754, 590382}, NULL) = 0
gettimeofday({1201236754, 590424}, NULL) = 0
gettimeofday({1201236754, 590479}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 590742}, NULL) = 0
poll([{fd=11, events=POLLIN}], 1, 3) = 0
gettimeofday({1201236754, 593600}, NULL) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 14
connect(14, {sa_family=AF_INET, sin_port=htons(50195),
sin_addr=inet_addr("filtered")}, 16) = 0
getsockname(14, {sa_family=AF_INET, sin_port=htons(32777),
sin_addr=inet_addr("filtered")}, [16]) = 0
close(14) = 0
time(NULL) = 1201236754
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
gettimeofday({1201236754, 594242}, NULL) = 0
sendto(11, "OPTIONS sip:filtered at 192.168.1."..., 491, 0,
{sa_family=AF_INET, sin_port=htons(5060), sin_addr=inet_addr("filtered")},
16) = 491
gettimeofday({1201236754, 594372}, NULL) = 0
gettimeofday({1201236754, 594415}, NULL) = 0
gettimeofday({1201236754, 594465}, NULL) = 0
time(NULL) = 1201236754
time(NULL) = 1201236754
gettimeofday({1201236754, 594731}, NULL) = 0
--cut--
---------------------------------------
Marek Cervenka
=======================================
More information about the asterisk-users
mailing list