andrew-d / andrew-d/tcerl

Memory-leak or not releasing memory on exit

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Erlang
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
The {{{leaf_node_cache}}} number is really a good way to get high (or low
performance) but by setting this number high I can see that tcerl doesn't
seem to release the memory that the driver has allocated.

By running some benchmarks for a couple of hours, generating tables of more
than 10 million records, the memory that are used by beam.smp are well over
20gig. But the real issue is that the beam.smp process still holds this
memory even after I'd stopped Mnesia and tcerl.

By setting the leaf_node_cache low allocates less memory but it's still not
deallocated on exit.

Shouldn't the tcerl-driver release the memory when it's stopped?

Thanks in advance
//Rickard

What version of the product are you using? On what operating system?
--------------------------------------------------------------------
tcerl-1.3.1g
tokyo cabinet 1.4.21
mnesia 4.4.7.6
erlang R12B5
Ubuntu 9.04

Please provide any additional information below.
------------------------------------------------

After mnesia:stop() and tcerl:stop():

(bench2@sillhaj)15> erlang:memory().
[{total,4651452856},
{processes,1397824},
{processes_used,1374976},
{system,4650055032}, <----------------------- geez
{atom,645129},
{atom_used,626422},
{binary,1512},
{code,6671217},
{ets,374208}]

(bench2@sillhaj)16>[ true=erlang:garbage_collect(P1) || P1<- processes()].
[true,true ...]
(bench2@sillhaj)17> erlang:memory().
[{total,4650837656},
{processes,782416},
{processes_used,759568},
{system,4650055240}, <-----------------------
{atom,645129},
{atom_used,626422},
{binary,1720},
{code,6671217},
{ets,374208}]

```

Original issue reported on code.google.com by `kptzoom@gmail.com` on 12 Jul 2009 at 1:51

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.