Skip to content

Conversation

chfast
Copy link
Member

@chfast chfast commented Sep 20, 2024

Upgrade evmone to version 0.13.0 by rebasing erigontech's fork of it: https://github.com/erigontech/evmone/tree/rebase_to_v0.13.
Upgrade intx to version 0.12.0.

The new version of evmone manages ExecutionState internally and
removes it from public API. This makes object pools for
ExecutionStates in Silkworm unnecessary.

}
if (!analysis) {
analysis = std::make_shared<evmone::baseline::CodeAnalysis>(evmone::baseline::analyze(rev, code));
const bool eof_enabled{rev >= EVMC_PRAGUE};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like EOF will be postponed until PectrB (=Osaka?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reflects the status of evmone, but actually we can put false here for now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set to false with a comment.

Copy link
Member Author

@chfast chfast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't merge yet. I want to make official evmone release first.

}
if (!analysis) {
analysis = std::make_shared<evmone::baseline::CodeAnalysis>(evmone::baseline::analyze(rev, code));
const bool eof_enabled{rev >= EVMC_PRAGUE};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reflects the status of evmone, but actually we can put false here for now.

@chfast chfast marked this pull request as ready for review September 23, 2024 09:00
@chfast
Copy link
Member Author

chfast commented Sep 30, 2024

Mainnet execution benchmarks

We run from scratch Mainnet blocks execution and check how quickly it reaches block 15M (no disk space for more).

  • base (1695 mins)
    INFO [09-27|17:41:08.674 UTC] Resource usage                           mem=55.43 GB chain=1.02 TB temp=0.00 B uptime=1d 4h 15m
    INFO [09-27|17:41:09.036 UTC] [5/12 Execution]                         block=14996203 blocks/s=49 txns/s=8763 Mgas/s=765
    INFO [09-27|17:41:39.036 UTC] [5/12 Execution]                         block=14997745 blocks/s=51 txns/s=9302 Mgas/s=791
    INFO [09-27|17:42:09.036 UTC] [5/12 Execution]                         block=14999449 blocks/s=56 txns/s=9912 Mgas/s=872
    INFO [09-27|17:42:39.037 UTC] [5/12 Execution]                         block=15001089 blocks/s=54 txns/s=10103 Mgas/s=844
    
  • this PR with execution states in thread_local (1750 mins, +3%)
    This run is slower by 3%. It also differences from the PR by hacking evmone to place the execution storage array in thread_local storage instead of having it attached to evmone::VM. The reason for the hack is Extend evmone::VM lifetime #2383. However, it looks like this change the performance (before the hack the performance was the same ~3% slower).
    INFO [09-29|20:52:19.536 UTC] Resource usage                           mem=55.41 GB chain=1.02 TB temp=0.00 B uptime=1d 5h 10m                                                                                                                                                 
    INFO [09-29|20:52:19.922 UTC] [5/12 Execution]                         block=15001155 blocks/s=53 txns/s=10078 Mgas/s=831                                                                                                                                                      
    
  • base 2nd run (1715 mins, +1%)
    INFO [10-01|13:40:26.474 UTC] Resource usage                           mem=55.49 GB chain=1.02 TB temp=0.00 B uptime=1d 4h 35m                                        
    INFO [10-01|13:40:26.791 UTC] [5/12 Execution]                         block=14992723 blocks/s=45 txns/s=8157 Mgas/s=704                                              
    INFO [10-01|13:40:56.791 UTC] [5/12 Execution]                         block=14994328 blocks/s=53 txns/s=9439 Mgas/s=822                                              
    INFO [10-01|13:41:26.791 UTC] [5/12 Execution]                         block=14995830 blocks/s=50 txns/s=8804 Mgas/s=773                                              
    INFO [10-01|13:41:56.791 UTC] [5/12 Execution]                         block=14997304 blocks/s=49 txns/s=8827 Mgas/s=757                                              
    INFO [10-01|13:42:26.792 UTC] [5/12 Execution]                         block=14998928 blocks/s=54 txns/s=9632 Mgas/s=833                                              
    INFO [10-01|13:42:56.792 UTC] [5/12 Execution]                         block=15000567 blocks/s=54 txns/s=10003 Mgas/s=840                                             
    
  • this PR with execution states in thread_local and intx perf regression fixed (1715 mins, +1%)
    INFO [10-03|17:24:27.348 UTC] Resource usage                           mem=55.47 GB chain=1.02 TB temp=0.00 B uptime=1d 4h 35m                                                                                                                                                 
    INFO [10-03|17:24:27.640 UTC] [5/12 Execution]                         block=15001546 blocks/s=55 txns/s=10585 Mgas/s=856                                                                                                                                                      
    

@canepat
Copy link
Member

canepat commented Sep 30, 2024

Please don't merge yet. I want to make official evmone release first.

I'm converting this PR to draft again just to avoid accidental merge.

@canepat canepat marked this pull request as draft September 30, 2024 09:16
@chfast chfast marked this pull request as ready for review October 1, 2024 16:40
@chfast
Copy link
Member Author

chfast commented Oct 2, 2024

I've discovered intx 0.12 performance regression at least with GCC 13. The fix is this: chfast/intx#325, but I need to investigate what exactly is going on. I'm running another Mainnet benchmark and will report back when finished, but the initial number are looking good.

Copy link
Contributor

@JacekGlen JacekGlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from intx performance, the rest looks good

Upgrade evmone to version 0.13.0 by rebasing erigontech's fork of it.
Upgrade intx to version 0.12.0.

The new version of evmone manages `ExecutionState` internally and
removes it from public API. This makes object pools for
`ExecutionState`s in Silkworm unnecessary.
@chfast
Copy link
Member Author

chfast commented Oct 8, 2024

I reported the issue related to GCC-13 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117000.
In GCC-14 the thing is gone, and intx 0.13 works faster than intx 0.12. But also slower than GCC 13 :) I will be tracking this but we can't fix everything at once.

@canepat canepat merged commit 4c9babf into master Oct 8, 2024
6 checks passed
@canepat canepat deleted the evmone/v0.13 branch October 8, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants