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

Tom Petracca edited comment on CASSANDRA-11623 at 4/20/16 7:07 PM:
-------------------------------------------------------------------

A solution to this is to just estimate the size of the written file.
- 
[2.2|https://github.com/tpetracca/cassandra/commit/d9028ce6be8956279807b428ff55d38ae759b1de]
- 
[3.0|https://github.com/tpetracca/cassandra/commit/a1c8d32e9443536e58b1fac164981e8c01f30d9f]
- 
[3.5|https://github.com/tpetracca/cassandra/commit/08e1f26569339f74f146b073351e2ca7cf1ba5a7]
- 
[trunk|https://github.com/tpetracca/cassandra/commit/6abe3d9401b1fba00885389c7870884bda8b7d0f]
 - this was the only clean cherry-pick (from 3.5)


was (Author: tpetracca):
A solution to this is to just estimate the size of the written file.
https://github.com/tpetracca/cassandra/commit/d9028ce6be8956279807b428ff55d38ae759b1de

> Compactions w/ Short Rows Spending Time in getOnDiskFilePointer
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-11623
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11623
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Tom Petracca
>            Priority: Minor
>         Attachments: compactiontask_profile.png
>
>
> Been doing some performance tuning and profiling of my cassandra cluster and 
> noticed that compaction speeds for my tables that I know to have very short 
> rows were going particularly slowly.  Profiling shows a ton of time being 
> spent in BigTableWriter.getOnDiskFilePointer(), and attaching strace to a 
> CompactionTask shows that a majority of time is being spent lseek (called by 
> getOnDiskFilePointer), and not read or write.
> Going deeper it looks like we call getOnDiskFilePointer each row (sometimes 
> multiple times per row) in order to see if we've reached our expected sstable 
> size and should start a new writer.  This is pretty unnecessary.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to