{"action":"created","issue":{"url":"https://api.github.com/repos/netdata/netdata/issues/4529","repository_url":"https://api.github.com/repos/netdata/netdata","labels_url":"https://api.github.com/repos/netdata/netdata/issues/4529/labels{/name}","comments_url":"https://api.github.com/repos/netdata/netdata/issues/4529/comments","events_url":"https://api.github.com/repos/netdata/netdata/issues/4529/events","html_url":"https://github.com/netdata/netdata/issues/4529","id":375698920,"node_id":"MDU6SXNzdWUzNzU2OTg5MjA=","number":4529,"title":"memory footprint per metric","user":{"login":"ktsaou","id":2662304,"node_id":"MDQ6VXNlcjI2NjIzMDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2662304?v=4","gravatar_id":"","url":"https://api.github.com/users/ktsaou","html_url":"https://github.com/ktsaou","followers_url":"https://api.github.com/users/ktsaou/followers","following_url":"https://api.github.com/users/ktsaou/following{/other_user}","gists_url":"https://api.github.com/users/ktsaou/gists{/gist_id}","starred_url":"https://api.github.com/users/ktsaou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktsaou/subscriptions","organizations_url":"https://api.github.com/users/ktsaou/orgs","repos_url":"https://api.github.com/users/ktsaou/repos","events_url":"https://api.github.com/users/ktsaou/events{/privacy}","received_events_url":"https://api.github.com/users/ktsaou/received_events","type":"User","site_admin":false},"labels":[{"id":43793260,"node_id":"MDU6TGFiZWw0Mzc5MzI2MA==","url":"https://api.github.com/repos/netdata/netdata/labels/bug","name":"bug","color":"ba232a","default":true},{"id":1065919474,"node_id":"MDU6TGFiZWwxMDY1OTE5NDc0","url":"https://api.github.com/repos/netdata/netdata/labels/module/core","name":"module/core","color":"b8ffa8","default":false}],"state":"open","locked":false,"assignee":{"login":"vlvkobal","id":22008543,"node_id":"MDQ6VXNlcjIyMDA4NTQz","avatar_url":"https://avatars2.githubusercontent.com/u/22008543?v=4","gravatar_id":"","url":"https://api.github.com/users/vlvkobal","html_url":"https://github.com/vlvkobal","followers_url":"https://api.github.com/users/vlvkobal/followers","following_url":"https://api.github.com/users/vlvkobal/following{/other_user}","gists_url":"https://api.github.com/users/vlvkobal/gists{/gist_id}","starred_url":"https://api.github.com/users/vlvkobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlvkobal/subscriptions","organizations_url":"https://api.github.com/users/vlvkobal/orgs","repos_url":"https://api.github.com/users/vlvkobal/repos","events_url":"https://api.github.com/users/vlvkobal/events{/privacy}","received_events_url":"https://api.github.com/users/vlvkobal/received_events","type":"User","site_admin":false},"assignees":[{"login":"vlvkobal","id":22008543,"node_id":"MDQ6VXNlcjIyMDA4NTQz","avatar_url":"https://avatars2.githubusercontent.com/u/22008543?v=4","gravatar_id":"","url":"https://api.github.com/users/vlvkobal","html_url":"https://github.com/vlvkobal","followers_url":"https://api.github.com/users/vlvkobal/followers","following_url":"https://api.github.com/users/vlvkobal/following{/other_user}","gists_url":"https://api.github.com/users/vlvkobal/gists{/gist_id}","starred_url":"https://api.github.com/users/vlvkobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlvkobal/subscriptions","organizations_url":"https://api.github.com/users/vlvkobal/orgs","repos_url":"https://api.github.com/users/vlvkobal/repos","events_url":"https://api.github.com/users/vlvkobal/events{/privacy}","received_events_url":"https://api.github.com/users/vlvkobal/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-10-30T21:21:07Z","updated_at":"2018-10-31T18:18:07Z","closed_at":null,"author_association":"MEMBER","body":"<!--- Verify first that your issue is not already reported on GitHub -->\r\n<!--- Also test if the latest release and devel branch are affected too -->\r\n\r\n##### Bug report summary\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nWith issue #4487 \tthe fixes we applied with #4519 and the investigation with #4524 \twe identified that health monitoring variables have significant memory footprint.\r\n\r\nIn more detail, it seems that each netdata metric needs about 3kb in memory for all the structures required by health monitoring variables.\r\nWhen multiplied with tens of thousands of metrics, this increases the memory footprint of netdata significantly (several MB).\r\n\r\n##### OS / Environment\r\n<!--- Provide all relevant information below, e.g. OS distribution, running in container, etc. -->\r\n\r\nAll\r\n\r\n##### Component Name\r\n<!--- Write the short name of the module or plugin below -->\r\n\r\ncore\r\n\r\n##### Steps To Reproduce\r\n<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->\r\n\r\nAdd tens of thousands of metrics to netdata.\r\n\r\n<!--- Paste configuration you used between quotes below -->\r\n```yaml\r\n\r\n```\r\n\r\n<!--- HINT: You can paste gist.github.com links for larger files -->\r\n\r\n##### Expected behavior\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\nThe metadata per metrics should be a lot less."},"comment":{"url":"https://api.github.com/repos/netdata/netdata/issues/comments/434794440","html_url":"https://github.com/netdata/netdata/issues/4529#issuecomment-434794440","issue_url":"https://api.github.com/repos/netdata/netdata/issues/4529","id":434794440,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDc5NDQ0MA==","user":{"login":"Ferroin","id":905151,"node_id":"MDQ6VXNlcjkwNTE1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/905151?v=4","gravatar_id":"","url":"https://api.github.com/users/Ferroin","html_url":"https://github.com/Ferroin","followers_url":"https://api.github.com/users/Ferroin/followers","following_url":"https://api.github.com/users/Ferroin/following{/other_user}","gists_url":"https://api.github.com/users/Ferroin/gists{/gist_id}","starred_url":"https://api.github.com/users/Ferroin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ferroin/subscriptions","organizations_url":"https://api.github.com/users/Ferroin/orgs","repos_url":"https://api.github.com/users/Ferroin/repos","events_url":"https://api.github.com/users/Ferroin/events{/privacy}","received_events_url":"https://api.github.com/users/Ferroin/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T18:18:06Z","updated_at":"2018-10-31T18:18:06Z","author_association":"MEMBER","body":"Is there any kind of deduplication of these that could be done without needing logic to build the values on-demand?  Because if we're just going for reducing memory footprint that seems to me like a sensible starting point.  I don't know enough about the inner-workings of the code itself though to make any more concrete suggestions."}}
{"actor":{"display_login":"Ferroin"}}