You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Blake Eggleston (Jira)" <ji...@apache.org> on 2020/03/04 17:35:00 UTC

[jira] [Commented] (CASSANDRA-15388) Add compaction allocation measurement test to support compaction gc optimization.

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

Blake Eggleston commented on CASSANDRA-15388:
---------------------------------------------

I've added a few comments addressing questions. However, regarding:
{quote}Personally would love if test-memory target could go away in favor of testclasslist so it matches the rest of CI.
{quote}
and
{quote}Make this overridable; a system properly would be fine
{quote}
and
{quote}Once you complete you can add to the logger for now (though more value if you generate a test report, but fine if this is a different JIRA)
{quote}
This is basically some ad-hoc code intended as a tool to identify optimization opportunities, and quantify changes. It's being contributed so the methodology can be reviewed, to quantify / justify the changes in the other tickets, and so that it can be re-used / built upon for later work. This is not meant to be in a state where it can be plugged into our ci process.

I think that we _should_ have allocation measurement as part of a performance test suite, but that's not the goal of this patch. I also don't think it's a good use of time to start making changes like these, because they'll make it more awkward to use this test as currently intended, and will probably just be re-written once we have a better idea of what we want a performance test suite to do.
{quote}Why all the sleeps?
{quote}
The ones when profiling is to give you time to start and stop recording. The one after compactions was to work around some issues with ending recording immediately after compactions. The one at the end is for logging. When running the test in IntelliJ, the report doesn't always make it to the output without them.

> Add compaction allocation measurement test to support compaction gc optimization. 
> ----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15388
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15388
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Local/Compaction
>            Reporter: Blake Eggleston
>            Assignee: Blake Eggleston
>            Priority: Normal
>             Fix For: 4.0
>
>
> This adds a test that is able to quickly and accurately measure the effect of potential gc optimizations against a wide range of (synthetic) compaction workloads. This test accurately measures allocation rates from 16 workloads in less that 2 minutes.
> This test uses google’s {{java-allocation-instrumenter}} agent to measure the workloads. Measurements using this agent are very accurate and pretty repeatable from run to run, with most variance being negligible (1-2 bytes per partition), although workloads with larger but fewer partitions vary a bit more (still less that 0.03%).
> The thinking behind this patch is that with compaction, we’re generally interested in the memory allocated per partition, since garbage scales more or less linearly with the number of partitions compacted. So measuring allocation from a small number of partitions that otherwise represent real world use cases is a good enough approximation.
> In addition to helping with compaction optimizations, this test could be used as a template for future optimization work. This pattern could also be used to set allocation limits on workloads/operations and fail CI if the allocation behavior changes past some threshold. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org