{"action":"opened","issue":{"url":"https://api.github.com/repos/intelsdi-x/snap/issues/1189","repository_url":"https://api.github.com/repos/intelsdi-x/snap","labels_url":"https://api.github.com/repos/intelsdi-x/snap/issues/1189/labels{/name}","comments_url":"https://api.github.com/repos/intelsdi-x/snap/issues/1189/comments","events_url":"https://api.github.com/repos/intelsdi-x/snap/issues/1189/events","html_url":"https://github.com/intelsdi-x/snap/issues/1189","id":175808920,"number":1189,"title":"snapd ram memory usage dramatically increases when a plugin is added","user":{"login":"ericho","id":272993,"avatar_url":"https://avatars.githubusercontent.com/u/272993?v=3","gravatar_id":"","url":"https://api.github.com/users/ericho","html_url":"https://github.com/ericho","followers_url":"https://api.github.com/users/ericho/followers","following_url":"https://api.github.com/users/ericho/following{/other_user}","gists_url":"https://api.github.com/users/ericho/gists{/gist_id}","starred_url":"https://api.github.com/users/ericho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericho/subscriptions","organizations_url":"https://api.github.com/users/ericho/orgs","repos_url":"https://api.github.com/users/ericho/repos","events_url":"https://api.github.com/users/ericho/events{/privacy}","received_events_url":"https://api.github.com/users/ericho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-08T17:08:20Z","updated_at":"2016-09-08T17:08:20Z","closed_at":null,"body":"Looking in the memory usage that snapd consumes in the different stages I noticed that the memory increases when a plugin is added. For instance:\r\n\r\nWithout any plugin added, ```snapd -t 0 --log-level 1```\r\n```\r\n$ ps -C snapd -o pid=,%mem=,vsz=,rss=\r\n31100  1.5  19324  7864\r\n```\r\n\r\nSo, adding a plugin, ```snapctl plugin load snap-plugin-processor-passthru```\r\n\r\n```\r\n$ ps -C snapd -o pid=,%mem=,vsz=,rss=\r\n31100  7.2  55612 36556\r\n```\r\n\r\nSo from a very nice 7.8MB increased into 36.6MB\r\n\r\nAdding another one, ```snapctl plugin load snap-plugin-collector-cpu```\r\n```\r\n$ ps -C snapd -o pid=,%mem=,vsz=,rss=\r\n31100  8.2  55612 41348\r\n```\r\n\r\nNow, the ram is 41.3MB. \r\n\r\nThe behavior is the same changing the order of plugins loaded. It seems that some initialization happens in snapd, but is good to have such a big increase?"}}
{"actor":{"display_login":"ericho"}}