[infinispan-dev] ISPN-863 - Thoughts / Questions
Bela Ban
bban at redhat.com
Fri Jan 14 09:54:06 EST 2011
On 1/14/11 3:35 PM, Manik Surtani wrote:
>> If a put() is the culprit leading to the OOME, we can definitely do
>> something !
>
> Galder is right though, even if the put() is the culprit, concurrent threads elsewhere (out of our control) would also be seeing OOMs and even if we free up memory by evicting, other threads may be in an unstable state.
JGroups tries to handle temporary OOMEs, and if Infinispan does that,
too, then it's only the app left which can cause OOMEs.
But at least the middleware (JGroups, Infinispan) should go to great
lengths to make sure it handles OOMEs.
I see a big issue coming when we don't do this: as long as we don't have
a more or less even key/value distribution in Infinispan, there is a
chance we end up with some JVMs lightly loaded (in terms of memory) and
others almost full.
Even if we come up with a better distribution function, we cannot
prevent an application from using objects with uneven sizes that they
stick into the cache, e.g. thousands of smallish values and a few very
large values. This will also cause an uneven memory distribution, even
if the key distribution is even.
One thing we could do on the receiving side is to check memory only if
we receive a value that bigger than a certain size. Problem is what
happens when someone sets a value...
--
Bela Ban
Lead JGroups / Clustering Team
JBoss
More information about the infinispan-dev
mailing list