论坛首页 综合技术论坛

查看erlang内存使用情况

浏览 2425 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-10-17  
io:format("~s~n", [binary_to_list(erlang:info(info))]).

得到结果
=memory
total: 219521173
processes: 718806
processes_used: 713510
system: 218802367
atom: 347085
atom_used: 338851
binary: 13159
code: 2951013
ets: 182152
=hash_table:atom_tab
size: 6421
used: 4522
objs: 7848
depth: 6
=index_table:atom_tab
size: 8192
limit: 1048576
entries: 7848
=hash_table:module_code
size: 97
used: 73
objs: 114
depth: 4
=index_table:module_code
size: 1024
limit: 65536
entries: 114
=hash_table:export_list
size: 2411
used: 1874
objs: 3674
depth: 7
=index_table:export_list
size: 4096
limit: 65536
entries: 3674
=hash_table:secondary_export_table
size: 97
used: 0
objs: 0
depth: 0
=hash_table:process_reg
size: 23
used: 17
objs: 34
depth: 4
=hash_table:fun_table
size: 797
used: 436
objs: 658
depth: 5
=hash_table:node_table
size: 5
used: 1
objs: 1
depth: 1
=hash_table:dist_table
size: 5
used: 1
objs: 1
depth: 1
=allocated_areas
processes: 713510 718806
ets: 182152
sys_misc: 5330186
static: 209977344
atom_space: 98316 90370
binary: 13159
atom_table: 58533
module_table: 4568
export_table: 26112
register_table: 156
fun_table: 3250
module_refs: 1024
loaded_code: 2697335
dist_table: 147
node_table: 107
bits_bufs_size: 2
bif_timer: 40100
link_lh: 0
proc: 21156 17636
atom_entry: 190236 189948
export_entry: 177400 177112
module_entry: 4848 4608
reg_proc: 992 848
monitor_sh: 828 108
nlink_sh: 3896 2984
proc_list: 24 24
fun_entry: 37116 37004
db_tab: 3552 3376
driver_event_data_state: 24 24
driver_select_data_state: 188 60
=allocator:sys_alloc
option e: true
option m: libc
option tt: 131072
option tp: 0
=allocator:temp_alloc
versions: 0.9 2.1
option e: true
option sbct: 524288
option asbcst: 4145152
option rsbcst: 90
option rsbcmt: 80
option mmbcs: 131072
option mmsbc: 256
option mmmbc: 10
option lmbcs: 5242880
option smbcs: 1048576
option mbcgs: 10
option as: af
mbcs blocks: 0 9 9
mbcs blocks size: 0 65544 65544
mbcs carriers: 1 1 1
mbcs mseg carriers: 0
mbcs sys_alloc carriers: 1
mbcs carriers size: 131104 131104 131104
mbcs mseg carriers size: 0
mbcs sys_alloc carriers size: 131104
sbcs blocks: 0 0 0
sbcs blocks size: 0 0 0
sbcs carriers: 0 0 0
sbcs mseg carriers: 0
sbcs sys_alloc carriers: 0
sbcs carriers size: 0 0 0
sbcs mseg carriers size: 0
sbcs sys_alloc carriers size: 0
temp_alloc calls: 14136
temp_free calls: 14136
temp_realloc calls: 46
mseg_alloc calls: 0
mseg_dealloc calls: 0
mseg_realloc calls: 0
sys_alloc calls: 1
sys_free calls: 0
sys_realloc calls: 0
=allocator:sl_alloc
versions: 2.1 2.1
option e: true
option sbct: 524288
option asbcst: 4145152
option rsbcst: 80
option rsbcmt: 80
option mmbcs: 131072
option mmsbc: 256
option mmmbc: 10
option lmbcs: 5242880
option smbcs: 1048576
option mbcgs: 10
option mbsd: 3
option as: gf
mbcs blocks: 0 3 3
mbcs blocks size: 0 240 240
mbcs carriers: 1 1 1
mbcs mseg carriers: 0
mbcs sys_alloc carriers: 1
mbcs carriers size: 131104 131104 131104
mbcs mseg carriers size: 0
mbcs sys_alloc carriers size: 131104
sbcs blocks: 0 0 0
sbcs blocks size: 0 0 0
sbcs carriers: 0 0 0
sbcs mseg carriers: 0
sbcs sys_alloc carriers: 0
sbcs carriers size: 0 0 0
sbcs mseg carriers size: 0
sbcs sys_alloc carriers size: 0
sl_alloc calls: 37
sl_free calls: 37
sl_realloc calls: 0
mseg_alloc calls: 0
mseg_dealloc calls: 0
mseg_realloc calls: 0
sys_alloc calls: 1
sys_free calls: 0
sys_realloc calls: 0
=allocator:std_alloc
versions: 0.9 2.1
option e: true
option sbct: 524288
option asbcst: 4145152
option rsbcst: 20
option rsbcmt: 80
option mmbcs: 131072
option mmsbc: 256
option mmmbc: 10
option lmbcs: 5242880
option smbcs: 1048576
option mbcgs: 10
option as: bf
mbcs blocks: 298 298 298
mbcs blocks size: 15480 15480 15480
mbcs carriers: 1 1 1
mbcs mseg carriers: 0
mbcs sys_alloc carriers: 1
mbcs carriers size: 131104 131104 131104
mbcs mseg carriers size: 0
mbcs sys_alloc carriers size: 131104
sbcs blocks: 0 0 0
sbcs blocks size: 0 0 0
sbcs carriers: 0 0 0
sbcs mseg carriers: 0
sbcs sys_alloc carriers: 0
sbcs carriers size: 0 0 0
sbcs mseg carriers size: 0
sbcs sys_alloc carriers size: 0
std_alloc calls: 349
std_free calls: 51
std_realloc calls: 3
mseg_alloc calls: 0
mseg_dealloc calls: 0
mseg_realloc calls: 0
sys_alloc calls: 1
sys_free calls: 0
sys_realloc calls: 0
=allocator:ll_alloc
versions: 0.9 2.1
option e: true
option sbct: 4294967295
option asbcst: 0
option rsbcst: 0
option rsbcmt: 0
option mmbcs: 2097152
option mmsbc: 0
option mmmbc: 0
option lmbcs: 5242880
option smbcs: 1048576
option mbcgs: 10
option as: aobf
mbcs blocks: 796 796 796
mbcs blocks size: 218837752 218837752 218837752
mbcs carriers: 4 4 4
mbcs mseg carriers: 0
mbcs sys_alloc carriers: 4
mbcs carriers size: 219152416 219152416 219152416
mbcs mseg carriers size: 0
mbcs sys_alloc carriers size: 219152416
sbcs blocks: 0 0 0
sbcs blocks size: 0 0 0
sbcs carriers: 0 0 0
sbcs mseg carriers: 0
sbcs sys_alloc carriers: 0
sbcs carriers size: 0 0 0
sbcs mseg carriers size: 0
sbcs sys_alloc carriers size: 0
ll_alloc calls: 804
ll_free calls: 8
ll_realloc calls: 284
mseg_alloc calls: 0
mseg_dealloc calls: 0
mseg_realloc calls: 0
sys_alloc calls: 4
sys_free calls: 0
sys_realloc calls: 0
=allocator:eheap_alloc
versions: 2.1 2.1
option e: true
option sbct: 524288
option asbcst: 4145152
option rsbcst: 50
option rsbcmt: 80
option mmbcs: 524288
option mmsbc: 256
option mmmbc: 10
option lmbcs: 5242880
option smbcs: 1048576
option mbcgs: 10
option mbsd: 3
option as: gf
mbcs blocks: 87 104 104
mbcs blocks size: 561896 942664 942664
mbcs carriers: 2 2 2
mbcs mseg carriers: 1
mbcs sys_alloc carriers: 1
mbcs carriers size: 1572896 1572896 1572896
mbcs mseg carriers size: 1048576
mbcs sys_alloc carriers size: 524320
sbcs blocks: 0 0 0
sbcs blocks size: 0 0 0
sbcs carriers: 0 0 0
sbcs mseg carriers: 0
sbcs sys_alloc carriers: 0
sbcs carriers size: 0 0 0
sbcs mseg carriers size: 0
sbcs sys_alloc carriers size: 0
eheap_alloc calls: 5615
eheap_free calls: 5528
eheap_realloc calls: 1525
mseg_alloc calls: 4
mseg_dealloc calls: 3
mseg_realloc calls: 0
sys_alloc calls: 1
sys_free calls: 0
sys_realloc calls: 0
=allocator:binary_alloc
versions: 0.9 2.1
option e: true
option sbct: 524288
option asbcst: 4145152
option rsbcst: 20
option rsbcmt: 80
option mmbcs: 131072
option mmsbc: 256
option mmmbc: 10
option lmbcs: 5242880
option smbcs: 1048576
option mbcgs: 10
option as: bf
mbcs blocks: 3 35 35
mbcs blocks size: 13176 621224 621224
mbcs carriers: 1 2 2
mbcs mseg carriers: 0
mbcs sys_alloc carriers: 1
mbcs carriers size: 131104 1179680 1179680
mbcs mseg carriers size: 0
mbcs sys_alloc carriers size: 131104
sbcs blocks: 0 0 0
sbcs blocks size: 0 0 0
sbcs carriers: 0 0 0
sbcs mseg carriers: 0
sbcs sys_alloc carriers: 0
sbcs carriers size: 0 0 0
sbcs mseg carriers size: 0
sbcs sys_alloc carriers size: 0
binary_alloc calls: 2514
binary_free calls: 2511
binary_realloc calls: 15
mseg_alloc calls: 17
mseg_dealloc calls: 17
mseg_realloc calls: 0
sys_alloc calls: 1
sys_free calls: 0
sys_realloc calls: 0
=allocator:ets_alloc
versions: 0.9 2.1
option e: true
option sbct: 524288
option asbcst: 4145152
option rsbcst: 20
option rsbcmt: 80
option mmbcs: 131072
option mmsbc: 256
option mmmbc: 10
option lmbcs: 5242880
option smbcs: 1048576
option mbcgs: 10
option as: bf
mbcs blocks: 632 632 632
mbcs blocks size: 159016 159016 159016
mbcs carriers: 2 2 2
mbcs mseg carriers: 1
mbcs sys_alloc carriers: 1
mbcs carriers size: 1179680 1179680 1179680
mbcs mseg carriers size: 1048576
mbcs sys_alloc carriers size: 131104
sbcs blocks: 0 0 0
sbcs blocks size: 0 0 0
sbcs carriers: 0 0 0
sbcs mseg carriers: 0
sbcs sys_alloc carriers: 0
sbcs carriers size: 0 0 0
sbcs mseg carriers size: 0
sbcs sys_alloc carriers size: 0
ets_alloc calls: 4362
ets_free calls: 3730
ets_realloc calls: 298
mseg_alloc calls: 1
mseg_dealloc calls: 0
mseg_realloc calls: 0
sys_alloc calls: 1
sys_free calls: 0
sys_realloc calls: 0
=allocator:fix_alloc
option e: true
proc: 21156 17636
atom_entry: 190236 189948
export_entry: 177400 177112
module_entry: 4848 4608
reg_proc: 992 848
monitor_sh: 828 108
nlink_sh: 3896 2984
proc_list: 24 24
fun_entry: 37116 37004
db_tab: 3552 3376
driver_event_data_state: 24 24
driver_select_data_state: 188 60
=allocator:mseg_alloc
version: 0.9
option amcbf: 4194304
option rmcbf: 20
option mcs: 5
option cci: 1000
cached_segments: 0
cache_hits: 16
segments: 2
segments_watermark: 2
mseg_alloc calls: 22
mseg_dealloc calls: 20
mseg_realloc calls: 0
mseg_create calls: 6
mseg_destroy calls: 4
mseg_recreate calls: 0
mseg_clear_cache calls: 0
mseg_check_cache calls: 5
=allocator:alloc_util
option mmc: 1024
option ycs: 1048576
=allocator:instr
option m: false
option s: false
option t: false

ok
   发表时间:2007-10-18  
mryufeng这么长时间持续关注Erlang,不容易
和Ruby的炙手可热相比,Erlang显得小众多了
一直关注Erlang,好几次都有一种冲动,想把公司的核心服务,改用Erlang实现
天生的并发、热部署、FP,都是Erlang的动人之处,也是现有服务最头疼的部分
0 请登录后投票
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics