IMPORTANT: Bad Memory Settings in 1.2.2 and 1.2.3

View: New views
3 Messages — Rating Filter:   Alert me  

IMPORTANT: Bad Memory Settings in 1.2.2 and 1.2.3

by Wolfgang Meier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just in case someone missed it: the 1.2.2 and 1.2.3 releases indeed
shipped with a bad memory configuration: in the main configuration file
(conf.xml), the cacheSize parameter was set to 256M:

<db-connection cacheSize="256M" collectionCache="24M" database="native"
files="webapp/WEB-INF/data" pageSize="4096">

However, Java is started with only 128M max. memory, so using 256M for
caches will sooner or later result in eXist hitting the wall.

The problem here is that the effects of an OutOfMemory error are somehow
unpredictable and may lead to unnoticed corruptions in the database.
Java doesn't show many warnings before it runs out of memory. All you
get is a message on stderr.

In general, the cacheSize parameter in conf.xml should never be set to
more than 1/3 of the maximum memory available to Java. Please adjust
cacheSize accordingly or increase Java's max memory (usually set through
the -Xmx parameter which has to be passed on the java command line - see
bin/functions.d/eXist-settings.sh or bin/startup.bat).

Wolfgang

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: IMPORTANT: Bad Memory Settings in 1.2.2 and 1.2.3

by Peter Crowther :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> From: Wolfgang
> Just in case someone missed it: the 1.2.2 and 1.2.3 releases indeed
> shipped with a bad memory configuration: in the main
> configuration file (conf.xml), the cacheSize parameter was set to 256M:

Thanks for the rapid alert, Wolfgang - I do appreciate fast and accurate feedback when problems of this kind are found!

Is this the time to move to a dynamic cacheSize, or at least something that detects and scales back obviously dumb sizes?

                - Peter

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: IMPORTANT: Bad Memory Settings in 1.2.2 and 1.2.3

by Wolfgang Meier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Peter,

> Is this the time to move to a dynamic cacheSize, or at least
> something that detects and scales back obviously dumb sizes?

Yes, I think I will add a startup check which automatically limits the
cacheSize to 1/3 of Java's max memory (or 1/2 if the machine has more
than 1G).

Wolfgang

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open
LightInTheBox - Buy quality products at wholesale price