Skip to content

Commit 6e0a6d4

Browse files
committed
release: v2.1.4
SFTP transfer performance release. Bumps Cargo workspace version to 2.1.4 and refreshes README.md, CHANGELOG.md, debian/changelog, and the three man pages (bssh.1, bssh-server.8, bssh-keygen.1) to match. Three perf changes ship since v2.1.3: - Stream SFTP uploads/downloads in 255 KiB chunks instead of buffering whole files (#195) — peak RSS drops ~160x and uploads run ~11x faster on 1 GiB transfers, multi-GB transfers no longer OOM the client. - Pipeline up to 64 concurrent SFTP requests for upload/download (#196), with server-advertised read/write lengths capped against local maxima and the download reorder queue bounded across both in-flight and pending out-of-order responses. - Raise bssh-server SFTP MAX_READ_SIZE from 64 KiB to the 255 KiB SFTP standard (#197), cutting per-MiB request count on downloads from 16 to 4 when combined with client pipelining.
1 parent 2d3d0b4 commit 6e0a6d4

8 files changed

Lines changed: 35 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.1.4] - 2026-05-10
11+
12+
### Performance
13+
- **Stream SFTP uploads/downloads instead of buffering whole files in memory** (#195). Previously `upload_file`/`upload_dir_recursive` loaded the entire local file into a `Vec<u8>` via `tokio::fs::read` before calling `write_all`, and `download_file`/`download_dir_recursive` called `read_to_end` into a pooled buffer plus a `clone()` to a separate `Vec` before writing locally. Multi-GB transfers therefore had peak RSS that scaled with file size and large files OOM'd the client. Each path now uses a small `stream_copy()` helper looping on 255 KiB reads/writes through the existing `AsyncRead`/`AsyncWrite` impls on `tokio::fs::File` and `russh_sftp::client::fs::File`. Buffer size matches the SFTP `MAX_WRITE_LENGTH` so each chunk maps to a single SFTP packet without further fragmentation. Verified locally on macOS arm64 against `bssh-server` v2.1.3 over loopback with a 1 GiB file: upload peak RSS drops from ~3.23 GB to ~20 MB and wall time from 38.6 s to 3.5 s; download peak RSS drops from ~2.17 GB to ~16 MB and wall time from 3.93 s to 3.41 s.
14+
- **Pipeline up to 64 concurrent SFTP requests for upload and download** (#196). Bounded pipelined SFTP upload/download helpers replace the previous strictly-sequential request/response loop. Review follow-ups also: cap server-advertised read/write lengths against local maxima to avoid oversized allocations from untrusted SFTP metadata, bound the download reorder queue across both in-flight and pending out-of-order responses, use `fstat` size information where available to avoid reads past EOF and validate unexpected short reads, and preserve remote download handle shutdown after syncing with main. Added SFTP crate tests for chunk-size capping and in-memory pipelined upload/download behavior.
15+
- **Raise bssh-server SFTP `MAX_READ_SIZE` to the 255 KiB SFTP standard** (#197). The server previously hard-capped every SFTP `READ` reply at 64 KiB regardless of what the client requested, while `bssh-russh-sftp` and OpenSSH's `sftp-server` both use the SFTP standard `MAX_READ_LENGTH = 261120` (255 KiB) for request sizing. A client asking for a 256 KiB chunk only ever got 64 KiB back, forcing four extra requests per byte stream. Bumped to 261120 so server replies match the chunk size used by the rest of the stack. Combined with client-side pipelining (#196), this directly cuts the per-MiB request count on downloads from 16 to 4. Memory exposure stays bounded: handles are still capped at `MAX_HANDLES = 1000` per session and each in-flight read still uses a single per-request buffer of this size.
16+
1017
## [2.1.3] - 2026-04-30
1118

1219
### Added
@@ -819,6 +826,7 @@ None
819826
- russh library for native SSH implementation
820827
- Cross-platform support (Linux and macOS)
821828

829+
[2.1.4]: https://github.com/lablup/bssh/compare/v2.1.3...v2.1.4
822830
[2.1.3]: https://github.com/lablup/bssh/compare/v2.1.2...v2.1.3
823831
[2.1.2]: https://github.com/lablup/bssh/compare/v2.1.1...v2.1.2
824832
[2.1.1]: https://github.com/lablup/bssh/compare/v2.1.0...v2.1.1

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ members = [
77

88
[package]
99
name = "bssh"
10-
version = "2.1.3"
10+
version = "2.1.4"
1111
authors = ["Jeongkyu Shin <inureyes@gmail.com>"]
1212
description = "Parallel SSH command execution tool for cluster management"
1313
license = "Apache-2.0"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ A high-performance SSH client with **SSH-compatible syntax** for both single-hos
1212

1313
## Recent Updates
1414

15+
- **v2.1.4 (2026/05/10):** SFTP transfer perf — stream uploads/downloads in 255 KiB chunks instead of buffering whole files (~160x lower RSS, ~11x faster 1 GiB upload), pipeline up to 64 concurrent SFTP requests, raise server `MAX_READ_SIZE` to the 255 KiB SFTP standard (#195, #196, #197)
1516
- **v2.1.3 (2026/04/30):** Fix SCP/SFTP path doubling on absolute paths and chroot dead config (#186); vendor `russh-sftp` with `serde_bytes` perf fix (+29% SFTP upload throughput); forward-port unreleased upstream russh fixes; standardize man page trailers
1617
- **v2.1.2 (2026/04/27):** Restore terminal mouse tracking state on PTY session disconnect (#190); release workflow fixes
1718
- **v2.1.1 (2026/04/17):** Fix server panic and auth rejection on every client connection

debian/changelog

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
bssh (2.1.4-1~jammy1) jammy; urgency=medium
2+
3+
* v2.1.4
4+
### Improvements
5+
- Stream SFTP uploads/downloads in 255 KiB chunks instead of buffering
6+
the whole file in memory (#195). On a 1 GiB transfer over loopback,
7+
upload peak RSS drops from ~3.23 GB to ~20 MB and wall time from
8+
38.6 s to 3.5 s; download peak RSS drops from ~2.17 GB to ~16 MB.
9+
Multi-GB transfers no longer OOM the client.
10+
- Pipeline up to 64 concurrent SFTP requests for upload and download
11+
(#196). The server-advertised read/write lengths are also capped
12+
against local maxima to avoid oversized allocations from untrusted
13+
SFTP metadata, the download reorder queue is bounded across both
14+
in-flight and pending out-of-order responses, and `fstat` size info
15+
is used where available to avoid reads past EOF.
16+
- Raise the bssh-server SFTP `MAX_READ_SIZE` from 64 KiB to the
17+
255 KiB SFTP standard (#197). Combined with client-side pipelining,
18+
this cuts the per-MiB request count on downloads from 16 to 4.
19+
20+
-- Jeongkyu Shin <inureyes@gmail.com> Sun, 10 May 2026 00:00:00 +0900
21+
122
bssh (2.1.3-1~jammy1) jammy; urgency=medium
223

324
* v2.1.3

docs/man/bssh-keygen.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Manpage for bssh-keygen
22
.\" Contact the maintainers to correct errors or typos.
3-
.TH BSSH-KEYGEN 1 "April 2026" "v2.1.3" "User Commands"
3+
.TH BSSH-KEYGEN 1 "May 2026" "v2.1.4" "User Commands"
44

55
.SH NAME
66
bssh-keygen \- SSH key pair generation tool

docs/man/bssh-server.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Manpage for bssh-server
22
.\" Contact the maintainers to correct errors or typos.
3-
.TH BSSH-SERVER 8 "April 2026" "v2.1.3" "System Administration Commands"
3+
.TH BSSH-SERVER 8 "May 2026" "v2.1.4" "System Administration Commands"
44

55
.SH NAME
66
bssh-server \- Backend.AI SSH Server for container environments

docs/man/bssh.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Manpage for bssh
22
.\" Contact the maintainers to correct errors or typos.
3-
.TH BSSH 1 "April 2026" "v2.1.3" "bssh Manual"
3+
.TH BSSH 1 "May 2026" "v2.1.4" "bssh Manual"
44

55
.SH NAME
66
bssh \- Broadcast SSH - SSH-compatible client with parallel execution capabilities

0 commit comments

Comments
 (0)