cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <vijay2...@gmail.com>
Subject Re: key_cache_size_in_mb
Date Thu, 28 Jun 2012 23:25:34 GMT
> It has 13.7million keys
How big is your Row Keys? Current calculation (in 1.1) assumes that the
average size of the Entry<RowKey, Long> in the keycache is 16 bytes.

One thing which you can do to get out this issue is to reduce the Keycache
to a low enough to get the server started or increase the Heap to hold all
the objects. (If you are using the visualVM try to see the object counts).

Regards,
</VJ>



On Thu, Jun 28, 2012 at 3:40 PM, Gurpreet Singh <gurpreet.singh@gmail.com>wrote:

> Vijay,
> I am running into an issue right now, not sure if its related to this one.
>
> My cassandra 1.1 was running fine for a week, and the key cache size (as
> checked by jconsole) increased to almost 650 mb. It has 13.7million keys. I
> have set key_cache_size_in_mb to 800 mb. I checked the heap size, and it
> was at 6 gigs. All good!
> However, when i try to restart cassandra, it is unable to start now.
> Before i shut it down, it seemed fine at 6 gigs, which means its able to
> handle the memory requirements just fine. However it is not able to start
> up anymore with the same key cache. jconsole says that the heap is full.
>
> Thanks
> /G
>
>
> On Thu, Jun 28, 2012 at 12:22 PM, Vijay <vijay2win@gmail.com> wrote:
>
>> in 1.1 we dont calculate the Key size accurately, hence we have the fix
>> in https://issues.apache.org/jira/browse/CASSANDRA-4315
>>
>> Regards,
>> </VJ>
>>
>>
>>
>>
>> On Thu, Jun 28, 2012 at 11:25 AM, Gurpreet Singh <
>> gurpreet.singh@gmail.com> wrote:
>>
>>> anyone have an explanation for this?
>>> This kinda screws up memory calculations.
>>>
>>> /G
>>>
>>> On Mon, Jun 25, 2012 at 5:50 PM, Gurpreet Singh <
>>> gurpreet.singh@gmail.com> wrote:
>>>
>>>> Hi,
>>>> I have a question about cassandra 1.1
>>>>
>>>> Just wanted to confirm if key_cache_size_in_mb is the maximum amount of
>>>> memory that key cache will use in memory? If not, what is it?
>>>>
>>>> My observations:
>>>> With key cache disabled, I started cassandra. I invoked Full GC through
>>>> jconsole a couple of times just to make sure that memory is freed up.
>>>> Total heap memory in use is 2.2 gigs. I have almost 550 million keys,
>>>> so this looked reasonable as the bloom filter itself is around 1 gig.
>>>>
>>>> I enabled key cache again by making key_cache_size_in_mb to a value
>>>> 800. This would lead cassandra to load a previously saved key cache file
of
>>>> size 98 mb on disk. I restarted cassandra again. This time the heap size
>>>> increased to 4.2 gigs. I checked the cache sizing in jconsole.
>>>>
>>>> KeyCacheCapacityInMb: 799
>>>> KeyCacheSize: 410,316,048
>>>>
>>>> This says that the key cache size is 410 mb. However the increase in
>>>> the heap is 2 gigs. Doesnt add up!!
>>>>
>>>> Can anyone explain this?
>>>> Thanks
>>>> Gurpreet
>>>>
>>>
>>>
>>
>

Mime
View raw message