Closed woodser closed 2 years ago
@haveno-dex/developers this is a good issue to start with.
tip: flamegraphs are tremendously useful - https://netflixtechblog.com/java-in-flames-e763b3d32166
There is a bounty on this issue, the amount is in the title. The bounty will be awarded to the first person(s) who resolves this issue. Read the full conditions in the 'bounties.md' file. If you are starting to work on this issue, please write a comment here, so that we can assign the issue to you and avoid duplicated work.
tip: flamegraphs are tremendously useful - https://netflixtechblog.com/java-in-flames-e763b3d32166
I ran the perf
command on "alice" in the guide at https://github.com/haveno-dex/haveno/blob/master/docs/installing.md
You can find the svg flamegraph at https://github.com/M0ner0Mum/haveno-performance
Hello @M0ner0Mum. Thanks for the chart. Note that to receive the bounty we need more details:
Specifically requested is a list breaking down top time consumers while running the application, including references to related code in order to inform where optimizations are needed and focus developer effort.
Also, a chart with that level of zoom and no comments is not really useful.
I'm bumping the bounty to 2 XMR (1.5 XMR from me).
The report should be run before and after removing the DAO with https://github.com/haveno-dex/haveno/pull/121.
I monitored cpu consumption for the app in idle state without DAO. By VisualVM and JMC, we can see the top consumer threads and methods. And I'll make up reports for app and seednode with and without DAO if this kind of report is ok.
Nice to see early results that JFX is a top consumer, since Haveno won't use JFX for frontend.
In case you haven't, please disable animations under settings to minimize JFX from the results as much as possible.
The DAO has been removed with this commit, but yes it would still be helpful to know if DAO removal makes any difference in the measurements.
It would be helpful to see more about what the "Peer..." operations are, which I assume more details will be shown in the forthcoming reports. Otherwise this kind of report looks good to me.
Can you please document the steps you took to generate the report? It would be great for developers to easily generate them.
Got it, and I'll feedback later.
@agg505 Could you update the results in a readable document in one of our repositories (probably haveno-meta would be best) with a pull request?
Please consider that we are paying >$500 for this task. Simply taking screenshots of an app is not enough, we would like to have a more detailed and easily readable overview.
@erciccione Please have a check https://github.com/agg505/haveno-meta/blob/master/haveno-performance-report.md , and I'll create pull request if it's ok.
The file looks good, the only thing missing is the flamegraphs. Could you add them in a resolution similar to the example here https://github.com/haveno-dex/haveno/issues/20#issuecomment-820511278 ?
I agree the flamegraphs would be helpful to visualize everything, but it's clear that JFX is the dominant consumer, especially considering that QuantumRenderer is also part of JFX.
I think with the flamegraphs and documentation to regenerate these reports in the future, these reports are sufficient. We'll need to re-profile the application running as a daemon when it's closer to production-ready (as a separate issue in the future).
@erciccione I made up some flame graphs in a new section "Flame Graphs for Some Thread Types", please check them here: https://github.com/agg505/haveno-meta/blob/master/haveno-performance-report.md
That looks very good, thanks. Please go ahead with the pull request :)
Thanks and the PR is here: https://github.com/haveno-dex/haveno-meta/pull/12
https://github.com/haveno-dex/haveno-meta/pull/12 is merged. @agg505 please provide us with an xmr address :)
@erciccione I confirm my wallet address starts with '4594' and ends with 'wLCd
2 XMR Sent. @agg505 please confirm you have received the coins.
@erciccione I have received the XMRs, thank you!
Thank you. Hopefully we will see you around again :)
Haveno's Java backend currently consumes significantly more computing resource than is necessary.
For example, performance analysis revealed the Bisq DAO to consume significant resources which will be resolved when the DAO is removed.
This issue requests detailed reports on Haveno's current resource usage in order to achieve significant performance improvements.
Specifically requested is a list breaking down top time consumers while running the application, including references to related code in order to inform where optimizations are needed and focus developer effort.
For example, this performance analysis on Monero's daemon breaks down time consumers and related code: https://github.com/monero-project/monero/issues/7913#issuecomment-909707754
There are many tools to analyze performance of a Java application like JVM Monitor built into Eclipse or VisualVM.