Page MenuHomePhabricator

[web][keyserver] log Olm memory usage changes
ClosedPublic

Authored by kamil on Thu, Mar 20, 5:37 AM.
Tags
None
Referenced Files
F5086172: D14485.id47498.diff
Sat, Mar 29, 6:49 PM
F5081362: D14485.id47504.diff
Sat, Mar 29, 5:35 AM
Unknown Object (File)
Fri, Mar 28, 7:59 PM
Unknown Object (File)
Thu, Mar 27, 10:10 PM
Unknown Object (File)
Thu, Mar 27, 3:29 PM
Unknown Object (File)
Thu, Mar 27, 2:51 PM
Unknown Object (File)
Wed, Mar 26, 7:56 PM
Unknown Object (File)
Wed, Mar 26, 7:53 PM
Subscribers
None

Details

Summary

Some context in ENG-10393.

Those metrics are helpful for two reasons:

  1. get_total_memory - gives us insight into total memory allocated, spikes in this value mean that we might have a lot of promises running at once which allocated a lot of resources - I described this theory in ENG-10393#comment-b874b5ec.
  2. get_used_memory - if this value grows over time we're experiencing memory leaks (except for session creation on the web, see below).

For the web, we might expect used memory to grow when using the app because we're keeping sessions in memory, which means after starting a conversation with a new user used memory should grow, but only for the size of the Session object. The logs could help us discover whether the in-memory store isn't too big, and if so - refactor this to avoid keeping all sessions live at once.

Looking at the transform-remove-console config we exclude error so should be fine.

Depends on D14484

Test Plan
  1. Tested cronjob to print some results when needed (after commenting free).
  2. Tested web to print results.

Diff Detail

Repository
rCOMM Comm
Branch
logging
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Thu, Mar 20, 5:45 AM
ashoat added inline comments.
lib/utils/olm-memory-utils.js
19
28
This revision is now accepted and ready to land.Thu, Mar 20, 5:52 AM