[ https://issues.apache.org/jira/browse/CASSANDRA-4937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498067#comment-13498067 ]
Jonathan Ellis commented on CASSANDRA-4937: ------------------------------------------- bq. We can't [only drop the recently-read blocks during sequential i/o] because it would require (e.g. compaction) to know of how something is using files, it could remove cache from somebody's fit anyway and we would use too many system calls if we do that. You mean because RandomAccess reader doesn't know if we've been seeking back and forth? Technically that is true, but it looks like we only actually create RandomAccessReader with skipCache=True when we're doing sequential reads. So I'd be okay with just assuming it's sequential in reBuffer if skipCache=True. If you wanted to make it more robust you could subclass RAR to MostlySequentialRAR (still need seek for when compaction needs two passes on wide rows) and only do skipCache in that subclass. This feels like a good compromise to me: it's a lot better than what we have now for your use case: if an sstable *is* in the page cache we'd only dontneed it once gradually, instead of repeatedly with each trySkipCache. And it doesn't take us back to the Dark Ages of totally stomping the page cache with cold data during compaction. > CRAR improvements (object cache + CompressionMetadata chunk offset storage > moved off-heap). > ------------------------------------------------------------------------------------------- > > Key: CASSANDRA-4937 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4937 > Project: Cassandra > Issue Type: Improvement > Affects Versions: 1.1.6 > Reporter: Pavel Yaskevich > Assignee: Pavel Yaskevich > Priority: Minor > Fix For: 1.1.7 > > Attachments: CASSANDRA-4937.patch > > > After good amount of testing on one of the clusters it was found that in > order to improve read latency we need to minimize allocation rate that > compression involves, that minimizes GC (as well as heap usage) and > substantially decreases latency on read heavy workloads. > I have also discovered that RAR skip cache harms performance in situation > when reads are done in parallel with compaction working with relatively big > SSTable files (few GB and more). The attached patch removes possibility to > skip cache from compressed files (I can also add changes to RAR to remove > skip cache functionality as a separate patch). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira