Page MenuHomePhabricator

Limit memory usage of `ssh-exec` during large pull operations
ClosedPublic

Authored by epriestley on Dec 16 2013, 7:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 28, 3:00 PM
Unknown Object (File)
Sat, Jun 28, 10:07 AM
Unknown Object (File)
Fri, Jun 27, 1:50 PM
Unknown Object (File)
May 24 2025, 8:36 PM
Unknown Object (File)
May 11 2025, 1:43 AM
Unknown Object (File)
Apr 24 2025, 11:40 AM
Unknown Object (File)
Apr 24 2025, 11:40 AM
Unknown Object (File)
Apr 24 2025, 11:40 AM
Subscribers

Details

Summary

Fixes T4241. Ref T4206. See T4241 for a description here. Generally, when we connect a fat pipe (git-upload-pack) to a narrow one (git over SSH) we currently read limitless data into memory. Instead, throttle reads until writes catch up. This is now possible because of the previous changes in this sequence.

Test Plan
  • Ran git clone and git push on the entire Wine repository.
  • Observed CPU and memory usage.
  • Memory usage was constant and low, CPU usage was high only during I/O (which is expected, since we have to actually do work, although thre might be room to further reduce this).

Diff Detail

Branch
thrott
Lint
No Lint Coverage
Unit
Tests Passed

Event Timeline

src/infrastructure/ssh/PhabricatorSSHPassthruCommand.php
141

Adding this check might fix T4206.