Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve memory consumption #9

Merged
merged 1 commit into from
Jun 18, 2018
Merged

Improve memory consumption #9

merged 1 commit into from
Jun 18, 2018

Conversation

mgumz
Copy link
Contributor

@mgumz mgumz commented Jun 18, 2018

For every established GTP-U connection, several metric probes are
created upon connection (see src/gtp_u_edp_port.erl). Among the created
probes are 2 of type "histogram". An histogram is represented as a
process in the GTP-U-Node which will be initialized with a
min_heap_size of 40k WORDS (8byte on 64bit machines).

See 1 and 2 for a discussion about the issue.

Neither of the preconditions for increasing the min_heap_size are met:

  • the histograms are kept over a long period of time (and are not short
    lived)
  • the amount of processes keep growing with the amount of established
    connections

This commit sets the min_heap_size option of the spawned processes
responsible for the histogram to the default Erlang value and thus,
decreases the memory consumption of the histograms and allow the GC to
work.

For every established GTP-U connection, several metric probes are
created upon connection (see src/gtp_u_edp_port.erl). Among the created
probes are 2 of type "histogram". An histogram is represented as a
process in the GTP-U-Node which will be initialized with a
`min_heap_size` of 40k WORDS (8byte on 64bit machines).

See [1] and [2] for a discussion about the issue.

Neither of the preconditions for increasing the `min_heap_size` are met:

* the histograms are kept over a long period of time (and are not short
  lived)
* the amount of processes keep growing with the amount of established
  connections

This commit sets the `min_heap_size` option of the spawned processes
responsible for the histogram to the default Erlang value and thus,
decreases the memory consumption of the histograms and allow the GC to
work.

[1]: Feuerlabs/exometer_core#100
[2]: http://erlang.org/doc/efficiency_guide/processes.html
@coveralls
Copy link

coveralls commented Jun 18, 2018

Coverage Status

Coverage remained the same at 75.685% when pulling 9259021 on improve/memory-usage into d5cc768 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.685% when pulling 9259021 on improve/memory-usage into d5cc768 on master.

@surik
Copy link

surik commented Jun 18, 2018

Looks good to me

@RoadRunnr RoadRunnr merged commit 47a45ad into master Jun 18, 2018
@RoadRunnr RoadRunnr deleted the improve/memory-usage branch June 18, 2018 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants