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

Sync perf -- Run nodes with network=perf to start performance test on multi machines. (draft) #21

Closed
wants to merge 11 commits into from

Conversation

ping-ke
Copy link
Collaborator

@ping-ke ping-ke commented Oct 9, 2023

Run nodes with network=perf to start performance test on multi machines:

How to test:

  1. create a storage file
    ./es-util create --filename storage.dat --chunk_size=131072 --kv_size=131072 --kv_len=4096 --miner=0x5C935469C5592Aeeac3372e922d9bCEabDF8830d

  2. fill in the storage file with random data, and create a related meta file for mock l1
    ./es-util fill_up_shard --filename storage.dat --shard_idx=0 --kv_entries=256 --kv_size 131072 --chunk_size 131072 --metafile storage.dat.meta

  3. start nodes with network=perf, and --l1.mock_metafile storage.dat.meta on the local machine as a sync server to provide blobs.
    --network perf --p2p.listen.ip 127.0.0.1 --p2p.listen.udp 30303 --p2p.listen.tcp 9222 --p2p.advertise.ip 127.0.0.1 --l1.rpc http://65.108.236.27:8545 --l1.beacon http://65.109.63.154:5052 --storage.files storage.dat --storage.l1contract 0x8FA01287747B8f876C8bA532D9Bd48b73329c431 --storage.miner 0x5C935469C5592Aeeac3372e922d9bCEabDF8830d --storage.kv-size 131072 --storage.chunk-size 131072 --storage.kv-entries 256 --datadir ./database --download.start -3 --log.level debug --l1.mock_metafile storage.dat.meta

  4. create an empty storage file, copy the local metafile to remote machines, and start the node with perf network and l1.mock_metafile as sync client to sync blobs.
    note: to test runtime metrics on sync clients or servers, sync client and server can be multiple.

how to verify:
after the test start, log for runtime metrics will print like the following
INFO [10-09|19:34:20.257] runtime metrics "cpu (%)"=55 "memory (MB)"=9198 "disk read (KB)"=69727 "disk write (KB)"=144,879

@ping-ke ping-ke requested a review from qzhodl October 9, 2023 17:10
@ping-ke ping-ke changed the title Sync perf -- Run nodes with network=perf to start performance test on multi machines. Sync perf -- Run nodes with network=perf to start performance test on multi machines. (draft) Oct 9, 2023
Copy link
Collaborator

@qzhodl qzhodl left a comment

Choose a reason for hiding this comment

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

There are runtime tools like htop, iotop to monitor the CPU/Mem/Disk usage, not quite sure what is the expected scenario to use the runtime metrics

@@ -0,0 +1,180 @@
package metrics
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please keep in mind that we need to add license statement for every new file

@@ -209,7 +208,14 @@ func (n *EsNode) initStorageManager(ctx context.Context, cfg *Config) error {
"chunkSize", shardManager.ChunkSize(),
"kvsPerShard", shardManager.KvEntries())

n.storageManager = ethstorage.NewStorageManager(shardManager, n.l1Source)
if cfg.Storage.UseMockL1 {
mockL1 := ethstorage.NewMockL1Source(shardManager, cfg.Storage.L1MockMetaFile)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems that there is a compiling error here

@qzhodl
Copy link
Collaborator

qzhodl commented Nov 16, 2023

Also please note that there is still a Draft flag in the PR title. You may want to remove this flag before requesting code review.

@ping-ke ping-ke closed this Feb 1, 2024
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.

2 participants