Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ethdb/pebble: lower compaction concurrency #30858

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rjl493456442
Copy link
Member

Benchmark needed

@rjl493456442
Copy link
Member Author

image
截屏2024-12-23 10 30 28
截屏2024-12-23 10 30 45
截屏2024-12-23 10 31 03
截屏2024-12-23 10 31 16

After running the full sync for 24 hours (from block 10M), there is no big performance difference overall.

@rjl493456442
Copy link
Member Author

Master

(base) ➜  geth-pprof-less-compact go tool pprof standard-compact.cpu
File: geth
Type: cpu
Time: Dec 23, 2024 at 10:41am (CST)
Duration: 120.13s, Total samples = 598.56s (498.25%)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top20
Showing nodes accounting for 344.83s, 57.61% of 598.56s total
Dropped 2285 nodes (cum <= 2.99s)
Showing top 20 nodes out of 316
      flat  flat%   sum%        cum   cum%
    46.72s  7.81%  7.81%     54.62s  9.13%  runtime.findObject
    38.58s  6.45% 14.25%     39.21s  6.55%  runtime.cgocall
    31.86s  5.32% 19.57%     40.76s  6.81%  runtime.mapaccess2_faststr
    31.36s  5.24% 24.81%     31.36s  5.24%  golang.org/x/crypto/sha3.keccakF1600
    26.41s  4.41% 29.23%    145.32s 24.28%  runtime.scanobject
    19.96s  3.33% 32.56%     29.25s  4.89%  runtime.mapaccess2
       17s  2.84% 35.40%        17s  2.84%  sync/atomic.(*Int32).Add (inline)
    16.28s  2.72% 38.12%     16.28s  2.72%  internal/runtime/syscall.Syscall6
    14.70s  2.46% 40.58%     14.93s  2.49%  runtime.(*gcBits).bitp (inline)
    14.60s  2.44% 43.01%        51s  8.52%  runtime.mallocgc
    11.92s  1.99% 45.01%     12.21s  2.04%  runtime.(*mspan).heapBitsSmallForAddr
    11.67s  1.95% 46.96%     11.67s  1.95%  runtime.memmove
     9.96s  1.66% 48.62%      9.96s  1.66%  runtime.(*mspan).base (inline)
     9.56s  1.60% 50.22%     11.79s  1.97%  github.com/ethereum/go-ethereum/core/vm.codeBitmapInternal
     8.16s  1.36% 51.58%     62.48s 10.44%  github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run
     7.87s  1.31% 52.90%    128.23s 21.42%  github.com/ethereum/go-ethereum/triedb/pathdb.(*diffLayer).node
     7.81s  1.30% 54.20%      8.03s  1.34%  github.com/golang/snappy.encodeBlock
     6.93s  1.16% 55.36%      7.67s  1.28%  runtime.pageIndexOf (inline)
     6.82s  1.14% 56.50%      6.82s  1.14%  aeshashbody
     6.66s  1.11% 57.61%    153.51s 25.65%  runtime.gcDrain
(pprof)

PR

(base) ➜  geth-pprof-less-compact go tool pprof less-compact.cpu
File: geth
Type: cpu
Time: Dec 23, 2024 at 10:34am (CST)
Duration: 120.18s, Total samples = 553.65s (460.67%)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top20
Showing nodes accounting for 311.65s, 56.29% of 553.65s total
Dropped 2112 nodes (cum <= 2.77s)
Showing top 20 nodes out of 304
      flat  flat%   sum%        cum   cum%
    44.28s  8.00%  8.00%     52.87s  9.55%  runtime.findObject
    35.73s  6.45% 14.45%     43.98s  7.94%  runtime.mapaccess2_faststr
    28.99s  5.24% 19.69%     28.99s  5.24%  golang.org/x/crypto/sha3.keccakF1600
    26.13s  4.72% 24.41%    143.35s 25.89%  runtime.scanobject
    18.29s  3.30% 27.71%     27.22s  4.92%  runtime.mapaccess2
    16.37s  2.96% 30.67%     16.95s  3.06%  runtime.cgocall
    15.99s  2.89% 33.56%        16s  2.89%  sync/atomic.(*Int32).Add (inline)
    15.24s  2.75% 36.31%     15.24s  2.75%  internal/runtime/syscall.Syscall6
    13.55s  2.45% 38.76%     13.70s  2.47%  runtime.(*gcBits).bitp (inline)
    13.40s  2.42% 41.18%     46.98s  8.49%  runtime.mallocgc
    11.25s  2.03% 43.21%     11.64s  2.10%  runtime.(*mspan).heapBitsSmallForAddr
    10.38s  1.87% 45.08%     10.38s  1.87%  runtime.memmove
     9.62s  1.74% 46.82%      9.62s  1.74%  runtime.(*mspan).base (inline)
     8.40s  1.52% 48.34%    132.20s 23.88%  github.com/ethereum/go-ethereum/triedb/pathdb.(*diffLayer).node
     8.16s  1.47% 49.81%     10.32s  1.86%  github.com/ethereum/go-ethereum/core/vm.codeBitmapInternal
     7.83s  1.41% 51.23%    153.82s 27.78%  runtime.gcDrain
     7.28s  1.31% 52.54%      8.02s  1.45%  runtime.pageIndexOf (inline)
     7.09s  1.28% 53.82%      7.09s  1.28%  aeshashbody
     6.99s  1.26% 55.08%     41.64s  7.52%  runtime.greyobject
     6.68s  1.21% 56.29%     57.14s 10.32%  github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run
(pprof)

@rjl493456442
Copy link
Member Author

Close it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants