dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18922
Re: Problem creating datamart
Hi Hannan
On 12 September 2012 07:45, Hannan Khan <hannank@xxxxxxxxx> wrote:
> 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.
Bear in mind Lars advice about not exceeding the available physical
memory. It might well be that you would need more RAM to aggregate
this much data. Lars would have the best idea .. you didn't say how
many data values you are talking about?
> 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.
Do you mean there is no message?
Agree with the ideal to convey this somehow through the application.
Either by providing a log viewer, or perhaps even the messaging
service to alert critical events. Not sure of the best approach here,
but maybe others have ideas. There are quite a few possibilities.
Eg. a straightforward (sounding) hack that comes to mind is to have a
shell script which "tails" the log file continuously and pumps a
message through the web api to admin user for any uncaught exceptions.
Probably even logwatch could be drafted into this role, though
processing java multi-line log lines is a challenge.
There's also a communications design pattern related to logging
(reference too far back in my memory) about not making a bad situation
worse - if the system starts spewing exceptions because it is
overloaded in some way, overloading it even more by generating lots of
messages is not a good response. So one needs to be a bit smart ..
The openmrs log manager module is an example of a more comprehensive
approach: https://wiki.openmrs.org/display/docs/Log+Manager+Module
>
> 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.
I think there are many merits to this approach if you have the
hardware available.
Cheers
Bob
>
> 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
>
>
References
-
Problem creating datamart
From: Hannan Khan, 2012-09-09
-
Re: Problem creating datamart
From: Jason Pickering, 2012-09-09
-
Re: Problem creating datamart
From: Hannan Khan, 2012-09-10
-
Re: Problem creating datamart
From: Jason Pickering, 2012-09-10
-
Re: Problem creating datamart
From: Hannan Khan, 2012-09-11
-
Re: Problem creating datamart
From: Jason Pickering, 2012-09-11
-
Re: Problem creating datamart
From: Hannan Khan, 2012-09-11
-
Re: Problem creating datamart
From: Morten Olav Hansen, 2012-09-11
-
Re: Problem creating datamart
From: Hannan Khan, 2012-09-11
-
Re: Problem creating datamart
From: Morten Olav Hansen, 2012-09-11
-
Re: Problem creating datamart
From: Hannan Khan, 2012-09-11
-
Re: Problem creating datamart
From: Knut Staring, 2012-09-11
-
Re: Problem creating datamart
From: Hannan Khan, 2012-09-11
-
Re: Problem creating datamart
From: Jason Pickering, 2012-09-11
-
Re: Problem creating datamart
From: Lars Helge Øverland, 2012-09-11
-
Re: Problem creating datamart
From: Bob Jolliffe, 2012-09-11
-
Re: Problem creating datamart
From: Hannan Khan, 2012-09-12