Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to install zimbra server on a low spec virtual machine running ubuntu 10.04. I do meet the requirements as documented here (1 GB RAM/5 GB free disk space).

I got the virtual machine specifically for this purpose, so can install anything that helps to run zimbra.

The error I am getting is this:

zimbra@cloud:~$ bin/zmcontrol start
Could not create the Java virtual machine.

I am pretty sure it is something to do with not having enough memory for the java virtual machine - but I don't know how to reduce the requirement, or how to free up memory on the system.

Has anyone got zimbra to work on 1GB RAM? How can I do this?


Edit: more details...

Limit required memory to 32 MB and java works

billy@cloud:~$ java -Xmx32m -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.10) (6b20-1.9.10-0ubuntu1~10.04.2)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

Limit required memory to 256 MB and java does not work

billy@cloud:~$ java -Xmx256m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
share|improve this question

2 Answers 2

up vote 1 down vote accepted

Seems the crux of the issue is that OpenVZ reports the physical machine's memory to Java, when it would be more appropriate to report the virtual machine's memory allocation. This leads to the Java Virtual Machines requesting more memory than is available on the virtual machine.

Examining the beancounters allows you to identify this issue. In my case, I was failing on the privvmpages. My limit is 262144 (4k pages) which is approximately equal to 1GB. The kmemsize is reported as 2147483646 which is approximately equal to 2GB.

billy@cloud:~$ sudo cat /proc/user_beancounters 
Version: 2.5
       uid  resource                     held              maxheld              barrier                limit              failcnt
      325:  kmemsize                  6381046             11556684           2147483646           2147483646                    0
            lockedpages                     0                 1011               999999               999999                    0
            privvmpages                164893               262377               262144               262144               100797
            shmpages                      658                 1972               131072               131072                    0
            dummy                           0                    0                    0                    0                    0

I have not fully solved the issue yet, as I need to do further memory related tweaks to zimbra - but I have identified that this is the cause of my problem, and that the little tweaking I have done has allowed me to progress with my installation (although I do still run out of memory a little further down the line still).

I went about tweaking memory along the lines of this:

zmlocalconfig -e mailboxd_java_heap_memory_percent=14
zmlocalconfig -e mailboxd_java_heap_new_size_percent=9

and this

zmlocalconfig -e mysql_table_cache=250

And to get zimbra to even run the zmlocalconfig, I removed zimbra from /etc/init.d/ and just ran it manually after funning the config commands.

Hope this is helpful to someone else.

share|improve this answer

I know this does not directly answer your question and I have not used it myself, but if you are evaluating Zimbra perhaps it would be worthwhile to give Zimbra's VM appliance a shot.

share|improve this answer
    
This might be a way to go for evaluation, but I want to set up zimbra to work with 25 users - and this option only allows 10 users. –  Billy Moon Dec 8 '11 at 6:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.