cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9738) Migrate key-cache to be fully off-heap
Date Thu, 06 Aug 2015 07:27:04 GMT


Robert Stupp commented on CASSANDRA-9738:

I’d like to propose this patch to be included in 3.0. I hope the cstar tests are sufficient
but otherwise I can deliver more with different workloads.

h2. cstar tests

All cstar tests mentioned below perform three operations: write-only, mixed and read-only.
Unfortunately, cassandra-stress seems to reduce the really possible write throughput for workloads
with clustering keys.

All tests on this patch show reduced GC pressure (for reads, of course).
By that it gives G1 more headroom to operate and and often gains about 10-15% read perf improvement
depending on the hardware (in this case bdplab vs. blade_11_b) - bdplab (spinning disks, less
RAM) shows a bigger improvement.

h3. one big clustering key

user, native, cql3, user [profile|]


h3. big clustering over two clustering columns

user, native, cql3, user [profile|]


h3. big clustering over two clustering columns, reduced threads for pure-write and mixed operations

user, native, cql3, user [profile|]


h3. stress _write_, _mixed_, _read_


h2. Git branch + cassci

[git branch|]
[unit tests|]

I didn’t see any failed tests related to this patch.

There is another branch on github as well which contains [optimizations not purely related
to key-cache|]. {{9738-key-cache-ohc}}
is based on that branch and contains:
* “singletons” for key-cache {{o.a.c.db.SerializationHeader}} instances (dynamically extended,
if required)
* “singletons” for {{IndexInfo.Serializer}} in {{o.a.c.db.Serializers}} (dynamically extended,
if required)
* “singletons” for {{BigVersion}} instances for {{ma}}, {{la}}, {{ka}}, {{jb}} - other
versions get temporary objects (some tests use older sstable versions)

h2. Further optimisations

There are some things that can be optimised in the future:
* Currently we need to serialise keyspace and cf names _and_ cfId. This is necessary since
cfID of secondary indexes is inherited from the base table. If all tables and all secondary
indexes have unique IDs, we can omit KS and CF name serialisation (and it’s weird {{cfName.contains(‘.’)}}
2i detection). Can be built with or after 2i API redesign.
* The full directory path is serialised. This appears to be less expensive than iterating
of the whole {{List}} of sstables and identifying an sstable by its generation.
* As [~benedict] suggested, we can switch to very tiny key-cache entries and also omit serialisation
of {{IndexInfo}}.

> Migrate key-cache to be fully off-heap
> --------------------------------------
>                 Key: CASSANDRA-9738
>                 URL:
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>             Fix For: 3.0.0 rc1
> Key cache still uses a concurrent map on-heap. This could go to off-heap and feels doable
now after CASSANDRA-8099.
> Evaluation should be done in advance based on a POC to prove that pure off-heap counter
cache buys a performance and/or gc-pressure improvement.
> In theory, elimination of on-heap management of the map should buy us some benefit.

This message was sent by Atlassian JIRA

View raw message