Skip to content

Commit 1c20a45

Browse files
committed
feat: update
1 parent 7338abf commit 1c20a45

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

frameworks/Rust/hyperlane/src/db.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ pub async fn connection_db() -> DbPoolConnection {
100100
DATABASE_NAME
101101
),
102102
};
103-
let pool_size: u32 = num_cpus::get() as u32;
104103
let pool: DbPoolConnection = PgPoolOptions::new()
105-
.max_connections(100)
106-
.min_connections(pool_size)
104+
.max_connections(1000)
105+
.min_connections(512)
107106
.max_lifetime(None)
108107
.test_before_acquire(false)
109108
.idle_timeout(None)

frameworks/Rust/hyperlane/src/server.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ use tokio::runtime::{Builder, Runtime};
33

44
fn runtime() -> Runtime {
55
Builder::new_multi_thread()
6-
.worker_threads(num_cpus::get() << 1)
6+
.worker_threads(num_cpus::get() << 2)
77
.thread_stack_size(1_048_576)
8-
.max_blocking_threads(1024)
8+
.max_blocking_threads(5120)
99
.max_io_events_per_tick(65_536)
10-
.enable_io()
11-
.enable_time()
10+
.enable_all()
1211
.global_queue_interval(61)
1312
.event_interval(1)
1413
.build()

0 commit comments

Comments
 (0)