Hi 
As suggested I read through the cache settings, this is what I have made 
changes to connection url. 
rurl = "jdbc:h2:file:/" + getDBPath() + dbname + 
";DEFAULT_TABLE_TYPE=CACHED;CACHE_SIZE=" + (2 * 1024 * 1024) + 
";AUTOCOMMIT=TRUE;CACHE_TYPE=SOFT_LRU";

Impact
I have loaded db to 161 mb.
when I first time get the connection the memory in jconsole shows 50 mb, 
which is fine. when I perform multiple operations to the database the 
memory shoots up to 300 mb and never comes down. If I continue doing many 
such operations it even grows to 500 mb.

Any other suggestions please.
I am using connection pooling as well.


On Saturday, August 11, 2012 12:12:34 AM UTC+5:30, Thomas Mueller wrote:
>
> Hi,
>
> Startup is normally very fast. It it takes 5-6 seconds, it sounds like 
> something is wrong. Could you get some profiling data, as described in 
> http://h2database.com/html/performance.html#built_in_profiler ?
>
> Regards,
> Thomas
>
>
> On Wed, Aug 8, 2012 at 11:35 AM, Harish Alwala 
> <[email protected]<javascript:>
> > wrote:
>
>> Hi All
>> I have a problem establishing connection to H2 database when the size of 
>> the db file is over 100 mb.
>> I have written a Swing Application and I am using H2 database in embeded 
>> mode. Application works(connection establishment & query process) fine when 
>> the size of the db file is around 10-50 mb. When the file size increases to 
>> 100 mb the application slows down.
>> Observation:
>> 1. connection 
>> =java.sql.DriverManager.getConnection(getConnectionUrl(),username, 
>> password);
>> Above statement takes 5-6 seconds to get the connection.
>> 2. CPU shoots up to 60% while fetching the connection.
>> 3. working with database my application always shows around 500mb in 
>> jconsole.
>>
>> What I have done:
>> I have replaced above statement with 
>> connectionPool = JdbcConnectionPool.create(getConnectionUrl(), username, 
>> password);
>> connectionPool.setMaxConnections(200);
>> Still I dont see any difference.
>>
>> I have tried same replacing H2 Database with SQLServer Database.
>> Very interestingly application takes hardly any memory (max 100mb) and 
>> cpu shows 30 % while continues db operation.
>>
>> Regarding memory I feel since I am embeding the H2 database with in my 
>> application, the memory used by H2 db + CPU used by H2 db is also shown in 
>> my application .
>>
>> Please let me know if there is any work around.
>>
>>
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "H2 Database" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/h2-database/-/dsjzxuG6gvoJ.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> [email protected] <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/h2-database?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/fXrNuaE6KIkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to