[erlang-questions] Memory leak question

Tomas Abrahamsson tomas.abrahamsson@REDACTED
Tue Sep 23 15:24:45 CEST 2008


On Mon, Sep 22, 2008 at 16:08, Paul Oliver <puzza007@REDACTED> wrote:
> Hi all,
>
> I've written a test client that starts a number of sockets and
> repeatedly sends and receives a static sting from an echo server.
> I've noticed some strange behavior with an if statement and was
> wondering if someone can tell me why?

I tried 100 clients sending one message every 0.1 seconds,
over the night (13 hours), but couldn't repeat your results.
I did not run out of memory. I tried both your code fragments.
The beam process used up between 11 and 15 MB of RAM
(as reported by top). It oscillated (well, slowly) between 11
and 15 MB of RAM usage. CPU usage was low. Virtually no
swapping/paging took place.

I don't know what version of Erlang you used, how long you
had to run, etc, but anyway, this is what I used: R12B-4 (32-bit)
on one dual-core opteron machine with 4 GB RAM, running
SuSE linux enterprise desktop 10.1, erl was started
like this: "erl -s xload start_clients", thus just default
for everything: smp, memory allocators and such.

(I had to write a tcp/ip echo server to be able to run your code,
perhaps some delicate working of the echo server or some
other part of the environment could have an effect on the
results?)

BRs
Tomas



More information about the erlang-questions mailing list