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

Pavel Yaskevich commented on CASSANDRA-6746:
--------------------------------------------

The idea is pretty simple - we know SSTables are generally random access to 
locate the data but once the data is located it's all sequential. So what the 
patch tries to do is to exploit both of the properties - set whole file as 
FADV_RANDOM (which doesn't disable read-ahead but limits it substantially) 
after that for every getSegment(position) which happens to be on the key or 
column index boundary, mark first 64KB as FADV_SEQUENTIAL to extend read-ahead 
for that portion of the file and FADV_WILLNEED first page because everything 
else is going to be prefetched by the extended read-ahead window for that 64KB 
block so we don't have to be very aggressive. Ideally we want to 
FADV_SEQUENTIAL the whole row but we can't really do that, even better would be 
to do it on mmap'ed files as it's only required once per row or column block.

> Reads have a slow ramp up in speed
> ----------------------------------
>
>                 Key: CASSANDRA-6746
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6746
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Ryan McGuire
>            Assignee: Benedict
>              Labels: performance
>             Fix For: 2.1 beta2
>
>         Attachments: 2.1_vs_2.0_read.png, 6746-buffered-io-tweaks.png, 
> 6746-patched.png, 6746.blockdev_setra.full.png, 
> 6746.blockdev_setra.zoomed.png, 6746.buffered_io_tweaks.logs.tar.gz, 
> 6746.buffered_io_tweaks.write-flush-compact-mixed.png, 
> 6746.buffered_io_tweaks.write-read-flush-compact.png, 6746.txt, 
> buffered-io-tweaks.patch, cassandra-2.0-bdplab-trial-fincore.tar.bz2, 
> cassandra-2.1-bdplab-trial-fincore.tar.bz2
>
>
> On a physical four node cluister I am doing a big write and then a big read. 
> The read takes a long time to ramp up to respectable speeds.
> !2.1_vs_2.0_read.png!
> [See data 
> here|http://ryanmcguire.info/ds/graph/graph.html?stats=stats.2.1_vs_2.0_vs_1.2.retry1.json&metric=interval_op_rate&operation=stress-read&smoothing=1]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to