[erlang-questions] What does "=index_table:atom_tab, size: 9216, limit: 9000, entries: 9216" mean?

Sverker Eriksson sverker.eriksson@REDACTED
Tue Mar 12 10:50:08 CET 2013


skyman wrote:
> Hi all,
> I use "erl +t 9000" to set the maximum number of atoms to 9000, then I call erlang:list_to_atom/1 to create atoms, and check the system info:
> 15> string:tokens(binary_to_list(erlang:system_info(info)),"\n").
> ["=memory","total: 49094720","processes: 33358002",
>  "processes_used: 33358002","system: 15736718",
>  "atom: 223537","atom_used: 211133","binary: 1063848",
>  "code: 3739735","ets: 251248","=hash_table:atom_tab",
>  "size: 6421","used: 4906","objs: 9216","depth: 7",
>  "=index_table:atom_tab","size: 9216","limit: 9000",
>  "entries: 9216","=hash_table:module_code","size: 97",
>  "used: 57","objs: 76","depth: 3","=index_table:module_code",
>  "size: 1024","limit: 65536","entries: 76",
>  [...]|...]
>
>
> Please look at the "=index_table:atom_tab" item, what do "size", "limit" and "entries" mean? why can the "size"(9216) larger than the "limit"(9000)?
> Thanks in advance!
'size' is number of allocated entries in the table
'limit' is the max number of entries
'entries' is number of used entries

The table increases 'size' in steps of 1024 entries.
And yes, the implementation (index.c) allows you to exceed 'limit' up to 
the nearest 1024 multiple. Which is what has happened in your case with 
9216 atoms.

/Sverker, Erlang/OTP





More information about the erlang-questions mailing list