Skip to content

Accelerate PD jobs with tmpfs + rsync (working scripts + demo) - #5

Draft
sethupathib wants to merge 13 commits into
mainfrom
cursor/pd-tmpfs-rsync-jobs-6d8b
Draft

Accelerate PD jobs with tmpfs + rsync (working scripts + demo)#5
sethupathib wants to merge 13 commits into
mainfrom
cursor/pd-tmpfs-rsync-jobs-6d8b

Conversation

@sethupathib

@sethupathib sethupathib commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

Practical tmpfs + rsync toolkit for accelerating Physical Design (PD) jobs, plus a white paper PDF, perf profiling, and durable sync after rsync.

White paper

  • Markdown: PD Job Acceleration/WHITEPAPER.md
  • PDF: PD Job Acceleration/docs/pd_tmpfs_rsync_whitepaper.pdf (14 pages)
  • Regenerator: PD Job Acceleration/docs/build_whitepaper_pdf.py

Modes

Mode Script When
B (default) scripts/ram_scratch.sh Limited RAM — only hot paths (default tmp) in /dev/shm
A scripts/run_pd_job.sh Workspace fits in RAM — stage → run → checkpoint → finalize

Fat logs stay on disk

PD logs are often 20GB+. Neither mode puts them in RAM by default.

New: perf + shell sync

  • scripts/pd_perf_profile.shperf stat + GNU time -v → I/O-vs-CPU classification and Mode A/B advice. Enable with PD_PERF=1 on Mode A/B.
  • pd_durable_sync — after finalize/flush (default PD_SYNC_MODE=fs), run shell sync so rsync success actually means durable writeback. Optional per-checkpoint via PD_SYNC_AFTER_CHECKPOINT=1.
  • Demo: examples/demo_perf_and_sync.sh

Important: sync(1) ≠ rsync. rsync copies; sync flushes page cache to media.

Workloads + compare harnesses

  • RC Extraction, GPU metal fill, local I/O job, farm I/O suite (NFS RTT model ~44–50×)

Test plan

  • bash -n on updated scripts
  • examples/demo_perf_and_sync.sh (perf SUMMARY + .pd_job_status/sync.log)
  • White paper PDF regenerated (14 pages)
  • Mode B/A still honor log-on-disk defaults
Open in Web Open in Cursor 

cursoragent and others added 13 commits August 7, 2026 02:19
Stage Physical Design workspaces into RAM-backed tmpfs, run tools
against the hot tree, and rsync checkpoints back to durable storage.
Includes a license-free demo, I/O microbench, and LinkedIn post draft.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
When design DBs exceed available RAM, redirect only chatty paths
(logs, tmp, TMPDIR) into a small /dev/shm scratch via symlinks,
then materialize them back to durable storage on teardown.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
PD tool logs are often 20GB+ and must not consume limited RAM.
Default PD_RAM_PATHS is now tmp; docs steer fat logs to local SSD.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Lead with limited-RAM hybrid (tmp/TMPDIR only). Explicitly reject putting
20GB+ logs in tmpfs. Fix diagram, benefits table, and LinkedIn draft.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Replace the outdated "logs in RAM" framing with Mode B hybrid as
the default and Mode A full-workspace only when the tree fits.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
- Root README no longer says "stage everything into RAM"
- Mode A: PD_KEEP_LOGS_ON_DISK=1 rewires logs/ to durable disk
- Fix rsync exclude (logs not logs/) so symlink cannot overwrite durable
- Align Mode A/B docs, LinkedIn draft, and script comments

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
No metal-fill project exists on main; use RC Extraction as a real PD
binary. Wrapper runs Mode B/A with logs on disk, tmp/TMPDIR in RAM
(or workspace in tmpfs), and durable SPEF outputs.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Benchmark baseline disk job against Mode B/A, reporting tool-only and
end-to-end wall time plus SPEF checksum equality.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Bring BEOL metal-fill engine from beol-metal-fill-partitioning branch and
benchmark baseline disk vs Mode B/A tmpfs acceleration on the GPU-block fill.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Liberty-vault random lookups + checkpoint/report I/O workload, benchmarked
baseline vs Mode B/A. Avoid flushing regenerable scratch so e2e reflects the win.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Multi-phase liberty/SPEF/ECO/report workload. Baseline emulates NFS
per-op RTT; Mode B/A run identical work on tmpfs for ~40-50x speedups.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Fourteen-section design/ops white paper covering Mode A/B architecture,
log policy, safety model, experiments, and interview defense, with a
generated PDF under PD Job Acceleration/docs/.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Wire shell sync after finalize/flush so rsync checkpoints are writeback-hardened,
and add pd_perf_profile.sh (perf + GNU time) to classify I/O vs CPU before placing
work on tmpfs. Document knobs in README/white paper and regenerate PDF.

Co-authored-by: Sethupathi Balakrishnan <b.sethupathi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants