[erlang-questions] My frustration with Erlang
Sat Sep 13 23:15:41 CEST 2008
On Sep 13, 2008, at 9:56 PM, Edwin Fine wrote:
> Here's the stupid idea: Run one +S 1 VM per core instead of N +S N
> What do you think? Is the newbie smoking something, or is there maybe
> something to it?
There's definitely something to it and I'll try it just as soon as I'm
able to make my test harness a distributed one. It's designed to
launch everything on a single node right now.
There's something that's nagging at me as well, which is why I haven't
been in a rush to rewrite the test harness. I want to know why my
gen_server calls start to timeout!
I even killed the VM upon the first timeout to get a crash dump. Lo
and behold, there were no processes with lengthy message queues. The
distribution among the 21234 processes goes like this:
0, 1, 2, 3, 4, 5, 6, 7 (20), 8 (18), 9 (28), 10 (36), 11 (19), 12
(24), 13 (8), 14 (8), 15, 26, 32, 33
The # of processes with this queue length is in parenthesis and is 1
where there are none. Perhaps I should pay attention to the counts
over 5 or 10.
The complication is that most of the gen_servers look like this in the
Spawned as: proc_lib:init_p/5
Spawned by: <0.4001.0>
Started: Sat Sep 13 18:36:39 2008
Message queue length: 0
Number of heap fragments: 0
Heap fragment data: 0
Link list: [#Port<0.5677>]
Heap unused: 1800
OldHeap unused: 377
Program counter: 0x0000000144d3c748 (gen_server:loop/6 + 288)
CP: 0x0000000144cfe458 (proc_lib:init_p/5 + 400)
arity = 0
Note that the current function is gen_server:loop/6, they were
(obviously) spawned by proc_lib:init_p/5 and the processes are unnamed.
There's more info in the crash dump on every process, e.g. process
dictionary, stack and heap (below). I'm able to deduce that this is a
bot process but I'm still scratching my head over jumping from this to
identifying the gen_server timeouts.
0x000000015e0fc498:SReturn addr 0x44CFE458 (proc_lib:init_p/5 + 400)
0x000000015e0fc4d0:SReturn addr 0x1A9D28 (<terminate process normally>)
y0:SCatch 0x44CFE478 (proc_lib:init_p/5 + 432)
More information about the erlang-questions