Sergey,

What prevents us from making MemoryPolicy expandable? For example, why not
allocate another 1GB, when user runs out of memory? In my view, this would
make our memory policies a lot more usable.

D.

On Mon, Apr 17, 2017 at 2:42 AM, Sergey Chugunov <sergey.chugu...@gmail.com>
wrote:

> Hello Denis,
>
> There is a small piece of documentation in *MemoryConfiguration *class,
> although I think it should be moved to *MemoryPolicyConfiguration *and
> detailed a lot.
>
> I'm going to write some documentation soon about validation rules that are
> applied to memory policies configuration (there are some restrictions about
> reserved name, default memory policy name and so on). I'll let you know
> when it is done.
>
> About your question: MemoryPolicy offheap regions were never supposed to be
> expandable. If user uses default MemoryPolicy (which in fact doesn't have
> any eviction algorithm configured) he/she will get OutOfMemory error when
> default size is exhausted.
>
> This OOM behavior was left intentionally to be consistent with the previous
> behavior as configuring some default eviction policy on default
> MemoryPolicy may lead to data loss and it is better to communicate wrong
> memory configuration to user even with OOM than silently drop some cached
> values.
>
> Thanks,
> Sergey.
>
> On Mon, Apr 17, 2017 at 12:01 AM, Denis Magda <dma...@apache.org> wrote:
>
> > Guys,
> >
> > I’ve been working on the documentation for page memory [1]. The doc is
> > still in progress and it will be more profound with code snippets and
> > pictures int the end, so don’t pay to the fact that it mostly consists of
> > dry text only.
> >
> > So, the question is different. Presently, javadoc part is useless (and
> > will be written by me as well) and it’s not clear what’s the default
> > behavior of the page memory that has only one memory policy (default)
> that
> > instantiates a single memory region. Looking at the code I see that the
> > default police creates 1 GB region that should be expandable because the
> > policy doesn’t define an eviction algorithm. It means that if my app goes
> > beyond 1 GB then the page memory will take more memory from an OS. Is my
> > understanding correct?
> >
> > [1] https://apacheignite.readme.io/docs/page-memory <
> > https://apacheignite.readme.io/docs/page-memory>
> >
> > —
> > Denis
>

Reply via email to