You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SSHEnvironment uploads files one-by-one via scp during FileSyncManager.sync(). With ~581 files (skills, credentials, caches), this means 581 separate scp invocations — each spawning a subprocess and doing a round-trip, even over a ControlMaster socket.
On Daytona (similar sequential pattern), this took 803s for 581 files. SSH with ControlMaster is faster per-file but still O(n) round-trips.
Proposed Solution
Wire a bulk_upload_fn into the SSH backend's FileSyncManager (the callback was added in #7447). Use tar piped over SSH to transfer all files in a single stream:
def_ssh_bulk_upload(self, files: list[tuple[str, str]]) ->None:
# tar up local files, pipe through ssh, extract on remote# Single TCP stream, single subprocesstar_cmd= ['tar', 'czf', '-'] + [hostforhost, _infiles]
ssh_cmd=self._build_ssh_command() + ['tar', 'xzf', '-', '-C', '/']
# pipe tar | ssh
Alternatively, rsync with --files-from would handle both uploads and deletes in one call.
Problem
SSHEnvironmentuploads files one-by-one viascpduringFileSyncManager.sync(). With ~581 files (skills, credentials, caches), this means 581 separatescpinvocations — each spawning a subprocess and doing a round-trip, even over a ControlMaster socket.On Daytona (similar sequential pattern), this took 803s for 581 files. SSH with ControlMaster is faster per-file but still O(n) round-trips.
Proposed Solution
Wire a
bulk_upload_fninto the SSH backend'sFileSyncManager(the callback was added in #7447). Usetarpiped over SSH to transfer all files in a single stream:Alternatively,
rsyncwith--files-fromwould handle both uploads and deletes in one call.Context
FileSyncManagernow supports optionalbulk_upload_fn(added in fix(daytona): bulk upload, config bridge, silent disk cap (#7362) #7447)tools/environments/ssh.py, upload method:_scp_upload()Related
bulk_upload_fntoFileSyncManager