mnesia_tm process memory high watermark
Serge Aleynikov
serge@REDACTED
Tue May 23 22:35:23 CEST 2006
In a production system running mnesia database with in-memory replicas
we noticed through OS_MON that mnesia_tm process was eating a lot of
memory as illustrated below. Is there a recommendation on how to ensure
that mnesia_tm is automatically garbage collected periodically to keep
the process memory overhead manageable?
Is the proper way to handle this to call
erlang:system_flag(fullsweep_after, Number) or there's a better approach?
Serge
(drp@REDACTED)4> process_info(pid(0,63,0)).
[{registered_name,mnesia_tm},
{current_function,{mnesia_tm,doit_loop,1}},
{initial_call,{proc_lib,init_p,5}},
{status,waiting},
{message_queue_len,0},
{messages,[]},
{links,[<0.58.0>]},
{dictionary,[{'$ancestors',[mnesia_kernel_sup,mnesia_sup,<0.55.0>]},
{'$initial_call',{mnesia_sp,
init_proc,
[mnesia_tm,mnesia_tm,init,[<0.58.0>]]}}]},
{trap_exit,true},
{error_handler,error_handler},
{priority,normal},
{group_leader,<0.54.0>},
{heap_size,24488375},
{stack_size,20},
{reductions,21411651},
{garbage_collection,[{fullsweep_after,65535}]}]
(drp@REDACTED)5> process_info(pid(0,63,0), memory).
{memory,138075680}
(drp@REDACTED)6> erlang:garbage_collect(pid(0,63,0)).
true
(drp@REDACTED)7> process_info(pid(0,63,0), memory).
{memory,1352}
More information about the erlang-questions
mailing list