Skip to content

Commit

Permalink
test page lock after everything
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Jan 28, 2025
1 parent 2090c2f commit 78e8598
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/stage/common-values-iris-mpc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ghcr.io/worldcoin/iris-mpc:3802806ffc7180d878a33dda356806dd0d55619b"
image: "ghcr.io/worldcoin/iris-mpc:0f4860304fe871668b9d2f3f8cdb2c98852d372f"

environment: stage
replicaCount: 1
Expand Down
3 changes: 3 additions & 0 deletions deploy/stage/smpcv2-0-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ env:
- name: SMPC__LOAD_CHUNKS_BUFFER_SIZE
value: "1024"

- name: SMPC__PAGE_LOCK_AFTER
value: "false"

- name: SMPC__CLEAR_DB_BEFORE_INIT
value: "true"

Expand Down
3 changes: 3 additions & 0 deletions deploy/stage/smpcv2-1-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ env:
- name: SMPC__LOAD_CHUNKS_BUFFER_SIZE
value: "1024"

- name: SMPC__PAGE_LOCK_AFTER
value: "false"

- name: SMPC__CLEAR_DB_BEFORE_INIT
value: "true"

Expand Down
3 changes: 3 additions & 0 deletions deploy/stage/smpcv2-2-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ env:
- name: SMPC__LOAD_CHUNKS_BUFFER_SIZE
value: "1024"

- name: SMPC__PAGE_LOCK_AFTER
value: "false"

- name: SMPC__CLEAR_DB_BEFORE_INIT
value: "true"

Expand Down
3 changes: 3 additions & 0 deletions iris-mpc-common/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ pub struct Config {

#[serde(default)]
pub load_chunks_buffer_size: usize,

#[serde(default)]
pub page_lock_after: bool,
}

fn default_load_chunks_parallelism() -> usize {
Expand Down
6 changes: 6 additions & 0 deletions iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ use std::{
atomic::{AtomicBool, Ordering},
Arc, LazyLock, Mutex,
},
thread::sleep,
time::{Duration, Instant},
};
use telemetry_batteries::tracing::{datadog::DatadogBattery, TracingShutdownHandle};
Expand Down Expand Up @@ -1093,8 +1094,13 @@ async fn server_main(config: Config) -> eyre::Result<()> {

let device_manager_clone = actor.device_manager.clone();

let page_lock_after = config.page_lock_after;
// prepare the handle for the rest of the page locks
let page_lock_handle = spawn_blocking(move || {
if page_lock_after {
tracing::info!("Sleeping before page lock");
sleep(Duration::from_secs(120));
}
tracing::info!("Page locking host memory for code slices");
let now = Instant::now();
for db in [&left_codes, &right_codes] {
Expand Down

0 comments on commit 78e8598

Please sign in to comment.