jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danilo Ghirardelli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-2892) Large fetch sizes have potentially deleterious effects on VM memory requirements when using Oracle
Date Thu, 08 Sep 2011 10:57:11 GMT

    [ https://issues.apache.org/jira/browse/JCR-2892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100218#comment-13100218
] 

Danilo Ghirardelli commented on JCR-2892:
-----------------------------------------

I attached a very minimalistic patch that will set the fetchSize to 10 in the OracleConnectionHelper,
that is used for all oracle connections (bundles, journal and datastore).

But still there are a few points that may be considered:
- as stated by the original poster, if the fetchSize problem was Postgresql specific, it would
be better to create a PostgresConnectionHelper and isolate the different fetchSize there.
- generally speaking, if you are sure that the ResultSet is not going to be very big, you
should really trim down that fetchSize (or don't set it so jdbc drivers would use their defaults),
otherwise a simple change in some other driver behaviour might cause out of memory or slowness.
- this issue is currently unassigned, so nobody would apply any patch... :-)


> Large fetch sizes have potentially deleterious effects on VM memory requirements when
using Oracle
> --------------------------------------------------------------------------------------------------
>
>                 Key: JCR-2892
>                 URL: https://issues.apache.org/jira/browse/JCR-2892
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, sql
>    Affects Versions: 2.2.2
>         Environment: Oracle 10g+
>            Reporter: Christopher Elkins
>         Attachments: oracleFetchSize.patch
>
>
> Since Release 10g, Oracle JDBC drivers use the fetch size to allocate buffers for caching
row data.
> cf. http://www.oracle.com/technetwork/database/enterprise-edition/memory.pdf
> r1060431 hard-codes the fetch size for all ResultSet-returning statements to 10,000.
This value has significant, potentially deleterious, effects on the heap space required for
even moderately-sized repositories. For example, the BUNDLE table (from 'oracle.ddl') has
two columns -- NODE_ID raw(16) and BUNDLE_DATA blob -- which require 16 b and 4 kb of buffer
space, respectively. This requires a buffer of more than 40 mb [(16+4096) * 10000 = 41120000].
> If the issue described in JCR-2832 is truly specific to PostgreSQL, I think its resolution
should be moved to a PostgreSQL-specific ConnectionHelper subclass. Failing that, there should
be a way to override this hard-coded value in OracleConnectionHelper.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message