Skip to content

Commit

Permalink
Add high-perf quic defaults for sui/state sync anemo network. (#13301)
Browse files Browse the repository at this point in the history
## Description 

Settings only take effect if not explicitly set in startup configs. New
defaults match existing hard-coded narwhal settings.
  • Loading branch information
aschran authored Aug 7, 2023
1 parent ec5a10a commit a880e50
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions crates/sui-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,27 @@ impl SuiNode {
quic_config.socket_receive_buffer_size = Some(20 << 20);
}
quic_config.allow_failed_socket_buffer_size_setting = true;

// Set high-performance defaults for quinn transport.
// With 200MiB buffer size and ~500ms RTT, max throughput ~400MiB/s.
if quic_config.stream_receive_window.is_none() {
quic_config.stream_receive_window = Some(100 << 20);
}
if quic_config.receive_window.is_none() {
quic_config.receive_window = Some(200 << 20);
}
if quic_config.send_window.is_none() {
quic_config.send_window = Some(200 << 20);
}
if quic_config.crypto_buffer_size.is_none() {
quic_config.crypto_buffer_size = Some(1 << 20);
}
if quic_config.max_idle_timeout_ms.is_none() {
quic_config.max_idle_timeout_ms = Some(30_000);
}
if quic_config.keep_alive_interval_ms.is_none() {
quic_config.keep_alive_interval_ms = Some(5_000);
}
anemo_config.quic = Some(quic_config);

let server_name = format!("sui-{}", chain_identifier);
Expand Down

5 comments on commit a880e50

@vercel
Copy link

@vercel vercel bot commented on a880e50 Aug 7, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

sui-typescript-docs – ./sdk/docs

sui-typescript-docs-git-main-mysten-labs.vercel.app
sui-typescript-docs.vercel.app
sui-typescript-docs-mysten-labs.vercel.app

@vercel
Copy link

@vercel vercel bot commented on a880e50 Aug 7, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

sui-kiosk – ./dapps/kiosk

sui-kiosk-git-main-mysten-labs.vercel.app
sui-kiosk-mysten-labs.vercel.app
sui-kiosk.vercel.app

@vercel
Copy link

@vercel vercel bot commented on a880e50 Aug 7, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on a880e50 Aug 7, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

sui-wallet-kit – ./sdk/wallet-adapter/site

sui-wallet-kit.vercel.app
sui-wallet-kit-mysten-labs.vercel.app
sui-wallet-kit-git-main-mysten-labs.vercel.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

4 Validators 500/s Owned Transactions Benchmark Results

Benchmark Report:
+-------------+-----+-----+--------+---------------+---------------+---------------+-----------------------+----------------------------+
| duration(s) | tps | cps | error% | latency (min) | latency (p50) | latency (p99) | gas used (MIST total) | gas used/hr (MIST approx.) |
+=======================================================================================================================================+
| 60          | 596 | 596 | 0      | 19            | 8199          | 12575         | 452,738,880,000       | 27,164,332,800,000         |
Stress Performance Report:
+-----------+-----+-----+
| metric    | p50 | p99 |
+=======================+
| cpu usage | 13  | 100 |

4 Validators 500/s Shared Transactions Benchmark Results

Benchmark Report:
+-------------+-----+-----+--------+---------------+---------------+---------------+-----------------------+----------------------------+
| duration(s) | tps | cps | error% | latency (min) | latency (p50) | latency (p99) | gas used (MIST total) | gas used/hr (MIST approx.) |
+=======================================================================================================================================+
| 60          | 512 | 512 | 0      | 21            | 8959          | 13263         | 455,944,646,400       | 27,356,678,784,000         |
Stress Performance Report:
+-----------+-----+-----+
| metric    | p50 | p99 |
+=======================+
| cpu usage | 12  | 100 |

20 Validators 50/s Owned Transactions Benchmark Results

Benchmark Report:
+-------------+-----+-----+--------+---------------+---------------+---------------+-----------------------+----------------------------+
| duration(s) | tps | cps | error% | latency (min) | latency (p50) | latency (p99) | gas used (MIST total) | gas used/hr (MIST approx.) |
+=======================================================================================================================================+
| 60          | 200 | 200 | 0      | 22            | 64            | 89            | 149,454,720,000       | 8,967,283,200,000          |
Stress Performance Report:
+-----------+-----+-----+
| metric    | p50 | p99 |
+=======================+
| cpu usage | 26  | 50  |

20 Validators 50/s Shared Transactions Benchmark Results

Benchmark Report:
+-------------+-----+-----+--------+---------------+---------------+---------------+-----------------------+----------------------------+
| duration(s) | tps | cps | error% | latency (min) | latency (p50) | latency (p99) | gas used (MIST total) | gas used/hr (MIST approx.) |
+=======================================================================================================================================+
| 60          | 193 | 193 | 0      | 35            | 1344          | 2012          | 156,998,612,400       | 9,419,916,744,000          |
Stress Performance Report:
+-----------+-----+-----+
| metric    | p50 | p99 |
+=======================+
| cpu usage | 26  | 56  |

Narwhal Benchmark Results

 SUMMARY:
-----------------------------------------
 + CONFIG:
 Faults: 0 node(s)
 Committee size: 4 node(s)
 Worker(s) per node: 1 worker(s)
 Collocate primary and workers: True
 Input rate: 50,000 tx/s
 Transaction size: 512 B
 Execution time: 0 s

 Header number of batches threshold: 32 digests
 Header maximum number of batches: 1,000 digests
 Max header delay: 2,000 ms
 GC depth: 50 round(s)
 Sync retry delay: 10,000 ms
 Sync retry nodes: 3 node(s)
 batch size: 500,000 B
 Max batch delay: 200 ms
 Max concurrent requests: 500,000 

 + RESULTS:
 Batch creation avg latency: 202 ms
 Header creation avg latency: -1 ms
 	Batch to header avg latency: -1 ms
 Header to certificate avg latency: 1 ms
 	Request vote outbound avg latency: 0 ms
 Certificate commit avg latency: 703 ms

 Consensus TPS: 0 tx/s
 Consensus BPS: 0 B/s
 Consensus latency: 0 ms

 End-to-end TPS: 0 tx/s
 End-to-end BPS: 0 B/s
 End-to-end latency: 0 ms
-----------------------------------------

Please sign in to comment.