{"action":"created","issue":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/1277","labels_url":"https://api.github.com/repos/mesosphere/marathon/issues/1277/labels{/name}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/1277/comments","events_url":"https://api.github.com/repos/mesosphere/marathon/issues/1277/events","html_url":"https://github.com/mesosphere/marathon/pull/1277","id":60425564,"number":1277,"title":"fixes #1274 - improved performance of AppResource.index and related inte...","user":{"login":"drexin","id":433020,"avatar_url":"https://avatars.githubusercontent.com/u/433020?v=3","gravatar_id":"","url":"https://api.github.com/users/drexin","html_url":"https://github.com/drexin","followers_url":"https://api.github.com/users/drexin/followers","following_url":"https://api.github.com/users/drexin/following{/other_user}","gists_url":"https://api.github.com/users/drexin/gists{/gist_id}","starred_url":"https://api.github.com/users/drexin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drexin/subscriptions","organizations_url":"https://api.github.com/users/drexin/orgs","repos_url":"https://api.github.com/users/drexin/repos","events_url":"https://api.github.com/users/drexin/events{/privacy}","received_events_url":"https://api.github.com/users/drexin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ConnorDoyle","id":379372,"avatar_url":"https://avatars.githubusercontent.com/u/379372?v=3","gravatar_id":"","url":"https://api.github.com/users/ConnorDoyle","html_url":"https://github.com/ConnorDoyle","followers_url":"https://api.github.com/users/ConnorDoyle/followers","following_url":"https://api.github.com/users/ConnorDoyle/following{/other_user}","gists_url":"https://api.github.com/users/ConnorDoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/ConnorDoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConnorDoyle/subscriptions","organizations_url":"https://api.github.com/users/ConnorDoyle/orgs","repos_url":"https://api.github.com/users/ConnorDoyle/repos","events_url":"https://api.github.com/users/ConnorDoyle/events{/privacy}","received_events_url":"https://api.github.com/users/ConnorDoyle/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mesosphere/marathon/milestones/15","html_url":"https://github.com/mesosphere/marathon/milestones/0.8.2","labels_url":"https://api.github.com/repos/mesosphere/marathon/milestones/15/labels","id":993326,"number":15,"title":"0.8.2","description":"","creator":{"login":"drexin","id":433020,"avatar_url":"https://avatars.githubusercontent.com/u/433020?v=3","gravatar_id":"","url":"https://api.github.com/users/drexin","html_url":"https://github.com/drexin","followers_url":"https://api.github.com/users/drexin/followers","following_url":"https://api.github.com/users/drexin/following{/other_user}","gists_url":"https://api.github.com/users/drexin/gists{/gist_id}","starred_url":"https://api.github.com/users/drexin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drexin/subscriptions","organizations_url":"https://api.github.com/users/drexin/orgs","repos_url":"https://api.github.com/users/drexin/repos","events_url":"https://api.github.com/users/drexin/events{/privacy}","received_events_url":"https://api.github.com/users/drexin/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":4,"state":"open","created_at":"2015-02-24T13:26:01Z","updated_at":"2015-03-09T23:14:42Z","due_on":"2015-03-31T22:00:00Z","closed_at":null},"comments":1,"created_at":"2015-03-09T23:08:14Z","updated_at":"2015-03-10T07:25:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/1277","html_url":"https://github.com/mesosphere/marathon/pull/1277","diff_url":"https://github.com/mesosphere/marathon/pull/1277.diff","patch_url":"https://github.com/mesosphere/marathon/pull/1277.patch"},"body":"...rnal methods\r\n\r\nAt 1000 tasks on a 2 vCPU GCE instance Marathon currently takes more than 10 seconds to respond\r\n\r\n```\r\nλ time curl -XGET http://10.144.146.199:8080/v2/apps\r\n{\"apps\":[{\"id\":\"/pyserv2\",\"cmd\":\"python -m SimpleHTTPServer $PORT0\",\"args\":null,\"user\":null,\"env\":{},\"instances\":1000,\"cpus\":0.001,\"mem\":2.0,\"disk\":0.0,\"executor\":\"\",\"constraints\":[],\"uris\":[],\"storeUrls\":[],\"ports\":[32768],\"requirePorts\":false,\"backoffSeconds\":1,\"backoffFactor\":1.15,\"maxLaunchDelaySeconds\":3600,\"container\":null,\"healthChecks\":[{\"path\":\"/\",\"protocol\":\"HTTP\",\"portIndex\":0,\"gracePeriodSeconds\":300,\"intervalSeconds\":60,\"timeoutSeconds\":20,\"maxConsecutiveFailures\":3}],\"dependencies\":[],\"upgradeStrategy\":{\"minimumHealthCapacity\":1.0,\"maximumOverCapacity\":1.0},\"labels\":{},\"version\":\"2015-03-06T11:38:15.372Z\",\"tasksStaged\":0,\"tasksRunning\":1000,\"tasksHealthy\":1000,\"tasksUnhealthy\":0,\"deployments\":[]}]}\r\nreal\t0m12.081s\r\nuser\t0m0.004s\r\nsys\t0m0.004s\r\n```\r\n\r\nWith this patch on the same cluster it takes less than 100ms:\r\n\r\n```\r\nλ time curl localhost:8080/v2/apps\r\n{\"apps\":[{\"id\":\"/frufoo\",\"cmd\":\"python -m SimpleHTTPServer $PORT0\",\"args\":null,\"user\":null,\"env\":{},\"instances\":1000,\"cpus\":0.001,\"mem\":1.0,\"disk\":0.0,\"executor\":\"\",\"constraints\":[],\"uris\":[],\"storeUrls\":[],\"ports\":[32767],\"requirePorts\":false,\"backoffSeconds\":1,\"backoffFactor\":1.15,\"maxLaunchDelaySeconds\":3600,\"container\":null,\"healthChecks\":[{\"path\":\"/\",\"protocol\":\"HTTP\",\"portIndex\":0,\"gracePeriodSeconds\":300,\"intervalSeconds\":60,\"timeoutSeconds\":20,\"maxConsecutiveFailures\":3,\"ignoreHttp1xx\":false}],\"dependencies\":[],\"upgradeStrategy\":{\"minimumHealthCapacity\":1.0,\"maximumOverCapacity\":1.0},\"labels\":{},\"version\":\"2015-03-09T22:58:37.112Z\",\"tasksStaged\":0,\"tasksRunning\":1001,\"tasksHealthy\":966,\"tasksUnhealthy\":0,\"deployments\":[{\"id\":\"e9345382-c0fb-400c-afb5-74bcf8587a5d\"}]}]}\r\nreal\t0m0.085s\r\nuser\t0m0.000s\r\nsys\t0m0.008s\r\n```"},"comment":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/comments/78006818","html_url":"https://github.com/mesosphere/marathon/pull/1277#issuecomment-78006818","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/1277","id":78006818,"user":{"login":"bobrik","id":89186,"avatar_url":"https://avatars.githubusercontent.com/u/89186?v=3","gravatar_id":"","url":"https://api.github.com/users/bobrik","html_url":"https://github.com/bobrik","followers_url":"https://api.github.com/users/bobrik/followers","following_url":"https://api.github.com/users/bobrik/following{/other_user}","gists_url":"https://api.github.com/users/bobrik/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrik/subscriptions","organizations_url":"https://api.github.com/users/bobrik/orgs","repos_url":"https://api.github.com/users/bobrik/repos","events_url":"https://api.github.com/users/bobrik/events{/privacy}","received_events_url":"https://api.github.com/users/bobrik/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T07:25:52Z","updated_at":"2015-03-10T07:25:52Z","body":":+1: "}}