proxying GET now working
Memory use is small and constant; receiveBytes returns a lazy bytestring and it does stream. Comparing speed of a get of a 500 mb file over proxy from origin-origin, vs from the same remote over a direct ssh: joey@darkstar:~/tmp/bench/client>/usr/bin/time git-annex get bigfile --from origin-origin get bigfile (from origin-origin...) ok (recording state in git...) 1.89user 0.67system 0:10.79elapsed 23%CPU (0avgtext+0avgdata 68716maxresident)k 0inputs+984320outputs (0major+10779minor)pagefaults 0swaps joey@darkstar:~/tmp/bench/client>/usr/bin/time git-annex get bigfile --from direct-ssh get bigfile (from direct-ssh...) ok 1.79user 0.63system 0:10.49elapsed 23%CPU (0avgtext+0avgdata 65776maxresident)k 0inputs+1024312outputs (0major+9773minor)pagefaults 0swaps So the proxy doesn't add much overhead even when run on the same machine as the client and remote. Still, piping receiveBytes into sendBytes like this does suggest that the proxy could be made to use less CPU resouces by using `sendfile()`.
This commit is contained in:
parent
09b5e53f49
commit
a2f4a8eddf
3 changed files with 59 additions and 24 deletions
|
@ -79,7 +79,6 @@ getRepoUUID r = do
|
|||
|
||||
if c /= u && u /= NoUUID
|
||||
then do
|
||||
liftIO $ print (r, "setting cache", c, u)
|
||||
updatecache u
|
||||
return u
|
||||
else return c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue