Bug 850723
Summary: | standalone.conf of jbossas-7/jbosseap-6 does not read node_profile from '/etc/stickshift/resource_limits.conf' at all | ||
---|---|---|---|
Product: | OKD | Reporter: | Nick Tan <missedone> |
Component: | Containers | Assignee: | Bill DeCoste <wdecoste> |
Status: | CLOSED NOTABUG | QA Contact: | libra bugs <libra-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 1.x | CC: | missedone |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-25 14:53:26 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Nick Tan
2012-08-22 08:49:23 UTC
What JVM settings are you trying to add/modify? Below are the settings for the small and medium gears. These settings are correct. Are there additional VM settings you need to add? For small gears: VM Arguments: -D[Standalone] -Xmx256m -XX:MaxPermSize=128m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -Dorg.jboss.r esolver.warning=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=small-judcon.rhcloud.com -Djgroups.bind_addr=127. 10.158.1 -Dorg.jboss.boot.log.file=/var/lib/stickshift/b3c30b333ebd4c07abc7d8e4222e505a/small/jbossas-7/standalone/log/boot.log -Dlogging.configuration=file:/var/lib/stickshi ft/b3c30b333ebd4c07abc7d8e4222e505a/small/jbossas-7/standalone/configuration/logging.properties For medium gears: VM Arguments: -D[Standalone] -Xmx664m -XX:MaxPermSize=128m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -Dorg.jboss.r esolver.warning=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=medium-judcon.rhcloud.com -Djgroups.bind_addr=127 .12.127.1 -Dorg.jboss.boot.log.file=/var/lib/stickshift/6c822f1f97b041de972fb19d769b2e45/medium/jbossas-7/standalone/log/boot.log -Dlogging.configuration=file:/var/lib/sticks hift/6c822f1f97b041de972fb19d769b2e45/medium/jbossas-7/standalone/configuration/logging.properties hi, Bill i'm not suck at the JVM settings, my point is i would like to switch between 'small', 'medium', 'large' JVM settings. from my understanding, by modifying the 'node_profile' in /etc/stickshift/resource_limits.conf can make the tricky (according what I read from the source code), but the problem is no matter what value for 'node_profile' i changed, the 'small' JVM setting was always used, that means the standalone.conf does not read 'node_profile' correctly so I provided two options to read the 'node_profile' from resource_limits.conf Hi Nick, OK, I think I see the problem. standalone.conf picks up the value from the link not from the contents of the linked file. If you want to modify the default behavior you should modify the link, not the content of the file (see below). I assume you are running OpenShift locally? Either built from source or via LiveCD? resource_limits_file=`readlink -f /etc/stickshift/resource_limits.conf` resource_limits_file_name=`basename $resource_limits_file` node_profile=`echo ${resource_limits_file_name/*./}` case "$node_profile" in micro) memory_options="-client -Xmx100m -XX:MaxPermSize=100m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true" ;; small) memory_options="-client -Xmx256m -XX:MaxPermSize=128m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true" ;; medium) memory_options="-client -Xmx664m -XX:MaxPermSize=128m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true" ;; large) memory_options="-Xmx1456m -XX:MaxPermSize=148m -XX:+AggressiveOpts" ;; exlarge) memory_options="-Xmx2888m -XX:MaxPermSize=184m -XX:+AggressiveOpts" ;; jumbo) memory_options="-Xmx5888m -XX:MaxPermSize=256m -XX:+AggressiveOpts" ;; esac Thanks -Bill hi, Bill i build openshift origin from source code (multi-nodes) where is the link file located? thanks /etc/stickshift/resource_limits.conf is a link. It's linked to one the real file /etc/stickshift/resource_limits.conf.small. If you change the link so that /etc/stickshift/resource_limits.conf points to /etc/stickshift/resource_limits.conf.medium then the standalone.conf will use the medium gear profile settings (i.e. memory) ah, OK, I see, i should 'man readlink' before, on my OpenShift Origin, the resource_limits.conf is a file, will try link later, thanks very much. Please let me know if moving the link works for you so I can close the bug. Thanks Thanks, Bill yes, it works now after I created the /etc/stickshift/resource_limits.conf.medium, /etc/stickshift/resource_limits.conf.small, and created link file /etc/stickshift/resource_limits.conf point to /etc/stickshift/resource_limits.conf.medium. but I'm just wondering why not create these conf profiles and link file by default? (in my case, the resource_limits.conf is a plain file not a link at all) This allows us to create predefined profile settings and easily switch between then for the default gear size. You can also control the JVM settings by using the rhc --gear-size option when you create you application. I'm going to close this bug, but please reach out to me at wdecoste on on IRC if you have any other questions. |