Skip to content

Commit a9fe901

Browse files
committed
chore(orion): tune buck2 and scorpio config
- Add BUCKD_STARTUP_TIMEOUT=30 and BUCKD_STARTUP_INIT_TIMEOUT to all buck2 command invocations (Buck2::command, get_repo_targets, build) to prevent daemon startup timeouts under slow I/O environments - Bump scorpiofs dependency from 0.1.1 to 0.2.0 - Increase scorpio load_dir_depth from 3 to 5 and fetch_file_thread from 10 to 20 for better prefetch coverage and concurrency
1 parent 337b024 commit a9fe901

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

orion/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ utoipa.workspace = true
3232
common = { path = "../common" }
3333
ring = "0.17.14"
3434
hex = { workspace = true }
35-
scorpiofs = "0.1.1"
35+
scorpiofs = "0.2.0"
3636
tokio-util = { workspace = true }

orion/buck/run.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ impl Buck2 {
5959

6060
pub fn command(&self) -> Command {
6161
let mut command = Command::new(&self.program);
62+
command
63+
.env("BUCKD_STARTUP_TIMEOUT", "30")
64+
.env("BUCKD_STARTUP_INIT_TIMEOUT", "1200");
6265
match &self.isolation_dir {
6366
None => {}
6467
Some(isolation_dir) => {

orion/runner-config/scorpio.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ git_email = "admin@mega.org"
2222

2323
# Dicfuse 读取配置
2424
dicfuse_readable = "true"
25-
load_dir_depth = "3"
26-
fetch_file_thread = "10"
25+
load_dir_depth = "5"
26+
fetch_file_thread = "20"
2727
dicfuse_import_concurrency = "4"
2828
dicfuse_dir_sync_ttl_secs = "5"
2929
dicfuse_reply_ttl_secs = "2"

orion/src/buck_controller.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ fn get_repo_targets(file_name: &str, repo_path: &Path) -> anyhow::Result<Targets
296296
tracing::debug!("Get targets for repo {repo_path:?} (attempt {attempt}/{MAX_ATTEMPTS})");
297297
let mut command = std::process::Command::new("buck2");
298298
command
299+
.env("BUCKD_STARTUP_TIMEOUT", "30")
300+
.env("BUCKD_STARTUP_INIT_TIMEOUT", "1200")
299301
.args(targets_arguments())
300302
.args(["--isolation-dir", &isolation_dir]);
301303
command.current_dir(repo_path);
@@ -748,7 +750,9 @@ pub async fn build(
748750
let mut cmd = Command::new("buck2");
749751
// --event-log and --build-report are used to collect build execution status
750752
// at target level (e.g. pending / running / succeeded / failed).
751-
cmd.args([
753+
cmd.env("BUCKD_STARTUP_TIMEOUT", "30")
754+
.env("BUCKD_STARTUP_INIT_TIMEOUT", "120")
755+
.args([
752756
"--isolation-dir", &isolation_dir,
753757
"--event-log", EVENT_LOG_FILE,
754758
]);

0 commit comments

Comments
 (0)