← Back to team overview

dhis2-devs team mailing list archive

Re: Problem creating datamart

 

Dear Bob

Thanks for your advice.

I actually put 6GB for Tomcat and and 2 GB for MySQL. My Tomcat and MySQL
are in same server. My JAVA_OPTS is -Xms1024m -Xmx6144m
-XX:MaxPermSize=2048m -XX:PermSize=512m.

We completed our testing and find that for our data volume running datamart
for one year and below is ok. If we run for two year and above it have the
same error.

Also note that there is message in the DHIS2 front end; it is run for  ever
and not completed the process. From the tomcat log I find that there is an
error of Java heap size. So my suggestion is that to convey the error
message through front so that the user know immediately that there is an
error in this module, so he can continue with other works not waiting for
the administrator to check the log.

For your information I configured Director General Health Service (DGHS)
servers (another support to DHIS2nin the health sector) with Tomcat and
MySQL in two different server and it is comfortably.The Server running
Tomcat having two Gigabit network card; one with public IP for accessing
DHIS2 and other card having local IP to accessing MySQL. The server having
MySQL have also a Gigabit card having local IP.

Regards

Hannan

On Tue, Sep 11, 2012 at 7:34 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:

> A few extra thoughts on java opts:
>
> I don't think you want to waste too much memory on permgen space when
> what you really need as much heap as you can get.  Just enough.  I
> find 256M actually suffices.
>
> So you probably want something like JAVA_OPTS='-Xmx4096m
> -XX:MaxPermSize=256m'
>
> This might be a bit tight, as Lars says, you may not have that 4096m
> physically available if 3G has gone to mysql.  I think I would try and
> trim a bit from mysql rather than trim dhis2 much below this.  2G to
> mysql should be adequate.
>
> If its not, think about running dhis and tomcat on separate machines.
> If you have gigabit ethernet between them, the performance cost of
> transport is not too great and you can tune each one optimally to the
> available resources.
>
> Bob
>
> On 11 September 2012 13:22, Lars Helge Øverland <larshelge@xxxxxxxxx>
> wrote:
> > Hi,
> >
> > Jason is right, no need to change from mysql. It is also OK to
> > aggregate a year at the time to reduce memory usage, hopefully you
> > don't need to do this too often. Can you please:
> >
> > 1. Paste the contents of the Help -> About page from Java opts and below.
> >
> > 2. Paste the number of data values you have in your database from Data
> > administration -> Data statistics.
> >
> > It is also a point not to raise the value of Xmx to more than what is
> > actually available to the JVM, it might trick Java to put more objects
> > into memory than what is possible, leading to poorer performance/out
> > of mem errors. So if you have assigned a lot of memory to mysql or
> > other applications running on the server you might need to lower it a
> > bit.
> >
> > Lars
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~dhis2-devs
> > Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~dhis2-devs
> > More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References