Bug 1096467 - Migrate one intermediate key/value per maxCollectorSize threshold
Summary: Migrate one intermediate key/value per maxCollectorSize threshold
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ER2
: 6.3.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
Depends On:
TreeView+ depends on / blocked
Reported: 2014-05-10 18:27 UTC by Dan Berindei
Modified: 2015-01-26 14:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-01-26 14:05:33 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-4240 0 Major Resolved Migrate one intermediate key/value per maxCollectorSize threshold 2015-12-01 11:39:05 UTC

Description Dan Berindei 2014-05-10 18:27:53 UTC
When we hit the maxCollectorSize threshold, we remove all the values from the collector and we start transferring them into the intermediary cache. But the other mapper threads keep working, and event with large collector sizes, it's very likely that the collector will be full again before we finished sending the previous batch. So we could end up with a lot of threads trying to insert maxCollectorSize values in the intermediary cache in parallel, and a lot more intermediary values in memory on each mapper node than the user would expect.

In order to alleviate this observed phenomena Dan proposed an idea to keep the maxCollectorSize threshold, but to only move a single key at a time from the collector to the intermediary cache when the threshold is hit (the least recently used one). That way, the other keys would have time to collect more values (or just run the combiner a few more times).

This way we still transfer some intermediate keys/values during map/combine phase rather than all at once at the end of that phase thus alleviating possibility of OOM. At the end of map/combine phase all remaining keys/values are of course transferred. Application users can fine tune their requirements and a specific use case using maxCollectorSize threshold.

Comment 2 Alan Field 2014-05-19 09:34:30 UTC
Verified in JDG 6.3.0 ER3

Note You need to log in before you can comment on or make changes to this bug.