{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/35443431","id":35443431,"diff_hunk":"@@ -0,0 +1,125 @@\n+# Quality of Service in Kubelet\r\n+\r\n+**Author**: Ananya Kumar (@AnanyaKumar)\r\n+\r\n+**Status**: Draft proposal; prototype in progress.\r\n+\r\n+This document presents the design of quality of service tiers for jobs scheduled on Kubelet, describes use cases, and lays out milestones for its development.\r\n+\r\n+## Motivation\r\n+\r\n+The Kubelet allocates resources to pods in a simple way. Right now there aren’t robust mechanisms in place to ensure that pods run reliably on an overloaded system, and nodes are not very efficiently utilized.\r\n+\r\n+In Kubernetes, some pods have limits specified, and some pods do not. **Pods with limits specified are not very well protected from pods without limits specified**. If a pod without an explicit memory limit goes overboard and uses lots of memory, other pods (with resource specifications) might be killed. This is bad, because users often want a way to launch containers that have resources guarantees, and that stay up reliably.\r\n+\r\n+On the other hand in the current system, **if all pods have specified limits, cluster utilization can be poor**. In the current implementation, Kubelet does not support over-committing pods. Very often, pods don’t use all the resources that they request, which leads to a lot of wasted resources. For example, we might have 4 pods, each reserving 1GB of memory in a system with 4GB memory, but only using 500MB of memory. Theoretically, we could slot in another 4 pods of this type, but Kubernetes will reject new pods.\r\n+\r\n+In this design document, we propose **implementing two tiers of pods** - one in which we guarantee resources (top-tier pods) and the second wherein we provide resources if they’re available and at a slightly lower quality (best-effort pods). Adding a best-effort tier of pods will increase node’s utilization in a Kubernetes cluster (in Borg, supporting best-effort pods increased utilization by  about 20%). We also implement **a policy of automatically classifying pods that don’t provide limits as best-effort**. This provides much better resource guarantees to pods with limits specified.\r\n+\r\n+## QoS Functionality\r\n+\r\n+We will introduce two tiers of pods: top-tier pods and best-effort pods. We will not support multiple levels or priorities.\r","path":"docs/proposals/kubelet-qos.md","position":21,"original_position":21,"commit_id":"ba9f2dc29e33fe0003081483d3cf05d574591860","original_commit_id":"ba9f2dc29e33fe0003081483d3cf05d574591860","user":{"login":"AnanyaKumar","id":1862850,"avatar_url":"https://avatars.githubusercontent.com/u/1862850?v=3","gravatar_id":"","url":"https://api.github.com/users/AnanyaKumar","html_url":"https://github.com/AnanyaKumar","followers_url":"https://api.github.com/users/AnanyaKumar/followers","following_url":"https://api.github.com/users/AnanyaKumar/following{/other_user}","gists_url":"https://api.github.com/users/AnanyaKumar/gists{/gist_id}","starred_url":"https://api.github.com/users/AnanyaKumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnanyaKumar/subscriptions","organizations_url":"https://api.github.com/users/AnanyaKumar/orgs","repos_url":"https://api.github.com/users/AnanyaKumar/repos","events_url":"https://api.github.com/users/AnanyaKumar/events{/privacy}","received_events_url":"https://api.github.com/users/AnanyaKumar/received_events","type":"User","site_admin":false},"body":"@timothysc @lvlv I'll give my take on this, but I'm sure @bgrant0607 and @davidopp will have a better response.\r\n\r\nOne issue is that implementing more than 3 tiers without patching the kernel and without racy behavior is very difficult.","created_at":"2015-07-24T17:11:34Z","updated_at":"2015-07-24T17:11:34Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11713#discussion_r35443431","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11713","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/35443431"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11713#discussion_r35443431"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11713"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11713","id":40616905,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11713","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11713.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11713.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11713","number":11713,"state":"open","locked":false,"title":"QoS proposal","user":{"login":"AnanyaKumar","id":1862850,"avatar_url":"https://avatars.githubusercontent.com/u/1862850?v=3","gravatar_id":"","url":"https://api.github.com/users/AnanyaKumar","html_url":"https://github.com/AnanyaKumar","followers_url":"https://api.github.com/users/AnanyaKumar/followers","following_url":"https://api.github.com/users/AnanyaKumar/following{/other_user}","gists_url":"https://api.github.com/users/AnanyaKumar/gists{/gist_id}","starred_url":"https://api.github.com/users/AnanyaKumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnanyaKumar/subscriptions","organizations_url":"https://api.github.com/users/AnanyaKumar/orgs","repos_url":"https://api.github.com/users/AnanyaKumar/repos","events_url":"https://api.github.com/users/AnanyaKumar/events{/privacy}","received_events_url":"https://api.github.com/users/AnanyaKumar/received_events","type":"User","site_admin":false},"body":"Ref. #147","created_at":"2015-07-22T22:01:03Z","updated_at":"2015-07-24T17:11:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"256ed60247035577eae08c8f4235722c2749b2ec","assignee":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11713/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11713/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11713/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/ba9f2dc29e33fe0003081483d3cf05d574591860","head":{"label":"AnanyaKumar:qos-proposal","ref":"qos-proposal","sha":"ba9f2dc29e33fe0003081483d3cf05d574591860","user":{"login":"AnanyaKumar","id":1862850,"avatar_url":"https://avatars.githubusercontent.com/u/1862850?v=3","gravatar_id":"","url":"https://api.github.com/users/AnanyaKumar","html_url":"https://github.com/AnanyaKumar","followers_url":"https://api.github.com/users/AnanyaKumar/followers","following_url":"https://api.github.com/users/AnanyaKumar/following{/other_user}","gists_url":"https://api.github.com/users/AnanyaKumar/gists{/gist_id}","starred_url":"https://api.github.com/users/AnanyaKumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnanyaKumar/subscriptions","organizations_url":"https://api.github.com/users/AnanyaKumar/orgs","repos_url":"https://api.github.com/users/AnanyaKumar/repos","events_url":"https://api.github.com/users/AnanyaKumar/events{/privacy}","received_events_url":"https://api.github.com/users/AnanyaKumar/received_events","type":"User","site_admin":false},"repo":{"id":37498217,"name":"kubernetes","full_name":"AnanyaKumar/kubernetes","owner":{"login":"AnanyaKumar","id":1862850,"avatar_url":"https://avatars.githubusercontent.com/u/1862850?v=3","gravatar_id":"","url":"https://api.github.com/users/AnanyaKumar","html_url":"https://github.com/AnanyaKumar","followers_url":"https://api.github.com/users/AnanyaKumar/followers","following_url":"https://api.github.com/users/AnanyaKumar/following{/other_user}","gists_url":"https://api.github.com/users/AnanyaKumar/gists{/gist_id}","starred_url":"https://api.github.com/users/AnanyaKumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnanyaKumar/subscriptions","organizations_url":"https://api.github.com/users/AnanyaKumar/orgs","repos_url":"https://api.github.com/users/AnanyaKumar/repos","events_url":"https://api.github.com/users/AnanyaKumar/events{/privacy}","received_events_url":"https://api.github.com/users/AnanyaKumar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnanyaKumar/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/AnanyaKumar/kubernetes","forks_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/forks","keys_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/teams","hooks_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/events","assignees_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/tags","blobs_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/languages","stargazers_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/subscription","commits_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/merges","archive_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/downloads","issues_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/AnanyaKumar/kubernetes/releases{/id}","created_at":"2015-06-16T00:14:24Z","updated_at":"2015-06-16T00:14:30Z","pushed_at":"2015-07-24T16:29:37Z","git_url":"git://github.com/AnanyaKumar/kubernetes.git","ssh_url":"git@github.com:AnanyaKumar/kubernetes.git","clone_url":"https://github.com/AnanyaKumar/kubernetes.git","svn_url":"https://github.com/AnanyaKumar/kubernetes","homepage":null,"size":93035,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"20293058ec8944e74ad23979c9494e9d7090147e","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-07-24T15:02:21Z","pushed_at":"2015-07-24T16:57:23Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":327464,"stargazers_count":9306,"watchers_count":9306,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2128,"mirror_url":null,"open_issues_count":1667,"forks":2128,"open_issues":1667,"watchers":9306,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11713"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11713"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11713"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11713/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11713/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11713/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/ba9f2dc29e33fe0003081483d3cf05d574591860"}}}}