[erlang-questions] discrepancy of memory usage figures

Andy W. Song <>
Thu Jun 23 05:39:50 CEST 2011


When I run my WebSocket test, I found the following interesting memory usage
results:

1. Server stated, no connection
[{total,573263528},
 {processes,17375688},
 {processes_used,17360240},
 {system,555887840},
 {atom,472297},
 {atom_used,451576},
 {binary,28944},
 {code,3774097},
 {ets,271016}]
44 processes,
*System:705M, *
*Erlang Residence:519M*

2. 100K Connections
[{total,762564512},
 {processes,130105104},
 {processes_used,130089656},
 {system,632459408},
 {atom,476337},
 {atom_used,456484},
 {binary,50160},
 {code,3925064},
 {ets,7589160}]
100044 processes,
*System: 1814M, *
*Erlang Residence: 950M*

3. 200K Connections ( restart server and create from 0 connection, not
continue from case 2)
[{total,952040232},
 {processes,243161192},
 {processes_used,243139984},
 {system,708879040},
 {atom,476337},
 {atom_used,456484},
 {binary,70856},
 {code,3925064},
 {ets,14904760}]
200044 processes,
*System:3383M, *
*Erlang: 1837M*

The figures in red are provided htop, others are output of memory() call
from erlang shell. Please look at the total and erlang residence memory.
When there is no connection, these two are roughly same, with 100K
connections, residence memory is a little larger than total, with 200K
connections, residence memory is almost double the total.

Can anybody explain?

Cheers
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110623/1254a8d3/attachment.html>


More information about the erlang-questions mailing list