[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-5993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Koushik Das reassigned CLOUDSTACK-5993:
---------------------------------------

    Assignee: Koushik Das

> 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)

Reply via email to