You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Viktor Jevdokimov <Vi...@adform.com> on 2010/09/03 15:22:57 UTC

Cache capacity set with JConsole is lost after restart

Hi,

We're not setting cache capacity upon creation of Column Family, since the type and capacity is unknown at that time. By default it = 0.

After Column Family has enough data and we could decide on cache type (Row or Key) and capacity, we connect with JConsole and set cache capacity manually on every node. But after Cassandra restart cache capacity is 0 again.

How to avoid losing cache capacity after restart?


Viktor

Re: Cache capacity set with JConsole is lost after restart

Posted by Jonathan Ellis <jb...@gmail.com>.
Right, in 0.7 the system calls for modifying these are the source of
truth.  See https://issues.apache.org/jira/browse/CASSANDRA-1285

On Fri, Sep 3, 2010 at 11:17 AM, Jeremiah Jordan
<JE...@morningstar.com> wrote:
> But the config file doesn't hold those values anymore with 0.7.
> There is a JIRA ticket out there for api's to modify stuff about column families in 0.7, it may cover doing this.  I would guess that the tracking tables in the system keyspace aren't being updated with the values you are setting from JMX, so on restart they go back to what they were on creation.
>
> -----Original Message-----
> From: Jonathan Ellis [mailto:jbellis@gmail.com]
> Sent: Friday, September 03, 2010 9:28 AM
> To: user@cassandra.apache.org
> Subject: Re: Cache capacity set with JConsole is lost after restart
>
> That doesn't matter, the config file is the Source Of Truth for the
> values it has.
>
> On Fri, Sep 3, 2010 at 7:12 AM, Viktor Jevdokimov
> <Vi...@adform.com> wrote:
>> Forgot to mention the version: 0.7 beta 1
>>
>> -----Original Message-----
>> From: Edward Capriolo [mailto:edlinuxguru@gmail.com]
>> Sent: Friday, September 03, 2010 4:59 PM
>> To: user@cassandra.apache.org
>> Subject: Re: Cache capacity set with JConsole is lost after restart
>>
>> On Fri, Sep 3, 2010 at 9:22 AM, Viktor Jevdokimov
>> <Vi...@adform.com> wrote:
>>> Hi,
>>>
>>>
>>>
>>> We're not setting cache capacity upon creation of Column Family, since the
>>> type and capacity is unknown at that time. By default it = 0.
>>>
>>>
>>>
>>> After Column Family has enough data and we could decide on cache type (Row
>>> or Key) and capacity, we connect with JConsole and set cache capacity
>>> manually on every node. But after Cassandra restart cache capacity is 0
>>> again.
>>>
>>>
>>>
>>> How to avoid losing cache capacity after restart?
>>>
>>>
>>>
>>>
>>>
>>> Viktor
>>
>> Viktor,
>> I will assume you are using 6.X.
>>
>> In 6.X changes to cache capacity through JMX are NOT saved. Use the
>> KeysCached and RowsCached
>>
>>  <ColumnFamily Name="Super2"
>>                    ColumnType="Super"
>>                    CompareWith="UTF8Type"
>>                    CompareSubcolumnsWith="UTF8Type"
>>                    RowsCached="10000"
>>                    KeysCached="1111111"
>>
>> Be warned the attributes are CaSe SeNSative!
>>
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

RE: Cache capacity set with JConsole is lost after restart

Posted by Jeremiah Jordan <JE...@morningstar.com>.
But the config file doesn't hold those values anymore with 0.7.
There is a JIRA ticket out there for api's to modify stuff about column families in 0.7, it may cover doing this.  I would guess that the tracking tables in the system keyspace aren't being updated with the values you are setting from JMX, so on restart they go back to what they were on creation.

-----Original Message-----
From: Jonathan Ellis [mailto:jbellis@gmail.com] 
Sent: Friday, September 03, 2010 9:28 AM
To: user@cassandra.apache.org
Subject: Re: Cache capacity set with JConsole is lost after restart

That doesn't matter, the config file is the Source Of Truth for the
values it has.

On Fri, Sep 3, 2010 at 7:12 AM, Viktor Jevdokimov
<Vi...@adform.com> wrote:
> Forgot to mention the version: 0.7 beta 1
>
> -----Original Message-----
> From: Edward Capriolo [mailto:edlinuxguru@gmail.com]
> Sent: Friday, September 03, 2010 4:59 PM
> To: user@cassandra.apache.org
> Subject: Re: Cache capacity set with JConsole is lost after restart
>
> On Fri, Sep 3, 2010 at 9:22 AM, Viktor Jevdokimov
> <Vi...@adform.com> wrote:
>> Hi,
>>
>>
>>
>> We're not setting cache capacity upon creation of Column Family, since the
>> type and capacity is unknown at that time. By default it = 0.
>>
>>
>>
>> After Column Family has enough data and we could decide on cache type (Row
>> or Key) and capacity, we connect with JConsole and set cache capacity
>> manually on every node. But after Cassandra restart cache capacity is 0
>> again.
>>
>>
>>
>> How to avoid losing cache capacity after restart?
>>
>>
>>
>>
>>
>> Viktor
>
> Viktor,
> I will assume you are using 6.X.
>
> In 6.X changes to cache capacity through JMX are NOT saved. Use the
> KeysCached and RowsCached
>
>  <ColumnFamily Name="Super2"
>                    ColumnType="Super"
>                    CompareWith="UTF8Type"
>                    CompareSubcolumnsWith="UTF8Type"
>                    RowsCached="10000"
>                    KeysCached="1111111"
>
> Be warned the attributes are CaSe SeNSative!
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Re: Cache capacity set with JConsole is lost after restart

Posted by Jonathan Ellis <jb...@gmail.com>.
That doesn't matter, the config file is the Source Of Truth for the
values it has.

On Fri, Sep 3, 2010 at 7:12 AM, Viktor Jevdokimov
<Vi...@adform.com> wrote:
> Forgot to mention the version: 0.7 beta 1
>
> -----Original Message-----
> From: Edward Capriolo [mailto:edlinuxguru@gmail.com]
> Sent: Friday, September 03, 2010 4:59 PM
> To: user@cassandra.apache.org
> Subject: Re: Cache capacity set with JConsole is lost after restart
>
> On Fri, Sep 3, 2010 at 9:22 AM, Viktor Jevdokimov
> <Vi...@adform.com> wrote:
>> Hi,
>>
>>
>>
>> We're not setting cache capacity upon creation of Column Family, since the
>> type and capacity is unknown at that time. By default it = 0.
>>
>>
>>
>> After Column Family has enough data and we could decide on cache type (Row
>> or Key) and capacity, we connect with JConsole and set cache capacity
>> manually on every node. But after Cassandra restart cache capacity is 0
>> again.
>>
>>
>>
>> How to avoid losing cache capacity after restart?
>>
>>
>>
>>
>>
>> Viktor
>
> Viktor,
> I will assume you are using 6.X.
>
> In 6.X changes to cache capacity through JMX are NOT saved. Use the
> KeysCached and RowsCached
>
>  <ColumnFamily Name="Super2"
>                    ColumnType="Super"
>                    CompareWith="UTF8Type"
>                    CompareSubcolumnsWith="UTF8Type"
>                    RowsCached="10000"
>                    KeysCached="1111111"
>
> Be warned the attributes are CaSe SeNSative!
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

RE: Cache capacity set with JConsole is lost after restart

Posted by Viktor Jevdokimov <Vi...@adform.com>.
Forgot to mention the version: 0.7 beta 1

-----Original Message-----
From: Edward Capriolo [mailto:edlinuxguru@gmail.com] 
Sent: Friday, September 03, 2010 4:59 PM
To: user@cassandra.apache.org
Subject: Re: Cache capacity set with JConsole is lost after restart

On Fri, Sep 3, 2010 at 9:22 AM, Viktor Jevdokimov
<Vi...@adform.com> wrote:
> Hi,
>
>
>
> We're not setting cache capacity upon creation of Column Family, since the
> type and capacity is unknown at that time. By default it = 0.
>
>
>
> After Column Family has enough data and we could decide on cache type (Row
> or Key) and capacity, we connect with JConsole and set cache capacity
> manually on every node. But after Cassandra restart cache capacity is 0
> again.
>
>
>
> How to avoid losing cache capacity after restart?
>
>
>
>
>
> Viktor

Viktor,
I will assume you are using 6.X.

In 6.X changes to cache capacity through JMX are NOT saved. Use the
KeysCached and RowsCached

  <ColumnFamily Name="Super2"
                    ColumnType="Super"
                    CompareWith="UTF8Type"
                    CompareSubcolumnsWith="UTF8Type"
                    RowsCached="10000"
                    KeysCached="1111111"

Be warned the attributes are CaSe SeNSative!


Re: Cache capacity set with JConsole is lost after restart

Posted by Edward Capriolo <ed...@gmail.com>.
On Fri, Sep 3, 2010 at 9:22 AM, Viktor Jevdokimov
<Vi...@adform.com> wrote:
> Hi,
>
>
>
> We’re not setting cache capacity upon creation of Column Family, since the
> type and capacity is unknown at that time. By default it = 0.
>
>
>
> After Column Family has enough data and we could decide on cache type (Row
> or Key) and capacity, we connect with JConsole and set cache capacity
> manually on every node. But after Cassandra restart cache capacity is 0
> again.
>
>
>
> How to avoid losing cache capacity after restart?
>
>
>
>
>
> Viktor

Viktor,
I will assume you are using 6.X.

In 6.X changes to cache capacity through JMX are NOT saved. Use the
KeysCached and RowsCached

  <ColumnFamily Name="Super2"
                    ColumnType="Super"
                    CompareWith="UTF8Type"
                    CompareSubcolumnsWith="UTF8Type"
                    RowsCached="10000"
                    KeysCached="1111111"

Be warned the attributes are CaSe SeNSative!