FW: OH-fp speed increase?

1 view
Skip to first unread message

Jiri Dvorak

unread,
Nov 14, 2008, 2:02:35 PM11/14/08
to openh...@googlegroups.com
Jan, when it comes to raw OLAP (MDX/XMLA) data, Mondrian already has a
built-in cache. The metadata (dimensions, hierarchies etc.) are always
cached 100%, and lots of recently-used measure data is cached as well; and
the Mondrian cache is well tested by the OLAP community, and quite stable
and mature.

In the WHOSIS project, we tried to implement a secondary cache for
frequently used data sets (data overlapping with recently-used queries were
resolved from cache), and once WHOSIS was deployed into production and the
application was accessed by several users concurrently, the secondary
cache's memory requirements were too much for Tomcat, and we had to disable
the secondary cache, to keep the application stable and reliable - it was
better to sacrifice a bit of performance in order to keep the application
from crashing.

Note that when zooming out, you need to re-query anyway, because the "wider"
data set will not be in the cache yet. When zooming in within several
seconds, with Mondrian cache enabled, we were getting visible performance
improvements, suggesting that cache is being used (e.g. in WHOSIS query for
"number of physicians" in Canada, Mexico and USA, quickly followed by the
query for "number of physicians" in Canada ... the 2nd query was *much*
faster).

- Jiri
----------------------------------------------------------------
Jiri Dvorak, T4Bi (www.t4bi.com), cell +1.604.220.0529
#1010-1177 West Hastings Street, Vancouver, BC V6E2K3, Canada

-----Original Message-----
From: Jan Henrik Øverland [mailto:janhenrik...@gmail.com]
Sent: Friday, November 14, 2008 3:22 AM
To: jiri....@t4bi.com
Subject: OH-fp speed increase?

Hi Jiri. In order to speed up the existing OH prototype I would
appreciate knowing what you think about applying a cache controller.
It looks like data are collected every time - which I assume is the
most time consuming part of the whole process - even when I am just
zooming in or out. Therefore, could it be a good idea to cache queries
and results? The next time an already cached request is fired, i.e.
when zooming, the result can be returned at once.

Henrik

Knut Staring

unread,
Nov 14, 2008, 2:35:32 PM11/14/08
to openh...@googlegroups.com
On Fri, Nov 14, 2008 at 8:30 PM, Knut Staring <knu...@ifi.uio.no> wrote:
Jan Henrik,

I think you could look for ways to avoid regeneration of the SLD when you are just using client side panning or zooming in the same layer (i.e. when there is no need to requery the OLAP). Basically, in those cases, you just want a different extent on the image from Geoserver.

Knut
--
Cheers,
Knut Staring



--
Cheers,
Knut Staring

Jan Henrik Øverland

unread,
Nov 17, 2008, 7:17:26 AM11/17/08
to openh...@googlegroups.com
On Fri, Nov 14, 2008 at 8:02 PM, Jiri Dvorak <jdv...@gmail.com> wrote:
>
> Jan, when it comes to raw OLAP (MDX/XMLA) data, Mondrian already has a
> built-in cache. The metadata (dimensions, hierarchies etc.) are always
> cached 100%, and lots of recently-used measure data is cached as well; and
> the Mondrian cache is well tested by the OLAP community, and quite stable
> and mature.

Ok. How do I enable the built-in cache? And how does it work - is it
possible to simply enable it and it will take care of ifself, or do I
have to code the caching manually? (I am not using your new code.)

> In the WHOSIS project, we tried to implement a secondary cache for
> frequently used data sets (data overlapping with recently-used queries were
> resolved from cache), and once WHOSIS was deployed into production and the
> application was accessed by several users concurrently, the secondary
> cache's memory requirements were too much for Tomcat, and we had to disable
> the secondary cache, to keep the application stable and reliable - it was
> better to sacrifice a bit of performance in order to keep the application
> from crashing.
>
> Note that when zooming out, you need to re-query anyway, because the "wider"
> data set will not be in the cache yet. When zooming in within several
> seconds, with Mondrian cache enabled, we were getting visible performance
> improvements, suggesting that cache is being used (e.g. in WHOSIS query for
> "number of physicians" in Canada, Mexico and USA, quickly followed by the
> query for "number of physicians" in Canada ... the 2nd query was *much*
> faster).

I was thinking of zooming in and out without changing level, simply
enlarging or reducing the same map. Even then, the query is re-fired.

Jiri Dvorak

unread,
Nov 17, 2008, 2:03:26 PM11/17/08
to openh...@googlegroups.com
The Mondrian cache is enabled automatically, with some default values. The
values can be controlled by the file "mondrian.properties" - see an attached
example - which can be stored anywhere with the source code (e.g., in
MyEclipse, we put it into the directory "resources", on the same level as
"src"), and is included in the build as a "library" (that means, it is
copied into runtime's CLASSPATH, e.g. to the directory WEB-INF/classes.
Essentially, it is handled the same way as e.g. log4j.properties for Java
server-side logging.

The documentation for "mondrian.properties" values is at
http://mondrian.pentaho.org/documentation/configuration.php - you'll be
interested in parameters grouped under the label "Caching"
("mondrian.rolap.star.disableCaching" etc.).
mondrian.properties
Reply all
Reply to author
Forward
0 new messages