[Engine-devel] Fixed -Xmx could kill your JVM

Laszlo Hornyak lhornyak at redhat.com
Wed Sep 12 12:44:25 UTC 2012


Hi Juan,

Just wondering why the initial memory size for the JVM. Isn't it better if we just start from the default and let it grow to a maximum size?

Thx,
Laszlo

----- Original Message -----
> From: "Juan Hernandez" <jhernand at redhat.com>
> To: engine-devel at ovirt.org
> Sent: Wednesday, September 12, 2012 2:32:28 PM
> Subject: [Engine-devel] Fixed -Xmx could kill your JVM
> 
> Hello,
> 
> I recently discovered that I made a mistake in the engine service
> script. The problem is that were running the JVM with the "-Xms
> option
> twice, like this:
> 
>   java -Xms1g -Xms1g ...
> 
> That doesn't correctly limit the max amount of heap space. It has
> been
> fixed in a recent commit [1], so with the updated code the engine
> will
> run by default like this:
> 
>   java -Xms1g -Xmx1g ...
> 
> With this change you could start to see OutOfMemory errors if your
> engine was using a lot of memory, if you are running stress tests,
> for
> example. In that case remember that you can adjust this changing the
> ENGINE_HEAP_MIN and ENGINE_HEAP_MAX parameters in
> /etc/sysconfig/ovirt-engine. For example, to use 2g instead of the
> default of 1g:
> 
> ENGINE_HEAP_MIN=2g
> ENGINE_HEAP_MAX=2g
> 
> The restart the engine.
> 
> Let me know if you have issues.
> 
> Regards,
> Juan Hernandez
> 
> [1] http://gerrit.ovirt.org/7952
> 
> --
> Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
> 3ºD, 28016 Madrid, Spain
> Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat
> S.L.
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
> 



More information about the Engine-devel mailing list