[jboss-jira] [JBoss JIRA] Updated: (JBCACHE-194) Provide configurable eviction thread priority boost

Manik Surtani (JIRA) jira-events at lists.jboss.org
Wed Mar 21 11:00:49 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBCACHE-194?page=all ]

Manik Surtani updated JBCACHE-194:
----------------------------------

    Component/s: Eviction

> Provide configurable eviction thread priority boost
> ---------------------------------------------------
>
>                 Key: JBCACHE-194
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-194
>             Project: JBoss Cache
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Eviction
>    Affects Versions: 1.2, 1.2.1, 1.2.2, 1.2.3
>            Reporter: Brian Dueck
>         Assigned To: Manik Surtani
>             Fix For: 2.1.0.GA
>
>         Attachments: LRUPolicy.java, LRUPolicy.java, LRUPolicy.java
>
>
> In environments where there there are many TreeCache client threads accessing the cache concurrently, the eviction thread may become starved. In this situation, even setting the wakeupInterval to 1 or 2 seconds does not help because the OS won't allocate proportionally very much time to the waiting eviction thread in comparison to the other TreeCache client threads.
> While there are some "fancy" solutions to this problem involving client threads being put to work to perform eviction, or having multiple eviction threads, one solution that help partially alleviate the problem is to boost the thread priority of the eviction thread.
> This provides a clue to the OS that allows the eviction thread to be scheduled more CPU time relative to other threads in a CPU resource constrained situation.
> This change involves switching from using the Java Timer object to using the Oswego ClockDaemon class instead. I've attached here a protoype implementation that reads a new XML configuration parameter (evictionPriorityBoost - if you can think of a better name, go ahead and rename it) and then boosts the eviction thread priority accordingly.
> Here's an example of the new config param:
>         <attribute name="EvictionPolicyConfig">
>            <config>
>               <attribute name="wakeUpIntervalSeconds">5</attribute>
>               <!-- boost the eviction thread by 2 -->
>               <attribute name="evictionPriorityBoost">2</attribute>              
>               <!-- Cache wide default -->
>               <region name="/_default_">
>                   <attribute name="maxNodes">5000000</attribute>
>                   <attribute name="timeToLiveSeconds">10</attribute>
>               </region>
>            </config>
>         </attribute>

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

        



More information about the jboss-jira mailing list