< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] Awful performance on Leopard


I used Shark. Here's a report (I have underlined the most salient lines):

# Report 1 - Session 8 - Time Profile of testStack
SharkProfileViewer
# Generated from the visible portion of the outline view
+ 89.7% lo_unix_scall (mach_kernel)
| + 89.5% unix_syscall (mach_kernel)
| | + 87.7% connect_nocancel (mach_kernel)
| | | + 87.6% soconnectlock (mach_kernel)
| | | | + 87.2% sockwall_sflt_connect_out (com.apple.nke.applicationfirewall)
| | | | | + 87.1% sw_connection_find (com.apple.nke.applicationfirewall)
| | | | | | - 0.0% sw_connection_add (com.apple.nke.applicationfirewall)
| | | | | |   0.0% mbuf_trailingspace (mach_kernel)
| | | | | |   0.0% mbuf_data (mach_kernel)
| | | | | |   0.0% m_trailingspace (mach_kernel)
| | | | | |   0.0% blkclr (mach_kernel)
| | | | | - 0.1% sockaddr_to_str (com.apple.nke.applicationfirewall)
| | | | | - 0.0% sockwall_unlock (com.apple.nke.applicationfirewall)
| | | | | - 0.0% sockwall_lock (com.apple.nke.applicationfirewall)
| | | | - 0.3% udp_ctloutput (mach_kernel)
| | | | - 0.0% socket_lock (mach_kernel)
| | | | - 0.0% sodisconnectlocked (mach_kernel)
| | | |   0.0% sockwall_lock (com.apple.nke.applicationfirewall)
| | | |   0.0% udp_lock (mach_kernel)
| | | |   0.0% sw_connection_find (com.apple.nke.applicationfirewall)
| | | |   0.0% socket_unlock (mach_kernel)
| | | - 0.1% file_drop (mach_kernel)
| | | - 0.0% mac_socket_check_connect (mach_kernel)
| | | - 0.0% file_socket (mach_kernel)
| | |   0.0% sock_getlistener (mach_kernel)
| | |   0.0% mac_policy_list_conditional_busy (mach_kernel)
| | |   0.0% lck_mtx_lock_spin (mach_kernel)
| | |   0.0% current_proc (mach_kernel)
| | - 1.1% write_nocancel (mach_kernel)
| | - 0.4% select_nocancel (mach_kernel)
| | - 0.2% read_nocancel (mach_kernel)
| | - 0.1% getsockname (mach_kernel)
| |   0.0% __pthread_testcancel (mach_kernel)
| |   0.0% munge_wwwwwwww (mach_kernel)
| |   0.0% in_setsockaddr (mach_kernel)
| |   0.0% nosys (mach_kernel)
| |   0.0% mac_socket_check_connect (mach_kernel)
| |   0.0% blkclr (mach_kernel)
| |   0.0% zfree (mach_kernel)
| |   0.0% wait_queue_set_size (mach_kernel)
| |   0.0% socketpair (mach_kernel)
| |   0.0% select (mach_kernel)
| |   0.0% itimerfix (mach_kernel)
| |   0.0% file_socket (mach_kernel)
| |   0.0% current_task (mach_kernel)
|   0.0% getsockname (mach_kernel)
|   0.0% current_thread (mach_kernel)
|   0.0% write_nocancel (mach_kernel)
|   0.0% write (mach_kernel)
|   0.0% select_nocancel (mach_kernel)
|   0.0% select (mach_kernel)
|   0.0% read_nocancel (mach_kernel)
|   0.0% read (mach_kernel)
|   0.0% kauth_cred_uthread_update (mach_kernel)
|   0.0% get_bsdthread_info (mach_kernel)
|   0.0% current_task (mach_kernel)
|   0.0% connect_nocancel (mach_kernel)
+ 10.2% start (testStack)
| + 10.2% main (testStack)
| | - 7.3% resip::SipStack::process(resip::FdSet&) (testStack)
| | - 0.7% resip::Helper::makeResponse(resip::SipMessage&, resip::SipMessage const&, int, resip::Data const&, resip::Data const&, resip::Data const&) (testStack)
| | - 0.7% resip::SipMessage::~SipMessage [in-charge deleting]() (testStack)
| | - 0.5% resip::Helper::makeRegister(resip::NameAddr const&, resip::NameAddr const&, resip::NameAddr const&) (testStack)
| | - 0.4% resip::SipStack::send(resip::SipMessage const&, resip::TransactionUser*) (testStack)
| | - 0.1% resip::SipMessage::~SipMessage [not-in-charge]() (testStack)
| | - 0.1% resip::SipMessage::SipMessage[not-in-charge](resip::Transport const*) (testStack)
| | - 0.1% resip::SipStack::buildFdSet(resip::FdSet&) (testStack)
| | - 0.0% resip::SipMessage::header(resip::H_CSeq const&) (testStack)
| | - 0.0% resip::SipStack::receive() (testStack)
| |   0.0% select$DARWIN_EXTSN (libSystem.B.dylib)
| |   0.0% resip::SipMessage::freeMem() (testStack)
| |   0.0% resip::Helper::getResponseCodeReason(int, resip::Data&) (testStack)
| |   0.0% resip::TransactionController::buildFdSet(resip::FdSet&) (testStack)
| |   0.0% resip::SipMessage::header(resip::H_MaxForwards const&) (testStack)
| |   0.0% resip::Helper::computeCallId() (testStack)
| | - 0.0% resip::DnsStub::buildFdSet(resip::FdSet&) (testStack)
| |   0.0% std::vector<resip::HeaderFieldValueList, std::allocator<resip::HeaderFieldValueList> >::reserve(unsigned long) (testStack)
| |   0.0% resip::Via::Via[not-in-charge]() (testStack)
| |   0.0% resip::SipMessage::isResponse() const (testStack)
| |   0.0% resip::RequestLine::~RequestLine [in-charge]() (testStack)
| |   0.0% resip::Random::getRandomHex(unsigned) (testStack)
| |   0.0% resip::ParserCategory::~ParserCategory [not-in-charge]() (testStack)
| |   0.0% resip::ParserCategory::exists(resip::ParamBase const&) const (testStack)
| |   0.0% resip::NameAddr::~NameAddr [in-charge]() (testStack)
| | - 0.0% resip::NameAddr::uri() (testStack)
| | - 0.0% resip::Log::Guard::~Guard [not-in-charge]() (testStack)
| |   0.0% resip::DnsStub::process(resip::FdSet&) (testStack)
| | - 0.0% genericLogCheckLevel(resip::Log::Level, resip::Subsystem const&) (testStack)
| | - 0.0% free (libSystem.B.dylib)
|   0.0% select$UNIX2003 (libSystem.B.dylib)
|   0.0% resip::SipStack::send(resip::SipMessage const&, resip::TransactionUser*) (testStack)
|   0.0% resip::SipMessage::SipMessage[not-in-charge](resip::Transport const*) (testStack)
|   0.0% resip::Helper::makeResponse(resip::SipMessage&, resip::SipMessage const&, int, resip::Data const&, resip::Data const&, resip::Data const&) (testStack)
|   0.0% resip::DnsStub::buildFdSet(resip::FdSet&) (testStack)
- 0.0% lo_alltraps (mach_kernel)
- 0.0% 0x2e333332 [unreadable] ()
- 0.0% lo_mach_scall (mach_kernel)
- 0.0% i386_astintr (mach_kernel)
  0.0% unix_syscall (mach_kernel)
- 0.0% thread_continue (mach_kernel)
- 0.0% thread_call_enter_delayed (mach_kernel)
- 0.0% sched_startup (mach_kernel)
  0.0% MD5_Final (libcrypto.0.9.8.dylib)
- 0.0% 0xefcdab89 [unreadable] ()


Best regards,
Byron Campen


How did you determine that the firewall was at fault? What profiling tool did you use? I'd like to see the results too.
Thanks
A

On Jul 11, 2008, at 10:47 , Byron Campen wrote:

Basically the same results:

[bcampen@dn3-233:~/checkouts/resiprocatehead/resip/stack/test]$ ./testStack --num-runs=100000 --bind=127.0.0.1
Performing 100000 runs.
100000 registrations peformed in 208295 ms, a rate of 480.088 transactions per second.]
Note: this test runs both sides (client and server)


Attachment: smime.p7s
Description: S/MIME cryptographic signature