Andrew Pushkin created ISPN-1796:
------------------------------------
Summary: Out-of-memory adding a lot of elements in cache with AsyncStore
Key: ISPN-1796
URL:
https://issues.jboss.org/browse/ISPN-1796
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores, Locking and Concurrency
Affects Versions: 5.1.0.CR3
Environment: We plan to use Infinispan as a large distributed write-behind cache
of terabytes of data, with a little fraction cached in RAM, so OOM is real threat for us.
Reporter: Andrew Pushkin
Assignee: Manik Surtani
OOM occure on peaks of putting objects in cache configured to use AsyncStore.
See Steps to Reproduce.
Profiling shows that the gc path is through AsyncStore.state field.
The AsyncStore.executor initialized to ThreadPoolExecutor with DiscardPolicy to silently
discard tasks if the queue is full, which delays async processing of entries in *state*
map, which continues to grow.
Suggested solution.
Instead of DiscardPolicy use customized behavior, which is to estimate accumulated state
size and (probably comparing it with modificationQueueSize) decide to discard or to block
until it is processed.
The downside of suggested solution is the necessity to lock to estimate state size every
time the task is rejected. Possibly it can be alleviated by increasing workingQueue size,
so that it survive peaks without rejection.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira