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

T Jake Luciani commented on CASSANDRA-1470:
-------------------------------------------

@peter

re (1) in the v12 patch we already split the buffer flush() from sync() so I 
would imagine it working like this but adding fadvise to the sync call.  That 
way a number writes would be cached then fsync'd and discarded.

re (2) from what I can find DONTNEED is global but it can be reset by another 
read (from another fh).  Also, DONTNEED doesn't discard the pages instantly but 
just tells the kernel to mark them as ready to be thrown if it wants. So if the 
data truly is "hot" then a subsequent read on this file will keep them in the 
cache.  I need to test and see if this is the case. If not then it would need 
to work like you describe.

Also posix_fadvise will accept a range so you can specify a contiguous chunk. 
if the cached pages truly are randomly scattered then you are right. It would 
maybe then be better to overcommit the cache in this case?

> use direct io for compaction
> ----------------------------
>
>                 Key: CASSANDRA-1470
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1470
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.1
>
>         Attachments: 1470-v2.txt, 1470.txt, CASSANDRA-1470-for-0.6.patch, 
> CASSANDRA-1470-v10-for-0.7.patch, CASSANDRA-1470-v11-for-0.7.patch, 
> CASSANDRA-1470-v12-0.7.patch, CASSANDRA-1470-v2.patch, 
> CASSANDRA-1470-v3-0.7-with-LastErrorException-support.patch, 
> CASSANDRA-1470-v4-for-0.7.patch, CASSANDRA-1470-v5-for-0.7.patch, 
> CASSANDRA-1470-v6-for-0.7.patch, CASSANDRA-1470-v7-for-0.7.patch, 
> CASSANDRA-1470-v8-for-0.7.patch, CASSANDRA-1470-v9-for-0.7.patch, 
> CASSANDRA-1470.patch, 
> use.DirectIORandomAccessFile.for.commitlog.against.1022235.patch
>
>
> When compaction scans through a group of sstables, it forces the data in the 
> os buffer cache being used for hot reads, which can have a dramatic negative 
> effect on performance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to