Performance test latest duke branch against dev #301

Closed
opened 11 months ago by duke · 6 comments
duke commented 11 months ago
Owner

I recently added a commit (18f0689695) that should speed up sync times by a large amount, but I am not sure exactly how much. It would be very good to do a performance test of the duke branch versus the dev branch, to see what kind of speedup we get.

The performance increase will be related to how many ztx's there are and how many blocks have happened since the last checkpoint was added. More ztx's per block means a larger sync speed increase and just after a release, when essentially all blocks are "protected" by a checkpoint, the increase will be even larger, and then degrade as more blocks are mined that are higher than a checkpoint height.

Please assign this issue to yourself if you want to run this test.

Additionally, this performance test will help 100% verify that the duke branch is consensus-compatible with the dev branch, so after this we can merge duke to dev and hopefully get a new release out soon after that.

Tips for running this test

  • Both nodes should have similar CPUs and the same RAM
  • Both nodes should either be a VPS or bare metal. Don't compare one against the other
  • Both nodes should have no other full nodes running or other resource heavy processes, like lightwalletd/etc. Ideally both nodes are not doing anything else but syncing hushd
  • A test on both nodes should be run at the same time, so the same number of blocks are being synced and they both have access to the same number of nodes on the network
  • Both nodes should have the same networks enabled, i.e. don't have Tor/i2p on one node but not the other. Best would be to only have the default of ipv4/ipv6 enabled, since that is what most users will have
  • Both nodes should have the same number of nodes on the same LAN
    • Nodes on the same LAN will help a node sync a lot faster, so both nodes should either have no nodes on the local LAN (that is going to be true for most end users) or the same number
  • To checkout the latest commit of duke branch right now:

git checkout 5f9bb80873

I recently added a commit (18f06896953d96390d925060d6756a50ab3cd94b) that should speed up sync times by a large amount, but I am not sure exactly how much. It would be very good to do a performance test of the duke branch versus the dev branch, to see what kind of speedup we get. The performance increase will be related to how many ztx's there are and how many blocks have happened since the last checkpoint was added. More ztx's per block means a larger sync speed increase and just after a release, when essentially all blocks are "protected" by a checkpoint, the increase will be even larger, and then degrade as more blocks are mined that are higher than a checkpoint height. Please assign this issue to yourself if you want to run this test. Additionally, this performance test will help 100% verify that the duke branch is consensus-compatible with the dev branch, so after this we can merge duke to dev and hopefully get a new release out soon after that. # Tips for running this test * [x] Both nodes should have similar CPUs and the same RAM * [x] Both nodes should either be a VPS or bare metal. Don't compare one against the other * [x] Both nodes should have no other full nodes running or other resource heavy processes, like lightwalletd/etc. Ideally both nodes are not doing anything else but syncing hushd * [x] A test on both nodes should be run at the same time, so the same number of blocks are being synced and they both have access to the same number of nodes on the network * [x] Both nodes should have the same networks enabled, i.e. don't have Tor/i2p on one node but not the other. Best would be to only have the default of ipv4/ipv6 enabled, since that is what most users will have * [x] Both nodes should have the same number of nodes on the same LAN * Nodes on the same LAN will help a node sync a lot faster, so both nodes should either have no nodes on the local LAN (that is going to be true for most end users) or the same number * [x] To checkout the latest commit of duke branch right now: git checkout 5f9bb80873
duke added the
testing
label 11 months ago
Poster
Owner

Since it might not be clear, the main question we are asking here is "How long does it take to do a full sync from genesis block to the latest chaintip of a Hush full node?" and compare the dev branch versus the duke branch. We should see a large speed difference.

Since it might not be clear, the main question we are asking here is "How long does it take to do a full sync from genesis block to the latest chaintip of a Hush full node?" and compare the dev branch versus the duke branch. We should see a large speed difference.
onryo self-assigned this 11 months ago
Poster
Owner

Another tip is that both nodes should either have a peers.dat or not. Starting with no peers and having to find them usually adds a few minutes to sync time. As a data point I just did a full sync from genesis block with an existing peers.dat on the duke branch, with no peers on the same LAN, with only ipv4/ipv6 and it took 2hrs and 32 minutes.

Another tip is that both nodes should either have a peers.dat or not. Starting with no peers and having to find them usually adds a few minutes to sync time. As a data point I just did a full sync from genesis block with an existing peers.dat on the duke branch, with no peers on the same LAN, with only ipv4/ipv6 and it took 2hrs and 32 minutes.
Collaborator
Test 1 Test 2
image image
Test Node 1 Node 2 Sync Time Sync Time Difference
Test 1 duke dev 2h 38m 8h 12m - 5h 34m
Test 2 dev duke 11h 50m 6h 45m - 5h 5m

In both tests duke branch was the fastest to fully sync, but I have doubts and I am running more attempts.

Test 1 | Test 2 :-------------------------:|:-------------------------------------------------: ![image](https://git.hush.is/attachments/c6670925-b5d3-4072-8971-8818e8d85f59) | ![image](https://git.hush.is/attachments/8a3d64a5-f819-4202-8024-7a63b1215276) Test | Node 1 | Node 2 | Sync Time | Sync Time | Difference ----------:|:--------:|:--------:|:-----------:|:-----------:|:------------: Test 1 | duke | dev | 2h 38m | 8h 12m | - 5h 34m Test 2 | dev | duke | 11h 50m | 6h 45m | - 5h 5m In both tests `duke` branch was the fastest to fully sync, but I have doubts and I am running more attempts.
Poster
Owner

@onryo thank you very much for doing these tests! We are seeing some nice speedups, even if the tests are noisy. I believe we are ready to sync the duke branch to dev

@onryo thank you very much for doing these tests! We are seeing some nice speedups, even if the tests are noisy. I believe we are ready to sync the duke branch to dev
Collaborator

Unfortunately, my hoster put speed limits on both servers but still the latest code is the fastest to sync all blocks. I think we can close and merge duke into dev.

Test 3 Test 4
image image
Unfortunately, my hoster put speed limits on both servers but still the latest code is the fastest to sync all blocks. I think we can close and merge `duke` into `dev`. Test 3 | Test 4 :-------------------------:|:-------------------------------------------------: ![image](https://git.hush.is/attachments/8a33c0e3-1272-4522-9282-df03f1f93e2e) | ![image](https://git.hush.is/attachments/ce1145cf-0af0-425d-89c6-d08fd1da74b0)
Poster
Owner

this is done, closing

this is done, closing
duke closed this issue 11 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.