{"action":"created","issue":{"url":"https://api.github.com/repos/puma/puma/issues/342","labels_url":"https://api.github.com/repos/puma/puma/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/puma/puma/issues/342/comments","events_url":"https://api.github.com/repos/puma/puma/issues/342/events","html_url":"https://github.com/puma/puma/issues/342","id":17364679,"number":342,"title":"Memory usage keeps going up over time","user":{"login":"nengxu","id":23847,"avatar_url":"https://avatars.githubusercontent.com/u/23847?v=3","gravatar_id":"","url":"https://api.github.com/users/nengxu","html_url":"https://github.com/nengxu","followers_url":"https://api.github.com/users/nengxu/followers","following_url":"https://api.github.com/users/nengxu/following{/other_user}","gists_url":"https://api.github.com/users/nengxu/gists{/gist_id}","starred_url":"https://api.github.com/users/nengxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nengxu/subscriptions","organizations_url":"https://api.github.com/users/nengxu/orgs","repos_url":"https://api.github.com/users/nengxu/repos","events_url":"https://api.github.com/users/nengxu/events{/privacy}","received_events_url":"https://api.github.com/users/nengxu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":47,"created_at":"2013-07-29T21:31:37Z","updated_at":"2015-02-26T17:00:15Z","closed_at":null,"body":"I've run some long time load tests on Nginx / Puma vs. Apache / Passenger. Although performace wise better, Puma seems to have memory usage going up over time.\r\n\r\n\"% User Memory\" for Apache / Passenger (3.0.19) over 6 hours (1cpu, 2G RAM, constant 50 users):\r\nMin: 30.9%; Avg: 32.8%; Max: 35.5%; Std Dev: 0.829\r\n\r\n![dev- user memory](https://f.cloud.github.com/assets/23847/874832/e2004058-f893-11e2-8f6c-c4358c39ec2e.png)\r\n\r\n\"% User Memory\" for Nginx / Puma (2.4.0, single mode) over 6 hours (1cpu, 2G RAM, constant 50 users):\r\nMin: 16.8%; Avg: 18.9%; Max: 19.4%; Std Dev: 0.554\r\n\r\n![n2 - user memory](https://f.cloud.github.com/assets/23847/874878/fa748cf6-f894-11e2-9847-cebe3ed2c627.png)\r\n\r\n\"% User Memory\" for Nginx / Puma (2.3.2, cluster mode, 3 workers) over 18 hours (3cpu, 8G RAM, constant 250 users):\r\nMin: 5.54%; Avg: 10.37%; Max: 13%; Std Dev: 1.53\r\n\r\n![n1- user memory](https://f.cloud.github.com/assets/23847/874931/31d802c6-f896-11e2-92f2-3986ef772103.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/puma/puma/issues/comments/76217650","html_url":"https://github.com/puma/puma/issues/342#issuecomment-76217650","issue_url":"https://api.github.com/repos/puma/puma/issues/342","id":76217650,"user":{"login":"Kagetsuki","id":864634,"avatar_url":"https://avatars.githubusercontent.com/u/864634?v=3","gravatar_id":"","url":"https://api.github.com/users/Kagetsuki","html_url":"https://github.com/Kagetsuki","followers_url":"https://api.github.com/users/Kagetsuki/followers","following_url":"https://api.github.com/users/Kagetsuki/following{/other_user}","gists_url":"https://api.github.com/users/Kagetsuki/gists{/gist_id}","starred_url":"https://api.github.com/users/Kagetsuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kagetsuki/subscriptions","organizations_url":"https://api.github.com/users/Kagetsuki/orgs","repos_url":"https://api.github.com/users/Kagetsuki/repos","events_url":"https://api.github.com/users/Kagetsuki/events{/privacy}","received_events_url":"https://api.github.com/users/Kagetsuki/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T17:00:15Z","updated_at":"2015-02-26T17:00:15Z","body":"@tozz I think he's referring to setting environment variables to trigger GC timing and allocation limits.\r\nOlder article and I'm sure some of this changed in 2.2 but this should give you an idea:  \r\nhttp://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production\r\n  \r\nI've played with these as well and my results were mixed - but no leaks seemed to get fixed from this"}}