[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3191) QueryPlanCache cache size

Emmanuel Bernard (JIRA) noreply at atlassian.com
Wed Mar 19 11:26:33 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29835 ] 

Emmanuel Bernard commented on HHH-3191:
---------------------------------------

I don't quite understand, SoftRefence will be kept "as long as possible" by your VM. The whole point of SoftReference is to implement caches like that. As long as you have enough memory, you're safe. If you don't have enough memory, then it's better to recompute the plan than face an OOME.

Also check that
http://java.sun.com/docs/hotspot/HotSpotFAQ.html#gc_softrefs


> QueryPlanCache cache size
> -------------------------
>
>                 Key: HHH-3191
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3191
>             Project: Hibernate3
>          Issue Type: Improvement
>          Components: query-hql
>    Affects Versions: 3.2.6
>         Environment: Hibernate 3.2.6, all platform
>            Reporter: Julien Kirch
>
> On a large application with many (currently 696) named queries in hbm files we have a performance issue with the QueryPlanCache cache size: 
> The SoftLimitMRUCache used in the QueryPlanCache use 128 hard references, the other being soft references, and this number is hardcoded.
> As we have much more querries in the application, we spend much time in recompiling the same queries when they are evicted from the cache.
> As the QueryPlanCache has a SessionFactoryImplementor as parameter, adding a new parameter to define the query cache plan size would be trivial; what's your opinion about this ?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list