[ovirt-users] Can I reduce the Java heap size of engine-backup???
Yedidyah Bar David
didi at redhat.com
Tue Dec 29 07:02:55 UTC 2015
On Tue, Dec 29, 2015 at 12:51 AM, John Florian <jflorian at doubledog.org> wrote:
> I'm trying to run the engine-backup script via a Bacula job using the
> RunScript option so that the engine-backup dumps its output someplace
> where Bacula will collect it once engine-backup finishes. However the
> job is failing and with enough digging I eventually learned the script
> was writing the following in /tmp/hs_err_pid5789.log:
>
> #
> # There is insufficient memory for the Java Runtime Environment to continue.
> # Native memory allocation (mmap) failed to map 2555904 bytes for
> committing reserved memory.
> # Possible reasons:
> # The system is out of physical RAM or swap space
> # In 32 bit mode, the process size limit was hit
> # Possible solutions:
> # Reduce memory load on the system
> # Increase physical memory or swap space
> # Check if swap backing store is full
> # Use 64 bit Java on a 64 bit OS
> # Decrease Java heap size (-Xmx/-Xms)
> # Decrease number of Java threads
> # Decrease Java thread stack sizes (-Xss)
> # Set larger code cache with -XX:ReservedCodeCacheSize=
> # This output file may be truncated or incomplete.
> #
> # Out of Memory Error (os_linux.cpp:2627), pid=5789, tid=140709998221056
> #
> # JRE version: (8.0_65-b17) (build )
> # Java VM: OpenJDK 64-Bit Server VM (25.65-b01 mixed mode linux-amd64
> compressed oops)
> # Failed to write core dump. Core dumps have been disabled. To enable
> core dumping, try "ulimit -c unlimited" before starting Java again
> #
>
>
> So is there any good way to reduce the Java heap size? I mean I know
> what -Xmx does, but where might I try setting it, ideally so that it
> affects the engine-backup only? Any idea of good setting for a very
> small environment with a dozen VMs?
engine-backup does not directly call nor need java.
AFAICS it only calls it indirectly as part of some other initialization
by running java-home [1], which is a script that decides what JAVA_HOME
to use for the engine. This script only runs 'java -version', which imo
should not need that much memory. Perhaps there is something else I do
not fully understand, such as bacula severely limiting available resources
for the process it runs, or something like that.
If you only want to debug it, and not as a recommended final solution,
you can create a script [2] which only outputs the needed java home.
Simply run [1] and make [2] echo the same thing. If [2] exists, [1] will
only run it and nothing else, as you can see inside it.
I do not think this will work - quite likely engine-backup will fail
shortly later, if indeed it gets access to so little memory. Please
report back. Thanks and good luck,
[1] /usr/share/ovirt-engine/bin/java-home
[2] /usr/share/ovirt-engine/bin/java-home.local
--
Didi
More information about the Users
mailing list