Skip to content

Benchmark refresh + release cleanup - #20

Merged
hoshimura merged 11 commits into
mainfrom
pr3-benchmarks-and-cleanup
Oct 5, 2026
Merged

hoshimura merged 11 commits into
mainfrom
pr3-benchmarks-and-cleanup

Conversation

@hoshimura

Copy link
Copy Markdown
Collaborator

Summary

  • docs(bench): full rerun of all benchmark tables (median of 20, 10 objects) — asanypath fastest on all Azure ops, now wins FTP write/read/exists, and native SSH beats asyncssh on every op.
    chore: drop the now-empty ssh extra and sync uv.lock.
  • test(cli): remove stale asyncssh gating — SSH is native and always available, so the CLI tests pass on a clean (no-asyncssh) install.

Checklist

  • Tests cover the changed behavior.
  • Documentation reflects user-visible changes.
  • No credentials, private endpoints, or confidential data are included.

@hoshimura hoshimura self-assigned this Oct 2, 2026
@hoshimura
hoshimura force-pushed the pr3-benchmarks-and-cleanup branch from 089ffed to 9c98356 Compare October 2, 2026 08:01
hannabjorgvins
hannabjorgvins previously approved these changes Oct 2, 2026

@hannabjorgvins hannabjorgvins left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

- rust/src/ssh.rs: russh + russh-sftp + russh::keys SFTP, pooled sessions,
  host-key verification via check_known_hosts (strict by default)
- ops: read/read_range/write/exists/stat/list/mkdir/rmdir/unlink/rename
- flat connection kwargs spread via _native_kwargs (house **kwargs convention)
- opt-in ASANYPATH_SSH_NATIVE=1; asyncssh stays default (ssh_config, walk, lstat)
- stat/list return full attrs (size,mtime,atime,uid,gid,permissions)
asyncssh disables host-key checking for None; mirror it (and SSH_KNOWN_HOSTS=none
-> ()) so the native backend connects to the same hosts as the default transport.
Return reqwest Bytes straight into Python `bytes` via a PyBytesBuf bridge
instead of body.to_vec() + PyO3 Vec<u8>->bytes. Eliminates one full-payload
memcpy per read across S3/GCS/Azure/Artifactory (get + range_get) and HTTP.
Measured 64MiB read: 69.3 -> 57.0 ms (0.97 -> 1.18 GB/s).
Single fast path for every backend: _child(uri, **attrs) spawns from a
canonical URI (no per-child __init__: scheme re-parse, env read, ssh_config
resolution) and attaches listing-known attrs (SSH _cached_attrs, Artifactory
_is_folder, HTTP _trailing_slash). Replaces the parallel per-backend
`type(self)(...)` / `self / name` child builds in S3/GCS/Azure/Artifactory/
HTTP/SSH/FTP iterdir.

SSH child construction with ssh_config alias resolution: 52.3 -> 3.6 us (14.6x).
- native ssh_lstat + ssh_setstat (chmod/chown/utime)
- native ssh_config resolution via ssh2-config (drop asyncssh parser)
- native keyboard-interactive auth + ssh_disconnect_all
…able

The _HAS_ASYNCSSH conditionals made protocols/auth-show SSH assertions and
scp-style alias tests depend on asyncssh being installed, so they failed on a
clean (no-asyncssh) install. SSH is now native, so assert unconditionally.
…c=1)

Full rerun for the 2.1.0 release. S3 + Artifactory live; Azure/GCS/SSH/FTP
emulators. Notable shifts from the perf work this cycle:
- Azure iterdir 1.34 -> 0.88 ms and read 0.68 -> 0.51 ms (_child fast-path,
  single-copy reads); asanypath now fastest on every Azure op.
- FTP: asanypath now wins write/read/exists (was behind aioftp), ties iterdir.
- SSH native russh beats asyncssh on every op (write 0.16 vs 0.33, read 0.21 vs
  0.36, exists 0.07 vs 0.11, iterdir 0.23 vs 0.44).
- S3/GCS/Artifactory unchanged within noise (network/emulator bound).
@hoshimura
hoshimura force-pushed the pr3-benchmarks-and-cleanup branch from 9c98356 to fc4d8b3 Compare October 2, 2026 11:07
@hoshimura
hoshimura changed the base branch from main to pr2-native-ssh-and-perf October 2, 2026 11:08
Base automatically changed from pr2-native-ssh-and-perf to main October 5, 2026 09:28
@hoshimura
hoshimura merged commit a6a2812 into main Oct 5, 2026
8 checks passed
@hoshimura
hoshimura deleted the pr3-benchmarks-and-cleanup branch October 5, 2026 09:40
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