cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Burroughs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6574) key cache shrinks on restart
Date Wed, 22 Jul 2015 19:12:05 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-6574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14637466#comment-14637466
] 

Chris Burroughs commented on CASSANDRA-6574:
--------------------------------------------

I think the fail safe catch is per saved cache and not per entry, so if there is a problem
somewhere early in a 29 MiB cache file we could end up loading zero keys from it.
{noformat}
DEBUG [main] 2015-07-22 15:05:19,002 AutoSavingCache.java (line 136) harmless error reading
saved cache /home/cassandra/shared/saved_caches/urlapi_v2-DOMData-KeyCache-b.db
java.io.IOException: Corrupted key cache. Key length of 402838960 is longer than maximum of
65535
	at org.apache.cassandra.service.CacheService$KeyCacheSerializer.deserialize(CacheService.java:353)
	at org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:119)
	at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:263)
	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:422)
	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:393)
	at org.apache.cassandra.db.Keyspace.initCf(Keyspace.java:312)
	at org.apache.cassandra.db.Keyspace.<init>(Keyspace.java:269)
	at org.apache.cassandra.db.Keyspace.open(Keyspace.java:111)
	at org.apache.cassandra.db.Keyspace.open(Keyspace.java:89)
	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:364)
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:567)
	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:656)
DEBUG [main] 2015-07-22 15:05:19,002 AutoSavingCache.java (line 144) completed reading (21
ms; 0 keys) saved cache /home/cassandra/shared/saved_caches/urlapi_v2-DOMData-KeyCache-b.db
{noformat}

> key cache shrinks on restart
> ----------------------------
>
>                 Key: CASSANDRA-6574
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6574
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: 1.2.12 + patches
>            Reporter: Chris Burroughs
>         Attachments: key-cache-entries.png, key-cache-rate.png, key-cache.png
>
>
> During a rolling restart the key number of entries the number of entries in the key cache
is shrinking.  That is far fewer entries are loaded than are saved.  This has obvious bad
consequences for post restart performance.
> {noformat}
> key_cache_size_in_mb: 48
> key_cache_save_period: 900
> # Number of keys from the key cache to save
> # Disabled by default, meaning all keys are going to be saved
> # key_cache_keys_to_save: 100
> row_cache_size_in_mb: 256
> row_cache_save_period: 300
> row_cache_keys_to_save: 50000
> row_cache_provider: SerializingCacheProvider
> saved_caches_directory: /home/cassandra/shared/saved_caches
> {noformat}
> Same log lines:
> {noformat}
>  INFO [CompactionExecutor:24543] 2014-01-11 11:35:47,783 AutoSavingCache.java (line 289)
Saved KeyCache (398028 items) in 1252 ms
> *** RESTART ***
>  INFO [main] 2014-01-11 11:44:59,608 AutoSavingCache.java (line 140) reading saved cache
/home/cassandra/shared/saved_caches/ks-cf1-KeyCache-b.db
>  INFO [main] 2014-01-11 11:45:00,509 AutoSavingCache.java (line 140) reading saved cache
/home/cassandra/shared/saved_caches/ks-cf2-RowCache-b.db
>  INFO [main] 2014-01-11 12:02:48,675 ColumnFamilyStore.java (line 452) completed loading
(1068166 ms; 50000 keys) row cache for ks.cf2
>  INFO [main] 2014-01-11 12:02:48,769 CassandraDaemon.java (line 291) completed pre-loading
(67760 keys) key cache.
>  INFO [main] 2014-01-11 12:02:48,769 CassandraDaemon.java (line 294) completed pre-loading
(50000 keys) row cache.
>  INFO [CompactionExecutor:1] 2014-01-11 12:02:49,133 AutoSavingCache.java (line 289)
Saved RowCache (50000 items) in 266 ms
>  INFO [CompactionExecutor:2] 2014-01-11 12:02:49,575 AutoSavingCache.java (line 289)
Saved KeyCache (67760 items) in 707 ms
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message