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

Peter Schuller commented on CASSANDRA-1902:
-------------------------------------------

Chris,

Looks like I missed at least two things when I looked at the patch last time. 
Firstly I thought it *was* checking mincore() prior to reading (this is why I 
said it was not an implementation detail of isRangeInCache() that it does not 
reflect current reality, since it is called after reading). Secondly, as per 
the discussion in CASSANDRA-1470 you have fsync/fdatasync prior to DONTNEED in 
order for the DONTNEED to have any effect. I had a quick look again at the 
patch and I don't see anything doing this.

Is it possible the effect you're seeing is entirely because of this? IIRC from 
last time I looked at the source it really looked like it would loop over all 
pages and invalidate them *AS LONG AS* they aren't dirty.

Note: To be clear, once again just like with direct I/O, there will be a 
performance penalty associated with the fsync() (approximately the same as the 
one you see on each write with direct I/O) so benchmarking has to take that 
into account. The fsync/DONTNEED frequency needs to be balanced with the 
latency potentially incurred by fsync.


> Migrate cached pages during compaction 
> ---------------------------------------
>
>                 Key: CASSANDRA-1902
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1902
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.1
>            Reporter: T Jake Luciani
>            Assignee: Pavel Yaskevich
>             Fix For: 1.0
>
>         Attachments: 
> 0001-CASSANDRA-1902-cache-migration-impl-with-config-option.txt, 
> 1902-BufferedSegmentedFile-logandsleep.txt, 1902-formatted.txt, 
> 1902-per-column-migration-rebase2.txt, 1902-per-column-migration.txt, 
> CASSANDRA-1902-v10-trunk-rebased.patch, CASSANDRA-1902-v3.patch, 
> CASSANDRA-1902-v4.patch, CASSANDRA-1902-v5.patch, CASSANDRA-1902-v6.patch, 
> CASSANDRA-1902-v7.patch, CASSANDRA-1902-v8.patch, 
> CASSANDRA-1902-v9-trunk-rebased.patch, 
> CASSANDRA-1902-v9-trunk-with-jmx.patch, CASSANDRA-1902-v9-trunk.patch, 
> CASSANDRA-1902-v9.patch
>
>   Original Estimate: 32h
>          Time Spent: 56h
>  Remaining Estimate: 0h
>
> Post CASSANDRA-1470 there is an opportunity to migrate cached pages from a 
> pre-compacted CF during the compaction process.  This is now important since 
> CASSANDRA-1470 caches effectively nothing.  
> For example an active CF being compacted hurts reads since nothing is cached 
> in the new SSTable. 
> The purpose of this ticket then is to make sure SOME data is cached from 
> active CFs. This can be done my monitoring which Old SSTables are in the page 
> cache and caching active rows in the New SStable.
> A simpler yet similar approach is described here: 
> http://insights.oetiker.ch/linux/fadvise/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to