You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@directmemory.apache.org by Andy <an...@yahoo.com> on 2012/01/20 07:47:04 UTC

Status of DirectMemory

Hi,

Is DirectMemory ready for production? If not, is there any estimated timeline?

Also, at what point should I move from on-heap to off-heap cache? 4GB of cached data? 10GB? 20GB? Any rules of thumb there?

Thank you.

Andy

Re: Status of DirectMemory

Posted by "Raffaele P. Guidi" <ra...@gmail.com>.
you can allocate as many 2gb buffers as you want - they will be managed
transparently by DM. Regarding the numbers keep in mind they were about an
early implementation and that we are doing an almost complete rewrite.

Ciao,
     R
Il giorno 20/gen/2012 11:50, "Andy" <an...@yahoo.com> ha scritto:

> > you choose how many blocks up to 2gb you want to allocate
>
> What happens if I want to cache more than 2GB?
>
>
> > You can find out more about this in my blog
> http://raffaeleguidi.wordpress.com/2011/01/12/directmemory-benchmark-heap-vs-off-heap-vs-orientdb/
>
> I'm looking at the 1st graph. According to that graph, for off-heap cache,
> put/get 100K entries takes 100 seconds. That's about 1,000 GET/PUT per
> second. Did I interpret the data correctly? That seems very slow for an
> in-process in-memory cache. I can get much higher performance than that
> using memcached or redis over the network.
>
> Thanks.
> Andy
>
>   ------------------------------
> *From:* Raffaele P. Guidi <ra...@gmail.com>
> *To:* Andy <an...@yahoo.com>
> *Cc:* "directmemory-user@incubator.apache.org" <
> directmemory-user@incubator.apache.org>
> *Sent:* Friday, January 20, 2012 4:54 AM
> *Subject:* Re: Status of DirectMemory
>
> It of course has the chance to specify a limit (well, you choose how many
> blocks up to 2gb you want to allocate) but we abandoned the multi tiered
> hierarchy to focus on the core offering (off-heap memory, of course) and we
> are working on integration with Apache JCS to provide this feature (still
> work in progress, though).
>
> Regarding performance comparisons: of course a heap cache is faster below
> a certain memory limit (it doesn't need serialization) - but directmemory
> can catch up fast when it comes to multi-gb caches (because heap means
> garbage collection - and GC pauses can be pretty heavy in these scenarios).
> You can find out more about this in my blog
> http://raffaeleguidi.wordpress.com/2011/01/12/directmemory-benchmark-heap-vs-off-heap-vs-orientdb/.
> No direct benchmark against ehcache has been done, yet, and it probably is
> not correct at all - it should be done against their BigMemory, instead;
> beware the apples vs oranges syndrome ;).
>
> Ciao,
>     R
>
> On Fri, Jan 20, 2012 at 8:49 AM, Andy <an...@yahoo.com> wrote:
>
> Thanks.
>
> - Does DM let me specify a cache size limit? Say I want to devote 6GB to
> cache, and when that limit is reached, expired cached items will be
> automatically evicted first, after that cached will be evicted based on
> LRU. Does DM support something like that?
>
> - Does DM support a tiered cache hierarchy? For example, 2GB will be
> cached on heap, beyond that there's 6GB off-heap cache
>
> - How is DM's performance compared to ehcache? How many sets and gets can
> it do per second?
>
> Appreciate your help
> Andy
>
>    ------------------------------
> *From:* Raffaele P. Guidi <ra...@gmail.com>
> *To:* directmemory-user@incubator.apache.org; Andy <an...@yahoo.com>
> *Sent:* Friday, January 20, 2012 2:02 AM
> *Subject:* Re: Status of DirectMemory
>
> I would say it is ready to be tested :) also, you should consider it if
> you need a multi-gb of cache but consider that objects in DM are
> (transparently) serialized, so you can't call their methods or read their
> properties until you retrieve them. If this fits your use case then
> DirectMemory is right for you (and we are here to help).
> Cheers,
>      Raffaele
> Il giorno 20/gen/2012 07:47, "Andy" <an...@yahoo.com> ha scritto:
>
> Hi,
>
> Is DirectMemory ready for production? If not, is there any estimated
> timeline?
>
> Also, at what point should I move from on-heap to off-heap cache? 4GB of
> cached data? 10GB? 20GB? Any rules of thumb there?
>
> Thank you.
>
> Andy
>
>
>
>
>
>
>

Re: Status of DirectMemory

Posted by Andy <an...@yahoo.com>.
> you choose how many blocks up to 2gb you want to allocate

What happens if I want to cache more than 2GB?


> You can find out more about this in my blog http://raffaeleguidi.wordpress.com/2011/01/12/directmemory-benchmark-heap-vs-off-heap-vs-orientdb/

I'm looking at the 1st graph. According to that graph, for off-heap cache, put/get 100K entries takes 100 seconds. That's about 1,000 GET/PUT per second. Did I interpret the data correctly? That seems very slow for an in-process in-memory cache. I can get much higher performance than that using memcached or redis over the network.

Thanks.
Andy


________________________________
 From: Raffaele P. Guidi <ra...@gmail.com>
To: Andy <an...@yahoo.com> 
Cc: "directmemory-user@incubator.apache.org" <di...@incubator.apache.org> 
Sent: Friday, January 20, 2012 4:54 AM
Subject: Re: Status of DirectMemory
 

It of course has the chance to specify a limit (well, you choose how many blocks up to 2gb you want to allocate) but we abandoned the multi tiered hierarchy to focus on the core offering (off-heap memory, of course) and we are working on integration with Apache JCS to provide this feature (still work in progress, though).

Regarding performance comparisons: of course a heap cache is faster below a certain memory limit (it doesn't need serialization) - but directmemory can catch up fast when it comes to multi-gb caches (because heap means garbage collection - and GC pauses can be pretty heavy in these scenarios). You can find out more about this in my blog http://raffaeleguidi.wordpress.com/2011/01/12/directmemory-benchmark-heap-vs-off-heap-vs-orientdb/. No direct benchmark against ehcache has been done, yet, and it probably is not correct at all - it should be done against their BigMemory, instead; beware the apples vs oranges syndrome ;).


Ciao,
    R


On Fri, Jan 20, 2012 at 8:49 AM, Andy <an...@yahoo.com> wrote:

Thanks.
>
>
>- Does DM let me specify a cache size limit? Say I want to devote 6GB to cache, and when that limit is reached, expired cached items will be automatically evicted first, after that cached will be evicted based on LRU. Does DM support something like that?
>
>
>
>- Does DM support a tiered cache hierarchy? For example, 2GB will be cached on heap, beyond that there's 6GB off-heap cache
>
>
>- How is DM's performance compared to ehcache? How many sets and gets can it do per second?
>
>
>Appreciate your helpAndy
>
>
>
>________________________________
> From: Raffaele P. Guidi <ra...@gmail.com>
>To: directmemory-user@incubator.apache.org; Andy <an...@yahoo.com> 
>Sent: Friday, January 20, 2012 2:02 AM
>Subject: Re: Status of DirectMemory
> 
>
>
>I would say it is ready to be tested :) also, you should consider it if you need a multi-gb of cache but consider that objects in DM are (transparently) serialized, so you can't call their methods or read their properties until you retrieve them. If this fits your use case then DirectMemory is right for you (and we are here to help).
>Cheers,
>     Raffaele
>Il giorno 20/gen/2012 07:47, "Andy" <an...@yahoo.com> ha scritto:
>
>Hi,
>>
>>
>>Is DirectMemory ready for production? If not, is there any estimated timeline?
>>
>>
>>Also, at what point should I move from on-heap to off-heap cache? 4GB of cached data? 10GB? 20GB? Any rules of thumb there?
>>
>>
>>Thank you.
>>
>>
>>Andy
>
>

Re: Status of DirectMemory

Posted by "Raffaele P. Guidi" <ra...@gmail.com>.
It of course has the chance to specify a limit (well, you choose how many
blocks up to 2gb you want to allocate) but we abandoned the multi tiered
hierarchy to focus on the core offering (off-heap memory, of course) and we
are working on integration with Apache JCS to provide this feature (still
work in progress, though).

Regarding performance comparisons: of course a heap cache is faster below a
certain memory limit (it doesn't need serialization) - but directmemory can
catch up fast when it comes to multi-gb caches (because heap means garbage
collection - and GC pauses can be pretty heavy in these scenarios). You can
find out more about this in my blog
http://raffaeleguidi.wordpress.com/2011/01/12/directmemory-benchmark-heap-vs-off-heap-vs-orientdb/.
No direct benchmark against ehcache has been done, yet, and it probably is
not correct at all - it should be done against their BigMemory, instead;
beware the apples vs oranges syndrome ;).

Ciao,
    R

On Fri, Jan 20, 2012 at 8:49 AM, Andy <an...@yahoo.com> wrote:

> Thanks.
>
> - Does DM let me specify a cache size limit? Say I want to devote 6GB to
> cache, and when that limit is reached, expired cached items will be
> automatically evicted first, after that cached will be evicted based on
> LRU. Does DM support something like that?
>
> - Does DM support a tiered cache hierarchy? For example, 2GB will be
> cached on heap, beyond that there's 6GB off-heap cache
>
> - How is DM's performance compared to ehcache? How many sets and gets can
> it do per second?
>
> Appreciate your help
> Andy
>
>   ------------------------------
> *From:* Raffaele P. Guidi <ra...@gmail.com>
> *To:* directmemory-user@incubator.apache.org; Andy <an...@yahoo.com>
> *Sent:* Friday, January 20, 2012 2:02 AM
> *Subject:* Re: Status of DirectMemory
>
> I would say it is ready to be tested :) also, you should consider it if
> you need a multi-gb of cache but consider that objects in DM are
> (transparently) serialized, so you can't call their methods or read their
> properties until you retrieve them. If this fits your use case then
> DirectMemory is right for you (and we are here to help).
> Cheers,
>      Raffaele
> Il giorno 20/gen/2012 07:47, "Andy" <an...@yahoo.com> ha scritto:
>
> Hi,
>
> Is DirectMemory ready for production? If not, is there any estimated
> timeline?
>
> Also, at what point should I move from on-heap to off-heap cache? 4GB of
> cached data? 10GB? 20GB? Any rules of thumb there?
>
> Thank you.
>
> Andy
>
>
>
>

Re: Status of DirectMemory

Posted by Andy <an...@yahoo.com>.
Thanks.

- Does DM let me specify a cache size limit? Say I want to devote 6GB to cache, and when that limit is reached, expired cached items will be automatically evicted first, after that cached will be evicted based on LRU. Does DM support something like that?


- Does DM support a tiered cache hierarchy? For example, 2GB will be cached on heap, beyond that there's 6GB off-heap cache

- How is DM's performance compared to ehcache? How many sets and gets can it do per second?

Appreciate your help
Andy


________________________________
 From: Raffaele P. Guidi <ra...@gmail.com>
To: directmemory-user@incubator.apache.org; Andy <an...@yahoo.com> 
Sent: Friday, January 20, 2012 2:02 AM
Subject: Re: Status of DirectMemory
 

I would say it is ready to be tested :) also, you should consider it if you need a multi-gb of cache but consider that objects in DM are (transparently) serialized, so you can't call their methods or read their properties until you retrieve them. If this fits your use case then DirectMemory is right for you (and we are here to help).
Cheers,
     Raffaele
Il giorno 20/gen/2012 07:47, "Andy" <an...@yahoo.com> ha scritto:

Hi,
>
>
>Is DirectMemory ready for production? If not, is there any estimated timeline?
>
>
>Also, at what point should I move from on-heap to off-heap cache? 4GB of cached data? 10GB? 20GB? Any rules of thumb there?
>
>
>Thank you.
>
>
>Andy

Re: Status of DirectMemory

Posted by "Raffaele P. Guidi" <ra...@gmail.com>.
I would say it is ready to be tested :) also, you should consider it if you
need a multi-gb of cache but consider that objects in DM are
(transparently) serialized, so you can't call their methods or read their
properties until you retrieve them. If this fits your use case then
DirectMemory is right for you (and we are here to help).

Cheers,
     Raffaele
Il giorno 20/gen/2012 07:47, "Andy" <an...@yahoo.com> ha scritto:

> Hi,
>
> Is DirectMemory ready for production? If not, is there any estimated
> timeline?
>
> Also, at what point should I move from on-heap to off-heap cache? 4GB of
> cached data? 10GB? 20GB? Any rules of thumb there?
>
> Thank you.
>
> Andy
>