{"thread":{"id":"38585","subject":"Memeory retention problem","startedAt":"2015-02-18T09:30:38Z","lastAt":"2015-02-18T09:30:38Z","messageCount":1,"participants":["Guenther Demetz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"256261","messageId":"loom.20150218T102920-988@post.gmane.org","threadId":"38585","inReplyTo":null,"subject":"Memeory retention problem","fromName":"Guenther Demetz","fromEmail":"guenther.demetz@wuerth-phoenix.com","sentAt":"2015-02-18T09:30:38Z","receivedAt":"2015-02-18T09:30:38Z","isPatch":false,"sender":{"key":"guenther.demetz@wuerth-phoenix.com","avatar":null},"body":"Hi,\n\nwe own a git-repository which size is around 3.4 GiB.\n\nWindows:\ngit clone git://pbzcvs01/cis/dev\nCloning into 'dev'...\nremote: Counting objects: 373667, done.\nremote: Compressing objects: 100% (56072/56072), done.\nReceiving objects: 100% (373667/373667), 3.46 GiB | 63.15 MiB/s, done.\n\nNow while the client is receiving the objects from the remote,\nwe experience that on the remote (a linux system) the allocated memory is\nlinear increasing with the amount of transferred data.\nWhile the transfer is at 99% we see following on the remote:\n\nLinux:\n  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND\n10197 root      20   0 4318m 3.4g 3.3g R 40.2 91.6   0:26.97 git\n10196 root      20   0 1191m  51m  10m S 19.0  1.3   0:07.24 git-upload-pack\n\nAfter the transmission has completed, the memory get freed istantly.\nMy question is:\n\nIs it’s really necessary to allocate all compressed objects in memory and\nrelease them not before transmission has completed?\n\nI ask, because when there are more clients doing a clone contemporaneously\nwe face out of memory errors.\n\nWindows:\nWindows 7 Enterprise, SP1, 64 bit\ngit version 1.9.5.msysgit.0\n\nLinux:\nRed Hat Enterprise Linux Server release 6.3 (Santiago),\n2.6.32-279.5.1.el6.x86_64\ngit version 2.3.0 (compiled locally)\n\nP.S.: Please forgive me, if similar mail was already posted on the mailing-list.\n\nbest regards\nGünther Demetz\nWürth Phoenix S.r.l.\nProduct Development (CIS)\nVia Kravogl 4\nI-39100 Bolzano \nDirect:     +39 0471 564 061\nFax:        +39 0471 564 122\nE-Mail:     guenther.demetz@wuerth-phoenix.com\nWebsite:  www.wuerth-phoenix.com\n"}]}