[metrics-dev] A Q about metrics

Jarek Gawor gawor at mcs.anl.gov
Wed Oct 11 14:03:13 CDT 2006


> It seems that we might want to look into making the report 
> generation  
> code more memory efficient.  It's cool that it's highly portable and  
> generic for lots of different kinds of reports, but it isn't so cool  
> that it requires so much memory.

I looked at this a bit and the problem is not with the code that generates
the report but actually with the jdbc driver. The driver by default tries to
retreive _all_ the results of the query before passing it to the
application. That kills the memory. The report itself uses very little of
memory. 

To fix this issue:

1) Download the following driver:
http://jdbc.postgresql.org/download/pg74.216.jdbc2.jar and put it in
$G_L/lib
2) Remove the old driver from $G_L/lib (pg73jdbc2.jar)
3) Update the usage reporting code (do cvs update in usage/java/reports) and
deploy it.

Jarek




More information about the metrics-dev mailing list