{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/openj9/issues/1797","repository_url":"https://api.github.com/repos/eclipse/openj9","labels_url":"https://api.github.com/repos/eclipse/openj9/issues/1797/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/openj9/issues/1797/comments","events_url":"https://api.github.com/repos/eclipse/openj9/issues/1797/events","html_url":"https://github.com/eclipse/openj9/pull/1797","id":318795264,"number":1797,"title":"Increase default max heap only if memory subsystem is enabled","user":{"login":"ashu-mehra","id":14123200,"avatar_url":"https://avatars3.githubusercontent.com/u/14123200?v=4","gravatar_id":"","url":"https://api.github.com/users/ashu-mehra","html_url":"https://github.com/ashu-mehra","followers_url":"https://api.github.com/users/ashu-mehra/followers","following_url":"https://api.github.com/users/ashu-mehra/following{/other_user}","gists_url":"https://api.github.com/users/ashu-mehra/gists{/gist_id}","starred_url":"https://api.github.com/users/ashu-mehra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashu-mehra/subscriptions","organizations_url":"https://api.github.com/users/ashu-mehra/orgs","repos_url":"https://api.github.com/users/ashu-mehra/repos","events_url":"https://api.github.com/users/ashu-mehra/events{/privacy}","received_events_url":"https://api.github.com/users/ashu-mehra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-30T06:19:24Z","updated_at":"2018-04-30T06:28:08Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/eclipse/openj9/pulls/1797","html_url":"https://github.com/eclipse/openj9/pull/1797","diff_url":"https://github.com/eclipse/openj9/pull/1797.diff","patch_url":"https://github.com/eclipse/openj9/pull/1797.patch"},"body":"JVM should use higher percentage of memory as default max heap when\r\nrunning in a cgroup only if -XX:+UseContainerSupport is specified.\r\nNote that -XX:+UseContainerSupport enables JVM to use cgroup's memory\r\nsubsystem limits.\r\nHowever, a missing check for memory subsystem in\r\nMM_GCExtensions::computeDefaultMaxHeap() causes this change to be\r\nenabled by default.\r\nFix is to add code for checking memory subsystem is enabled before using\r\nhigher percentage of cgroup memory limit as default max heap.\r\n\r\nSigned-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>"},"comment":{"url":"https://api.github.com/repos/eclipse/openj9/issues/comments/385321206","html_url":"https://github.com/eclipse/openj9/pull/1797#issuecomment-385321206","issue_url":"https://api.github.com/repos/eclipse/openj9/issues/1797","id":385321206,"user":{"login":"ashu-mehra","id":14123200,"avatar_url":"https://avatars3.githubusercontent.com/u/14123200?v=4","gravatar_id":"","url":"https://api.github.com/users/ashu-mehra","html_url":"https://github.com/ashu-mehra","followers_url":"https://api.github.com/users/ashu-mehra/followers","following_url":"https://api.github.com/users/ashu-mehra/following{/other_user}","gists_url":"https://api.github.com/users/ashu-mehra/gists{/gist_id}","starred_url":"https://api.github.com/users/ashu-mehra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashu-mehra/subscriptions","organizations_url":"https://api.github.com/users/ashu-mehra/orgs","repos_url":"https://api.github.com/users/ashu-mehra/repos","events_url":"https://api.github.com/users/ashu-mehra/events{/privacy}","received_events_url":"https://api.github.com/users/ashu-mehra/received_events","type":"User","site_admin":false},"created_at":"2018-04-30T06:28:08Z","updated_at":"2018-04-30T06:28:08Z","author_association":"CONTRIBUTOR","body":"I realized the change done in #1517 has become a default behavior.\r\nIdeally it should be protected by `-XX:+UseContainerSupport` option.\r\n\r\n```\r\n$ docker run -m2g --rm -it adoptopenjdk/openjdk8-openj9:nightly java -verbose:sizes -version | grep Xmx\r\nWARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.\r\n  -Xmx1536M       memory maximum\r\n```\r\n\r\nNote that Xmx gets set to 1.5 G even though I didn't specify `-XX:+UseContainerSupport` option.\r\nTo address this, I added a check for memory subsystem is enabled in `MM_GCExtensions::computeDefaultMaxHeap()`.\r\nWe could have also added check for `-XX:+UseContainerSupport` but I feel depending on memory subsystem is more appropriate."}}
{"actor":{"display_login":"ashu-mehra"}}