Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uninstalling an installed wheel walks its
RECORDand removes each path before cleaning up empty directories. Wheels with many small files can spend a substantial part ofuv sync,uv pip install --reinstall, oruv pip uninstallin this work. Add an opt-inwheel_record_unlinksbenchmark to compare ordinary removal, bounded worker pools, and Linuxio_uringUNLINKAT, alongside the complete productionuninstall_wheelcall. Production uninstall behavior is unchanged.Each operation receives a newly copied, independently owned installation tree. The fixtures retain the source wheel hash, installed
RECORDorder, file contents and modes, and a separate full-uninstall reference. The leaf backends attempt every independent path and return ordered outcomes; they deliberately do not claim production's partial-error precedence, recursive-directory fallback, or directory-cleanup semantics. The ordinary and worker controls are portable. Ring code is enabled for Linuxx86_64,aarch64,riscv64,loongarch64, andpowerpc64, with runtime opcode and disposable-file probes. An unavailable ring is omitted, not replaced by an ordinary-I/O timing.An initial ordinary-I/O census established the workload's scale:
RECORDleavesuv pip uninstallmedian, msmanyfilesThese are three-process warm-filesystem medians on x86-64 GNU/Linux 5.15 and ext4, using a locked
profilingbuild. The JupyterLab input is a byte-verified repack of cached wheel contents, not the original publisher ZIP. The census measures the whole command and is not anio_uringresult or a denominator for the benchmark's narrower leaf timer.The leaf comparisons reuse an initialized worker pool or ring. They include per-operation dispatch and completion, but exclude fixture reconstruction, warmup, backend/thread setup and teardown, and the final-tree oracle. The complete
uninstall_wheelrow includesRECORDparsing and directory cleanup, but not CLI startup or installed-package indexing. Backends receive identical installed templates within each process; the installed-manifest identity is recorded separately for every process.The following exploratory screen used the benchmark at
4a12fd86(the measured implementation is unchanged atf57a3ecf), a lockedprofilingbuild with Rust1.98.1, and an AMD EPYC 9V74 host with 16 available CPUs, Linux5.15.0-1110-azure, and ext4. These timings coverx86_64only; the other supported Linux architectures and macOS/Windows controls have not been performance-measured here. Theio-wqcolumn reports observed bounded/unbounded worker limits.Exploratory selection from two mirrored fresh processes per row, with ten Criterion sample groups each. The pooled median uses all 20 normalized group averages. Brackets are each process's conditional 95% Criterion interval, not a pooled process-level confidence interval. Filesystem state is warm.
Repacked cached JupyterLab 4.0.11 (794 leaves; 106 direct parents):
ordinaryworkers-1workers-4workers-16io-uring-1io-uring-16io-uring-64io-uring-256uninstall_wheelThe lowest pooled worker median is
workers-16; the lowest ring median isio-uring-256.Synthetic
manyfiles(10,007 leaves; 2 direct parents):ordinaryworkers-1workers-4workers-16io-uring-1io-uring-16io-uring-64io-uring-256uninstall_wheelThe lowest pooled worker median is
workers-4; the lowest ring median isio-uring-256.The complete-uninstall row includes RECORD parsing and directory cleanup; the leaf rows do not. Their difference is not an additive predicted CLI speedup. This screen does not change production dispatch.
On the real-wheel fixture, the best portable pool takes 7.182 ms versus 13.838 ms for the best ring. On the synthetic fixture, the best ring has no measured advantage over the four-worker control (199.623 ms versus 197.866 ms). Neither fixture supports a production
io_uringfollow-up on this host. The portable-worker result is a useful lead for users reinstalling or removing file-heavy packages, but it is not yet an end-to-end speedup.Merge the benchmark to retain this comparison and make future kernel, filesystem, and portable-concurrency changes measurable without changing uninstall behavior. Any production proposal still needs setup-inclusive measurements, a representative full-command improvement over the best portable control, and an explicit partial-failure policy.