Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 2013 00:08:07 +0200
From:      Anton Sayetsky <vsjcfm@gmail.com>
To:        Uwe Heber <uwe@d2ux.org>, FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: FreeBSD9.2: Tomcat process with very high memory allocation
Message-ID:  <CAFG2KCLAN6D9mRjFsNzuA7sJaZb0oq2NKw5mPKbAznX5QxKpeA@mail.gmail.com>
In-Reply-To: <5293C7F7.6040503@d2ux.org>
References:  <5293C7F7.6040503@d2ux.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2013/11/25 Uwe Heber <uwe@d2ux.org>:
> Hello FreeBSD team,
>
> we are hosting a Java web application on our FreeBSD 9.2 server on which
> Tomcat 7.0 is used as runtime environment.
>
> During monitoring the Java process we have found out the Java process
> allocates 9GB of memory:
>
> 39819 www          35  20    0  9051M   439M uwait   4   0:31  0.00% jsvc
>
> www    39819  0.0  1.4 9268296 449704 ??  IJ    4:05PM 0:30.60
> /usr/local/bin/jsvc -java-home /usr/local/openjdk6 -server -user www
> -pidfile /var/run/tomcat7.pid -wait 30 -out
>
> For this reason, we have reconfigured the Tomcat by setting up the
> minimum and maximum heap size in file /usr/local/<TOMCAT>/bin/setenv.sh
> with following values:
>
>
> CATALINA_OPTS="$CATALINA_OPTS -Xms128m"
> CATALINA_OPTS="$CATALINA_OPTS -Xmx512m"
>
> After the Tomcat reboot the allocation remains at this very high
> consumption.
>
> Our question at this point:
> [1] Is this problem already known?
> [2] What are possible options regarding the setup which could solve the
> problem?
>
> If you need further information, please do not hesitate to contact us.
>
> Thanks for your support.
There is _no_ problem. Tomcat has 9 GiB of virtual memory and 439 MiB
of resident.
The actual amount of really used mem is 439 MiB.
Virtual contains all memory that theoretically can be used (but NOT
allocated at a point of time in contrast of res) by process, all
shared libraries that it used etc etc. In practice, virt memory shows
nothing helpful.
You should take a look on only resident memory of processes in most cases.
http://linuxpoison.blogspot.com/2009/10/what-is-difference-among-virt-res-and.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFG2KCLAN6D9mRjFsNzuA7sJaZb0oq2NKw5mPKbAznX5QxKpeA>