Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eviction with "eviction-percentage" does not work #6432

Closed
wildnez opened this issue Oct 12, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@wildnez
Copy link
Contributor

commented Oct 12, 2015

With the following properties:

       <map name="Cache1">
                    <in-memory-format>BINARY</in-memory-format>      
                    <backup-count>0</backup-count>        
                    <async-backup-count>0</async-backup-count>              
                    <max-size policy="PER_NODE">400</max-size>
                    <eviction-policy>LRU</eviction-policy>
                    <eviction-percentage>20</eviction-percentage>              
                    <merge-policy> com.hazelcast.map.merge.HigherHitsMapMergePolicy</merge-policy>             
       </map>                                               

Add 420 entries and IMap.size returns 378 whereas size should have been 320. This is consistently reproducible.

After discussion with @gurbuzali it turns out that the documentation at http://docs.hazelcast.org/docs/3.5/manual/html-single/hazelcast-documentation.html#configuring-map-eviction needs to be corrected to the following:

eviction-percentage: When max-size is reached, the specified percentage of a map's partition will be evicted. For example, if set to 25, 25% of the entries will be evicted. Setting this property to a smaller value will cause eviction of a smaller number of partition entries. Therefore, if entries are inserted frequently, smaller percentage values may lead to overheads. Valid values are integers between 0 and 100. The default value is 25.

@ahmetmircik

This comment has been minimized.

Copy link
Member

commented Oct 12, 2015

@wildnez did you try by to set <min-eviction-check-millis>0</min-eviction-check-millis> to zero default is 100 ms?

@wildnez

This comment has been minimized.

Copy link
Contributor Author

commented Oct 12, 2015

@ahmetmircik yes I did and it did not have any impact.

@gurbuzali gurbuzali added this to the 3.7 milestone Jul 27, 2016

@gurbuzali gurbuzali assigned gurbuzali and unassigned Serdaro Jul 27, 2016

@gurbuzali

This comment has been minimized.

Copy link
Member

commented Jul 27, 2016

@gurbuzali gurbuzali closed this Jul 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.