cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Hermes (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CASSANDRA-1129) Using KeysCached="xx%" results in Key cache capacity: 1
Date Sat, 29 May 2010 05:43:37 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-1129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jon Hermes updated CASSANDRA-1129:
----------------------------------

    Attachment: 0001-CASSANDRA1129.patch

Status for first patch:
M       test/unit/org/apache/cassandra/db/CompactionsPurgeTest.java
M       test/conf/storage-conf.xml
M       src/java/org/apache/cassandra/db/ColumnFamilyStore.java
M       src/java/org/apache/cassandra/utils/FBUtilities.java
M       src/java/org/apache/cassandra/cache/InstrumentedCache.java
M       src/java/org/apache/cassandra/io/SSTableTracker.java

This bug was two bugs:
# FBUtilities#absoluteFromFraction(double,long) is a bit ambiguous. The method reads 100%
as *absolute* 1, so the keyCacheCapacity is always going to be 1. This fix is already in 0.7.
# The bigger bug is that the keyCacheCapacity was not getting changed during runtime. There
was a boolean capacityModified that controlled access to the capacity. It gets set true the
first time the capacity is modified (read: creation of table/cfstore) and then never goes
back to false. By removing this bool, the cache size gets updated on flushes and on compactions
correctly.

Also included are tests in CompactionsPurgeTest that shows this fix works for both 50% and
100% (that the keyCacheCapacity changes dynamically).

The update is O(1), so it shouldn't matter for performance that it's being called on every
flush and every compaction.

> Using KeysCached="xx%" results in Key cache capacity: 1
> -------------------------------------------------------
>
>                 Key: CASSANDRA-1129
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1129
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.1
>            Reporter: Ran Tavory
>            Priority: Minor
>             Fix For: 0.6.3
>
>         Attachments: 0001-CASSANDRA1129.patch, KvAds-84.zip
>
>
> I don't know if this is a general bug or only something related to my instance, but for
me (v0.6.1) I've noticed that when defining KeysCached="50%" (or KeysCached="100%" and I didn't
test other values with %) then cfstats reports Key cache capacity: 1
>       <ColumnFamily CompareWith="BytesType" Name="KvAds"
>         KeysCached="100%"
>         RowsCached="10000"
>         />
>                 Column Family: KvAds
>                 SSTable count: 7
>                 Space used (live): 797535964
>                 Space used (total): 797535964
>                 Memtable Columns Count: 42292
>                 Memtable Data Size: 10514176
>                 Memtable Switch Count: 24
>                 Read Count: 2563704
>                 Read Latency: 4.590 ms.
>                 Write Count: 1963804
>                 Write Latency: 0.025 ms.
>                 Pending Tasks: 0
>                 Key cache capacity: 1
>                 Key cache size: 1
>                 Key cache hit rate: 0.0
>                 Row cache capacity: 10000
>                 Row cache size: 10000
>                 Row cache hit rate: 0.2206178354382234
>                 Compacted row minimum size: 386
>                 Compacted row maximum size: 9808
>                 Compacted row mean size: 616
> I'll attach one of the sstable files from this CF

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message