[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-23 Thread Jacek Lewandowski (Jira)


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

Jacek Lewandowski commented on CASSANDRA-18871:
---

So the build failed, probably it was running for too long. I looked into the 
logs to figure out why it takes so long and learned that there are benchmarks 
which takes extremely long to run. 

{{btree.BTreeTransformBench}}, params = 7x9x2=63, x4 forks = 252, x3 methods = 
756 tests x 11s each ~= 2h 20m
{{btree.BTreeUpdateBench}}, params = 7x7x3x2x2x3=1764, x4 forks = 7056, x1 
method = 7056 tests x 30s each ~= 59h

To me, the other one is unacceptable for CI. We need to reduce the number of 
parameters, and also, set the number of forks to 1 (probably for each test). 

I'm going to exclude the benchmark for now and create a ticket to fix it later 
(I'm going to do that for each benchmark which causes CI to fail). Those 
benchmarks are still ok to run locally with {{-Dbenchmark.name=...}}
 

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-22 Thread Jacek Lewandowski (Jira)


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

Jacek Lewandowski commented on CASSANDRA-18871:
---

 Run progress: 15.48% complete, ETA 2 days, 15:45:16 ...

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-21 Thread Jacek Lewandowski (Jira)


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

Jacek Lewandowski commented on CASSANDRA-18871:
---

I've created 5.0, 4.1 and 4.0 PRs

Currently JMH tests are running on Jenkins and it takes quite long time 
(https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch-microbench/11/)
 (currently 12h vs 6h previously). It is because previously the tests were 
failing silently due to OOM on one test which I excluded from the all-tests run.


> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-21 Thread Maxim Muzafarov (Jira)


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

Maxim Muzafarov commented on CASSANDRA-18871:
-

I have tested the latest changes on Mac M1, everything works fine on my local 
machine, so +1 from my side.
I have also left a minor comment, not a blocker.

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-21 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18871:
---

I took a look at the patch and looks fine. Nits were already addressed. 

When it comes to IDEA integration like running benchmarks from IDEA directly, 
that is just comfortable to have but I do not think that is a strict must. 
There is also JMH plugin worth to explore. We explored running of benchmarks 
directly from IDEA and it seems to be technically possible but I am questioning 
its actual usefulness. If we have a command-line way to run them, is it really 
necessary to run them in IDEA too? It is not like we are going to debug them by 
putting breakpoints into the benchmark methods. A benchmark is just testing the 
performance of the underlying components. If we want to debug that we have a 
proper JUnit tests for it. So, for now, this is not a strict requirement for me 
to merge this.

When it comes to naming of these tests, why do they have to end on "Bench"? 
There is additional logic involved in checking that. What if all benchmarks 
were ending on "Test" as all other tests are? It seems to me that the naming 
convention for benchmarks was just made up like that but we do not need to 
follow it. It would simplify the ant code and stuff around that too. This is 
again not a strict requirement for me to merge this.

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-21 Thread Branimir Lambov (Jira)


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

Branimir Lambov commented on CASSANDRA-18871:
-

Async profiler also tested under WSL2/Ubuntu 20.04 -- works fine.

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-21 Thread Jacek Lewandowski (Jira)


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

Jacek Lewandowski commented on CASSANDRA-18871:
---

btw. regarding testing - async profiler has been tested on Mac M1 by [~mmuzaf] 
and [~marianne-manaog]

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-21 Thread Jacek Lewandowski (Jira)


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

Jacek Lewandowski commented on CASSANDRA-18871:
---

yes, I've just also added a property to add extra jmh args, for example:

{noformat}
ant microbench -Dbenchmark.name=SampleBench -Djmh.args='-gc true'
{noformat}

Is that what you meant [~blambov]?

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-20 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-18871:
-

Nice

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever 
> {{-Dtest.profiler=...}} is specified. If that property is fed with the empty 
> value, some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{test.profiler}} property 
> will be added as profiler options.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-20 Thread Maxim Muzafarov (Jira)


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

Maxim Muzafarov commented on CASSANDRA-18871:
-

> Can one specify a specific benchmark to run? Would it be too hard to also add 
> other parameters?

we already can use -Dbenchmark.name=ChecksumBenchmark to run a specific class, 
or did you mean something else?

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-20 Thread Branimir Lambov (Jira)


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

Branimir Lambov commented on CASSANDRA-18871:
-

Can one specify a specific benchmark to run? Would it be too hard to also add 
other parameters?

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-20 Thread Maxim Muzafarov (Jira)


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

Maxim Muzafarov commented on CASSANDRA-18871:
-

+1 for point 1.

In addition, I would like to say:
- we must be able to run each benchmark from your IDE using the main method 
and/or JUnit runner, there is no way to do that now. In order to do this all 
the benchmarks must have an abstract ancestor that encapsulates all this 
machinery. For example, Netty has one:
https://github.com/netty/netty/blob/4.1/microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmarkBase.java#L44

- we should enforce the names of benchmarks to be able to run them using with 
our in-tree scripts, there are a lot of variation names e.g. *Bench, 
*Benchmarks, *BenchTest etc. For me, this is a problem because it is difficult 
to filter all these names with scripts. For example, we are enforcing "Test" 
postfix for other tests, but not for benchmarks. As the result, all similar 
filter patterns look like this:
https://github.com/apache/cassandra/blob/trunk/build.xml#L1782C134-L1782C152
For me, we should align all benchmarks with "*BenchmarkTest" pattern.

> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever 
> {{-Dtest.profiler=...}} is specified. If that property is fed with the empty 
> value, some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{test.profiler}} property 
> will be added as profiler options.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18871) JMH benchmark improvements

2023-09-20 Thread Jacek Lewandowski (Jira)


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

Jacek Lewandowski commented on CASSANDRA-18871:
---

[~mmuzaf] fair points; `Bench` suffix seems ok to me.

I was thinking about adding the main methods; there is also a JMH plugin for 
IntelliJ - don't know how it works. I don't think a super class would be 
acceptable solution because I think I saw some benchmarks which descent from 
{{CQLTester}}. I don't think it perfectly correct - I think we should rather 
use `EmbeddedCassandra` instead but I understand that {{CQLTester}} provides 
many useful methods.


> JMH benchmark improvements
> --
>
> Key: CASSANDRA-18871
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18871
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Build, Legacy/Tools
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.1
>
>
> 1. CASSANDRA-12586  introduced {{build-jmh}} task which builds uber jar for 
> JMH benchmarks which is then not used with {{ant microbench}} task. It is 
> used though by the {{test/bin/jmh}} script. 
> In fact, I have no idea why we should use uber jar if JMH can perfectly run 
> with a regular classpath. Maybe that had something to do with older JMH 
> version which was used that time. Building uber jars takes time and is 
> annoying. Since it seems to be redundant anyway, I'm going to remove it and 
> fix {{test/bin/jmh}} to use a regular classpath. 
> 2. I'll add support for async profiler in benchmarks. That is, the 
> {{microbench}} target automatically fetches the async profiler binaries and 
> adds the necessary args for JMH ({{-prof asyc...}} in particular) whenever we 
> run {{microbench-with-profiler}} task. If no additional properties are 
> provided some default options will be applied (defined in the script, can be 
> negotiated). Otherwise, whatever is passed to the {{profiler.opts}} property 
> will be added as profiler options after library path and target directory 
> definition.
> 3. If someone wants to see any additional improvements, please comment on the 
> ticket.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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