You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/11/25 21:31:21 UTC

[1/2] git commit: updated refs/heads/4.4 to 207d465

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 7e409ea30 -> 207d4653f


CLOUDSTACK-7951
Limit amount of memory used by cloudstack-agent jsvc.

Signed-off-by: Edison Su <su...@gmail.com>
(cherry picked from commit 1d6ca5eacb1725cc8485c4564aaf7332682ab5b2)


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

Branch: refs/heads/4.4
Commit: bb36ef248fe761fb560dddd68cffd592936bd811
Parents: 7e409ea
Author: Keiichi Yusa <ke...@aist.go.jp>
Authored: Thu Nov 20 17:16:01 2014 +0900
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Nov 25 21:30:20 2014 +0100

----------------------------------------------------------------------
 packaging/centos63/cloud-agent.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb36ef24/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index 1f371e9..cf9f661 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 -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+        $JSVC -Xms1024m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
             -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS
         RETVAL=$?
         echo


[2/2] git commit: updated refs/heads/4.4 to 207d465

Posted by da...@apache.org.
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 <ro...@shapeblue.com>
(cherry picked from commit bb81082e58d90da9971b7e06f4c3f8639446b2d2)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
(cherry picked from commit 3fe1f732d73d9ce12837d48d15031bc41df46b4d)


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

Branch: refs/heads/4.4
Commit: 207d4653fa4ba9647ec4783faca06430a182e87b
Parents: bb36ef2
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Nov 25 18:01:12 2014 +0530
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Nov 25 21:31:10 2014 +0100

----------------------------------------------------------------------
 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/207d4653/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/207d4653/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