From 6a553754fbe55bd4d0691343c756631d5c2e68b1 Mon Sep 17 00:00:00 2001 From: Ertugrul Aypek Date: Fri, 24 Jan 2025 19:19:12 +0100 Subject: [PATCH] change chunk percentage --- deploy/stage/smpcv2-0-stage/values-iris-mpc.yaml | 2 +- deploy/stage/smpcv2-1-stage/values-iris-mpc.yaml | 2 +- deploy/stage/smpcv2-2-stage/values-iris-mpc.yaml | 2 +- iris-mpc/src/bin/server.rs | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/deploy/stage/smpcv2-0-stage/values-iris-mpc.yaml b/deploy/stage/smpcv2-0-stage/values-iris-mpc.yaml index fbe86d8a0..bdd56b915 100644 --- a/deploy/stage/smpcv2-0-stage/values-iris-mpc.yaml +++ b/deploy/stage/smpcv2-0-stage/values-iris-mpc.yaml @@ -96,7 +96,7 @@ env: value: "true" - name: SMPC__PAGE_LOCK_CHUNK_PERCENTAGE - value: "20" + value: "10" - name: SMPC__CLEAR_DB_BEFORE_INIT value: "true" diff --git a/deploy/stage/smpcv2-1-stage/values-iris-mpc.yaml b/deploy/stage/smpcv2-1-stage/values-iris-mpc.yaml index 5c3bc1b3f..3d98651fb 100644 --- a/deploy/stage/smpcv2-1-stage/values-iris-mpc.yaml +++ b/deploy/stage/smpcv2-1-stage/values-iris-mpc.yaml @@ -96,7 +96,7 @@ env: value: "true" - name: SMPC__PAGE_LOCK_CHUNK_PERCENTAGE - value: "20" + value: "10" - name: SMPC__CLEAR_DB_BEFORE_INIT value: "true" diff --git a/deploy/stage/smpcv2-2-stage/values-iris-mpc.yaml b/deploy/stage/smpcv2-2-stage/values-iris-mpc.yaml index 4912aa4a2..76fe01db0 100644 --- a/deploy/stage/smpcv2-2-stage/values-iris-mpc.yaml +++ b/deploy/stage/smpcv2-2-stage/values-iris-mpc.yaml @@ -96,7 +96,7 @@ env: value: "true" - name: SMPC__PAGE_LOCK_CHUNK_PERCENTAGE - value: "20" + value: "10" - name: SMPC__CLEAR_DB_BEFORE_INIT value: "true" diff --git a/iris-mpc/src/bin/server.rs b/iris-mpc/src/bin/server.rs index e3ce10220..ddcbec4f8 100644 --- a/iris-mpc/src/bin/server.rs +++ b/iris-mpc/src/bin/server.rs @@ -1192,6 +1192,7 @@ async fn server_main(config: Config) -> eyre::Result<()> { S3Store::new(db_chunks_s3_client.clone(), db_chunks_bucket_name.clone()); tokio::runtime::Handle::current().block_on(async { + let total_load_time = Instant::now(); tracing::info!("Page-lock host memory"); let dbs = [ (actor.left_code_db_slices.code_gr.clone(), IRIS_CODE_LENGTH), @@ -1202,7 +1203,7 @@ async fn server_main(config: Config) -> eyre::Result<()> { let n_page_lock_iters = 100 / config.page_lock_chunk_percentage; let page_lock_chunk_size = config.max_db_size / n_page_lock_iters; let dbs_clone = dbs.clone(); - let now = Instant::now(); + let mut now = Instant::now(); for (db, code_length) in dbs_clone { let device_manager_clone = actor.device_manager.clone(); register_host_memory( @@ -1235,6 +1236,7 @@ async fn server_main(config: Config) -> eyre::Result<()> { } }); + now = Instant::now(); let mut load_summary_ts = Instant::now(); let mut time_waiting_for_stream = Duration::from_secs(0); let mut time_loading_into_memory = Duration::from_secs(0); @@ -1404,7 +1406,7 @@ async fn server_main(config: Config) -> eyre::Result<()> { tracing::info!( "Loaded {} records from db into memory in {:?} [DB sizes: {:?}]", record_counter, - now.elapsed(), + total_load_time.elapsed(), actor.current_db_sizes() );