Skip to content

Commit 06435fc

Browse files
committed
fix: use disk-backed tempdir for tool configs to avoid filling tmpfs
1 parent ed4af2e commit 06435fc

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ docs/superpowers/
2323
bench/results/*/
2424
bench/.bench-run.pid
2525
bench/.bench-run.log
26+
bench/.tmp/
2627
.superpowers/
2728
.playwright-mcp/
2829

bench/terraform/aws/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ provider "aws" {
2727

2828
locals {
2929
instance_type = "c6in.4xlarge"
30-
ebs_volume_size = 100
30+
ebs_volume_size = 256
3131
ebs_iops = 6000
3232
ebs_throughput = 400 # MB/s
3333
my_ip = "${trimspace(data.http.my_ip.response_body)}/32"

xtask/src/bench/remote.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ cp target/release/ocync ~/.cargo/bin/ocync
180180
cp target/release/bench-proxy ~/.cargo/bin/bench-proxy
181181
182182
echo '[3/4] Starting benchmarks...'
183+
# Use real disk for temp files, not tmpfs (/tmp is RAM-backed on AL2023
184+
# and fills up with multi-GB blob staging data).
185+
export TMPDIR=$HOME/ocync/bench/.tmp
186+
rm -rf "$TMPDIR"
187+
mkdir -p "$TMPDIR"
183188
{registry_env}
184189
185190
# Launch detached with output to log file.

xtask/src/bench/runner.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,19 @@ pub(crate) async fn run_tool(
181181
let stderr_pipe = child.stderr.take().expect("stderr piped");
182182

183183
let tool_name = tool.to_string();
184+
let tool_name_err = tool_name.clone();
185+
// ocync --json writes structured JSON to stdout for the reporting
186+
// pipeline; don't echo it to the operator. Other tools write
187+
// human-readable progress to stdout, so stream those.
188+
let echo_stdout = tool != Tool::Ocync;
184189
let stdout_handle = tokio::spawn(async move {
185190
let mut buf = String::new();
186191
let mut reader = BufReader::new(stdout_pipe);
187192
let mut line = String::new();
188193
while reader.read_line(&mut line).await.unwrap_or(0) > 0 {
189-
eprint!(" [{tool_name}] {line}");
194+
if echo_stdout {
195+
eprint!(" [{tool_name}] {line}");
196+
}
190197
buf.push_str(&line);
191198
line.clear();
192199
}
@@ -199,7 +206,7 @@ pub(crate) async fn run_tool(
199206
let mut line = String::new();
200207
while reader.read_line(&mut line).await.unwrap_or(0) > 0 {
201208
if !is_gnu_time_line(&line) {
202-
eprint!(" {line}");
209+
eprint!(" [{tool_name_err}] {line}");
203210
}
204211
buf.push_str(&line);
205212
line.clear();

0 commit comments

Comments
 (0)