Memory Backend TTL doesn't work

성동찬_Chan chan at kakao.com
Mon Oct 14 21:48:36 EDT 2013


Thank you!! I've got it!! :)
Then, if I started server with ring size 32, I need to change max_memory to 256(8192/32). Is it right?
Chan.

2013. 10. 14., 오후 9:35, Alex Moore <amoore at basho.com<mailto:amoore at basho.com>> 작성:

Hi Chan,

Instead of:
{storage_backend, riak_kv_memory_backend},
{memory_backend, [
{max_memory, 8192},
{ttl, 1}
]},


Try:

        {multi_backend_default, <<"expiring_memory_backend">>},
        {multi_backend, [
            {<<"expiring_memory_backend">>,  riak_kv_memory_backend, [
                {max_memory, 8192}, %% 8GB
                {ttl, 1}
            ]}
        ]},


Also, for future reference, the max_memory field is in MB per vnode, so your current setting is 8GB per vnode.  Unless you have a ridiculous amount of RAM, you might want to reduce that setting a bit :)

Thanks,

Alex

--
Alex Moore
Sent with Airmail<http://airmailapp.info/tracking>


On October 14, 2013 at 7:32:03 AM, 성동찬_Chan (chan at kakao.com<mailto://chan@kakao.com>) wrote:

Hi~!

I'm checking riak to use as a cache like memcached.
But I found some strange situation.
I set "ttl" like this to expire data, but failed.
---------------------------------------------
{riak_kv, [
...
{storage_backend, riak_kv_memory_backend},
{memory_backend, [
{max_memory, 8192},
{ttl, 1}
]},
...
]},

---------------------------------------------

TTL isn't supported on riak_kv_memory_backend?
I changed riak_kv_memory_backend to riak_kv_bitcask_backend, that's fine.

Thanks.
Chan.
_______________________________________________
riak-users mailing list
riak-users at lists.basho.com<mailto:riak-users at lists.basho.com>
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20131015/0829076b/attachment.html>


More information about the riak-users mailing list