ets:update_counter/3 taking a looooong time!
Peter-Henry Mander
erlang@REDACTED
Mon Apr 28 20:43:22 CEST 2003
Hi Gurus,
I'm puzzled.
I'm trying to build a stressor tool using the Megaco stack provided with
Erlang/OTP R9B, and using fprof I seem to have isolated where the
bottleneck is, except I don't believe it's in ets:update_counter/3.
The stressor creates a bunch of processes which run through a standard
add modify and subtract Megaco message sequence. It runs wonderfully
fast as long as there are no more than 16 or 17 processes started
concurrently, each sending the message sequences. Below this threshold I
manage to get 1500 calls setup per second, above I only get a pitiful 4
to 6 call setups a second. If I increase the process count gradually to
2000, I can start 16 new processes and still get a high rate, but any
more than 16 at once kills the setup rate again.
I get the impression that some sort of staggered process startup is
required, it's as if there's a process being starved somewhere.
The attached gives the output of fprof, and the last line indicates that
all the time is spent waiting for ets:update_counter/3 to return a new
transaction ID to megaco_config:incr_trans_id_counter/1. The functions
above in the deleted lines creates a Megaco ActionRequest record.
What have I done wrong? I feel as if there's a solution staring me in
the face, but I just don't see it!
Pete.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stressor-analysis.txt
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20030428/ef244c34/attachment.txt>
More information about the erlang-questions
mailing list