[
https://issues.apache.org/jira/browse/CASSANDRA-5863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15262132#comment-15262132
]
Branimir Lambov commented on CASSANDRA-5863:
--------------------------------------------
bq. change ChunkCache#invalidatePosition so instead of doing instance-of checks
and redirects to CachedRebufferer it simply does invalidate(new Key(...))
Key needs the file's chunk reader's type (otherwise it may confuse uncompressed
and compressed readings of the same file which is a problem for some tests) and
to get to that it still needs to cast. If you prefer, I can declare
{{invalidate}} in {{RebuffererFactory}} and only implement it in
{{CachingRebufferer}} to avoid the cast/instanceof?
bq. since ChunkReader is effectively stateless maybe we could drop
RebuffererFactory and use ChunkReader as a source of all Rebufferers?
We want the {{CachingRebufferer}} to be shared and not re-instantiated for each
reader; such a change would mean {{ChunkReader}} must hold a reference to one
over itself. I would rather not do that, because it is a bit of too-tight
coupling and dependency inversion. It would make extensions harder (e.g.
multiple cache types as played with in 11452).
Squashed the commits, rebased again, expanded the comment on
{{file_cache_size_in_mb}} in {{cassandra.yaml}} and added the {{CHANGES.txt}}
entry and commit description:
|[trunk
patch|https://github.com/blambov/cassandra/tree/5863-page-cache-squashed]|[utest|http://cassci.datastax.com/job/blambov-5863-page-cache-squashed-testall/]|[dtest|http://cassci.datastax.com/job/blambov-5863-page-cache-squashed-dtest/]|
> In process (uncompressed) page cache
> ------------------------------------
>
> Key: CASSANDRA-5863
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5863
> Project: Cassandra
> Issue Type: Sub-task
> Reporter: T Jake Luciani
> Assignee: Branimir Lambov
> Labels: performance
> Fix For: 3.x
>
>
> Currently, for every read, the CRAR reads each compressed chunk into a
> byte[], sends it to ICompressor, gets back another byte[] and verifies a
> checksum.
> This process is where the majority of time is spent in a read request.
> Before compression, we would have zero-copy of data and could respond
> directly from the page-cache.
> It would be useful to have some kind of Chunk cache that could speed up this
> process for hot data, possibly off heap.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)