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
F14062091: D7776.diff
Mon, Nov 18, 10:29 AM
F14053144: D7776.id17592.diff
Fri, Nov 15, 12:54 PM
F14053143: D7776.id17583.diff
Fri, Nov 15, 12:54 PM
F14053141: D7776.id.diff
Fri, Nov 15, 12:54 PM
F14047956: D7776.id17583.diff
Thu, Nov 14, 5:58 AM
F14047053: D7776.diff
Thu, Nov 14, 1:40 AM
F14034045: D7776.diff
Sat, Nov 9, 9:53 PM
F14022040: D7776.diff
Wed, Nov 6, 3:01 PM
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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

src/infrastructure/ssh/PhabricatorSSHPassthruCommand.php
141

Adding this check might fix T4206.