off heap memory

classic Classic list List threaded Threaded
6 messages Options
Ambha Ambha
Reply | Threaded
Open this post in threaded view
|

off heap memory

This post has NOT been accepted by the mailing list yet.
How is the 'off-heap' implemented in Apache ignite? Is there any benchmarking done for its effectiveness?
Denis Magda Denis Magda
Reply | Threaded
Open this post in threaded view
|

Re: off heap memory

Hi Ambha,

Please properly subscribe to the user list (this way we will not have to manually approve your emails). All you need to do is send an email to “user-subscribe@ignite.apache.org” and follow simple instructions in the
reply.

In short, the 'off-heap' is just a part of the memory that located outside of Java Heap which lets to avoid lengthy garbage collection cycles in cases when a cache stores significant amount of data.

You may want to read some basics here: https://apacheignite.readme.io/docs/off-heap-memory
If you need more details then don't hesitate jumping into the code ;)

In regards to the performance as far as I know the OFF_HEAP mode is a bit slower, but not too much.

Community, do we have any publicly available info showing the benchmarking results for the off-heap mode?

Regards,
Denis
Ambha Ambha
Reply | Threaded
Open this post in threaded view
|

Re: off heap memory

After looking at the code, it looks like the 'off-heap' uses the 'Unsafe' of java to manage the memory. But 'Unsafe' has issues like fragmentation and also adds memory allocation/de-allocation cost. I have seen some memory grid implementations using 'slab allocator' on top of java native to minimize the fragmentation issue and the allocation cost. Is there something similar implemented in Ignite? If not, any plan in future release?
Denis Magda Denis Magda
Reply | Threaded
Open this post in threaded view
|

Re: off heap memory

Hi,

You're correct saying that Ignite's off-heap cache memory mode uses
Unsafe at the implementation layer.
Right, there is no any de-fragmentation related logic in Ignite, this is
delegated to an operating system that knows how to do this better.

Allocated memory re-usage, what slab allocator does, sounds interesting.
Do you have any info/articles on how the mentioned memory grids benefit
from implementing the slab like way and what are the names of those grids?

--
Denis

On 11/26/2015 8:29 AM, Ambha wrote:

> After looking at the code, it looks like the 'off-heap' uses the 'Unsafe' of
> java to manage the memory. But 'Unsafe' has issues like fragmentation and
> also adds memory allocation/de-allocation cost. I have seen some memory grid
> implementations using 'slab allocator' on top of java native to minimize the
> fragmentation issue and the allocation cost. Is there something similar
> implemented in Ignite? If not, any plan in future release?
>
>
>
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/off-heap-memory-tp2019p2059.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Ambha Ambha
Reply | Threaded
Open this post in threaded view
|

RE: off heap memory

Memcache and Hazelcast Enterprise 3.6.X use slab allocation for effective memory utilization.
Is there any such plan for Ignite in future release?



-----Original Message-----
From: Denis Magda [mailto:[hidden email]]
Sent: 26 November 2015 12:12
To: [hidden email]
Subject: Re: off heap memory

Hi,

You're correct saying that Ignite's off-heap cache memory mode uses Unsafe at the implementation layer.
Right, there is no any de-fragmentation related logic in Ignite, this is delegated to an operating system that knows how to do this better.

Allocated memory re-usage, what slab allocator does, sounds interesting.
Do you have any info/articles on how the mentioned memory grids benefit from implementing the slab like way and what are the names of those grids?

--
Denis

On 11/26/2015 8:29 AM, Ambha wrote:

> After looking at the code, it looks like the 'off-heap' uses the
> 'Unsafe' of java to manage the memory. But 'Unsafe' has issues like
> fragmentation and also adds memory allocation/de-allocation cost. I
> have seen some memory grid implementations using 'slab allocator' on
> top of java native to minimize the fragmentation issue and the
> allocation cost. Is there something similar implemented in Ignite? If not, any plan in future release?
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/off-heap-memory-tp2019p
> 2059.html Sent from the Apache Ignite Users mailing list archive at
> Nabble.com.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
dsetrakyan dsetrakyan
Reply | Threaded
Open this post in threaded view
|

Re: off heap memory



On Thu, Nov 26, 2015 at 12:52 PM, <[hidden email]> wrote:
Memcache and Hazelcast Enterprise 3.6.X use slab allocation for effective memory utilization.
Is there any such plan for Ignite in future release?

We are currently revising Ignite memory model and will add an option to use the slab allocator early next year.

Also, I should mention that the slab allocator is part of Hazelcast enterprise edition, and is not free. It may utilize memory slightly better, but it would likely loose in performance to the old-fashioned malloc, which is used in Ignite. Also, malloc is often fragmentation-aware and handles it automatically.

D.
 



-----Original Message-----
From: Denis Magda [mailto:[hidden email]]
Sent: 26 November 2015 12:12
To: [hidden email]
Subject: Re: off heap memory

Hi,

You're correct saying that Ignite's off-heap cache memory mode uses Unsafe at the implementation layer.
Right, there is no any de-fragmentation related logic in Ignite, this is delegated to an operating system that knows how to do this better.

Allocated memory re-usage, what slab allocator does, sounds interesting.
Do you have any info/articles on how the mentioned memory grids benefit from implementing the slab like way and what are the names of those grids?

--
Denis

On 11/26/2015 8:29 AM, Ambha wrote:
> After looking at the code, it looks like the 'off-heap' uses the
> 'Unsafe' of java to manage the memory. But 'Unsafe' has issues like
> fragmentation and also adds memory allocation/de-allocation cost. I
> have seen some memory grid implementations using 'slab allocator' on
> top of java native to minimize the fragmentation issue and the
> allocation cost. Is there something similar implemented in Ignite? If not, any plan in future release?
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/off-heap-memory-tp2019p
> 2059.html Sent from the Apache Ignite Users mailing list archive at
> Nabble.com.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com