cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [14/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886
Date Fri, 28 Nov 2014 18:03:28 GMT
CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc

The -Xms value specifies the minimum heap size the JVM should start with and
-Xmx is the maximum heap size it can grow. The previous fix imposed minimum
limit of 1G which is unreasonably for small deployments. The fix is to start
with 256MB and limit to 2G for cloudstack-agent process. This was tested on
DevCloud/KVM and then again on a ACS/KVM deployment on real hardware.

With these values, it's possible for the agent to work in a DevCloud/KVM
environment and if JVM needs it can increase the heap size to 2G. The fix also
ports these settings to Debian cloud-agent init.d script as well.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit bb81082e58d90da9971b7e06f4c3f8639446b2d2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/19d73fe6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/19d73fe6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/19d73fe6

Branch: refs/heads/useraccount-refactoring
Commit: 19d73fe67d6c43ec4ef7c4a8e76c09e15e05a830
Parents: 4f82528
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Tue Nov 25 18:01:12 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Tue Nov 25 18:27:21 2014 +0530

----------------------------------------------------------------------
 packaging/centos63/cloud-agent.rc | 2 +-
 packaging/debian/init/cloud-agent | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19d73fe6/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index cf9f661..6cc6abc 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -64,7 +64,7 @@ export CLASSPATH="/usr/share/java/commons-daemon.jar:$ACP:$PCP:/etc/cloudstack/a
 start() {
     echo -n $"Starting $PROGNAME: "
     if hostname --fqdn >/dev/null 2>&1 ; then
-        $JSVC -Xms1024m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+        $JSVC -Xms256m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
             -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS
         RETVAL=$?
         echo

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19d73fe6/packaging/debian/init/cloud-agent
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-agent b/packaging/debian/init/cloud-agent
index 7e4e7d0..a3f2ae9 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -96,7 +96,7 @@ start() {
 
     wait_for_network
 
-    if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -Djna.nosys=true -pidfile "$PIDFILE"
-errfile SYSLOG $CLASS
+    if start_daemon -p $PIDFILE $DAEMON -Xms256m -Xmx2048m -cp "$CLASSPATH" -Djna.nosys=true
-pidfile "$PIDFILE" -errfile SYSLOG $CLASS
         RETVAL=$?
     then
         rc=0


Mime
View raw message