Skip to content

Commit

Permalink
Reduce anemo message limit to 1G (#13231)
Browse files Browse the repository at this point in the history
  • Loading branch information
aschran committed Jul 31, 2023
1 parent 99c1599 commit 42d4ad1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/mysten-network/src/codec.rs
Expand Up @@ -166,7 +166,7 @@ pub mod anemo {

fn decode(&mut self, buf: bytes::Bytes) -> Result<Self::Item, Self::Error> {
let compressed_size = buf.len();
let mut snappy_decoder = snap::read::FrameDecoder::new(buf.reader());
let mut snappy_decoder = snap::read::FrameDecoder::new(buf.reader()).take(1 << 30);
let mut bytes = Vec::with_capacity(compressed_size);
snappy_decoder.read_to_end(&mut bytes)?;
bcs::from_bytes(bytes.as_slice())
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-node/src/lib.rs
Expand Up @@ -797,9 +797,9 @@ impl SuiNode {
.into_inner();

let mut anemo_config = config.p2p_config.anemo_config.clone().unwrap_or_default();
// Set the max_frame_size to be 2 GB to work around the issue of there being too many
// Set the max_frame_size to be 1 GB to work around the issue of there being too many
// staking events in the epoch change txn.
anemo_config.max_frame_size = Some(2 << 30);
anemo_config.max_frame_size = Some(1 << 30);

// Set a higher default value for socket send/receive buffers if not already
// configured.
Expand Down
4 changes: 2 additions & 2 deletions narwhal/primary/src/primary.rs
Expand Up @@ -318,9 +318,9 @@ impl Primary {
quic_config.keep_alive_interval_ms = Some(5_000);
let mut config = anemo::Config::default();
config.quic = Some(quic_config);
// Set the max_frame_size to be 2 GB to work around the issue of there being too many
// Set the max_frame_size to be 1 GB to work around the issue of there being too many
// delegation events in the epoch change txn.
config.max_frame_size = Some(2 << 30);
config.max_frame_size = Some(1 << 30);
// Set a default timeout of 300s for all RPC requests
config.inbound_request_timeout_ms = Some(300_000);
config.outbound_request_timeout_ms = Some(300_000);
Expand Down
4 changes: 2 additions & 2 deletions narwhal/worker/src/worker.rs
Expand Up @@ -242,9 +242,9 @@ impl Worker {
quic_config.keep_alive_interval_ms = Some(5_000);
let mut config = anemo::Config::default();
config.quic = Some(quic_config);
// Set the max_frame_size to be 2 GB to work around the issue of there being too many
// Set the max_frame_size to be 1 GB to work around the issue of there being too many
// delegation events in the epoch change txn.
config.max_frame_size = Some(2 << 30);
config.max_frame_size = Some(1 << 30);
// Set a default timeout of 300s for all RPC requests
config.inbound_request_timeout_ms = Some(300_000);
config.outbound_request_timeout_ms = Some(300_000);
Expand Down

2 comments on commit 42d4ad1

@vercel
Copy link

@vercel vercel bot commented on 42d4ad1 Jul 31, 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-mysten-labs.vercel.app
sui-typescript-docs.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          | 591 | 591 | 0      | 34            | 8351          | 8615          | 461,598,432,000       | 27,695,905,920,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          | 476 | 476 | 0      | 16            | 9471          | 13119         | 432,793,597,200       | 25,967,615,832,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      | 20            | 65            | 90            | 129,456,000,000       | 7,767,360,000,000          |
Stress Performance Report:
+-----------+-----+-----+
| metric    | p50 | p99 |
+=======================+
| cpu usage | 27  | 52  |

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          | 195 | 195 | 0      | 66            | 1445          | 2143          | 162,570,204,000       | 9,754,212,240,000          |
Stress Performance Report:
+-----------+-----+-----+
| metric    | p50 | p99 |
+=======================+
| cpu usage | 25  | 58  |

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: 736 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.