You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/01/31 06:08:09 UTC
[jira] [Commented] (CLOUDSTACK-5993) Cloud agent fails to start on
32-bit system vms (cpvm and ssvm) created with 4GB RAM offering
[ https://issues.apache.org/jira/browse/CLOUDSTACK-5993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887473#comment-13887473 ]
ASF subversion and git services commented on CLOUDSTACK-5993:
-------------------------------------------------------------
Commit 1ae02009b562692a7da54f2694a9962f55660aa3 in branch refs/heads/4.3-forward from [~koushikd]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=1ae0200 ]
CLOUDSTACK-5993: Cloud agent fails to start on 32-bit system vms (cpvm and ssvm) created with 4GB RAM offering
Capped the max heap size of the JVM at 2600M for 32-bit system VMs. For 64-bit, existing logic works fine.
> Cloud agent fails to start on 32-bit system vms (cpvm and ssvm) created with 4GB RAM offering
> ---------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-5993
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5993
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the default.)
> Components: Management Server
> Affects Versions: 4.3.0
> Reporter: Koushik Das
> Assignee: Koushik Das
> Fix For: 4.4.0
>
>
> Repro steps:
> - Create cpvm with 4GB RAM offering
> - Once the VM is up and running, verify that cloud agent is not started
> - Check the logs at /var/log/cloud/cloud.out and see the following lines
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.
> There is a script _run.sh that gets deployed as part of systemvm.iso. This computes the max. heap size for the agent JVM based on the below logic.
> tot_mem_k=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}')
> let "tot_mem_m=tot_mem_k>>10"
> let "eightypcnt=$tot_mem_m*8/10"
> let "maxmem=$tot_mem_m-80"
> if [ $maxmem -gt $eightypcnt ]
> then
> maxmem=$eightypcnt
> fi
> I did some testing and found that for 32 bit system vms if the max. heap size specified is more than ~2600MB then the JVM fails to launch with the error message provided in repro steps. Now for 4GB RAM, the computed heap size is ~3.2G (0.8*4G). As a result agent JVM fails to start.
> For 64 bit system vms things work fine based on the above logic. I have verified by creating system vms with 8GB and 12GB RAM and didn't notice any issues.
> Planning to fix the problem by adding the following logic
> if [ "$(uname -m | grep '64')" == "" ]; then
> let "maxmem32bit=2600"
> if [ $maxmem -gt $maxmem32bit ]; then
> maxmem=$maxmem32bit
> fi
> fi
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)