Akumuli icon indicating copy to clipboard operation
Akumuli copied to clipboard

Memory leak?

Open smurfix opened this issue 3 years ago • 2 comments

Hi,

akumuli (0.8.80) seems to have a memory leak somewhere in its data retrieval code.

Its total VM size on my system, after reload, is 300 MBytes. After triggering Grafana (which reads a heap of data from last week, nothing fancy) it's 615. Fair enough. However, after reloading the exact same page, which presumably repeats the exact same query, it's 685 MBytes. Another reload takes it to 726, and the reload after that is gets it to 795.

Please fix.

Update: I initially saw this with 0.8.77, but upgrading to .80 didn't change anything.

smurfix avatar Sep 17 '20 07:09 smurfix

I'll take a look. Might be system cache behavior. It might prefetch part of the data volume into memory. BTW, what query are you using in Grafana?

Lazin avatar Sep 24 '20 20:09 Lazin

Well, it's the same query (or set of queries) every time and the system eventually runs out of memory when I do this, so no, this is memory directly allocated by akumulid.

My graph targets are simple and mostly look like this:

      "targets": [
        {
          "aggregator": "sum",
          "alias": "",
          "currentTagKey": "pos",
          "currentTagValue": "bell",
          "downsampleAggregator": "mean",
          "downsampleFillPolicy": "none",
          "metric": "temp",
          "refId": "A",
          "tags": {
            "set": "outdoor"
          }
        },
        {
          "aggregator": "sum",
          "alias": "Gartenwasser",
          "currentTagKey": "",
          "currentTagValue": "",
          "downsampleAggregator": "mean",
          "downsampleFillPolicy": "none",
          "metric": "flow",
          "refId": "B",
          "tags": {
            "loc": "ug",
            "pos": "garden",
            "type": "sensor"
          }
        }
      ],

smurfix avatar Sep 25 '20 21:09 smurfix