{"thread":{"id":"21526","subject":"performance issue: git clone compression","startedAt":"2009-11-08T01:09:59Z","lastAt":"2009-11-08T03:04:50Z","messageCount":4,"participants":["Tim Webster","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"127060","messageId":"72877ab10911071709s200696d4mf12dc797da20be18@mail.gmail.com","threadId":"21526","inReplyTo":"72877ab10911071657p568b3b98v6fd90e84e098c107@mail.gmail.com","subject":"performance issue: git clone compression","fromName":"Tim Webster","fromEmail":"tdwebste@gmail.com","sentAt":"2009-11-08T01:09:59Z","receivedAt":"2009-11-08T01:09:59Z","isPatch":false,"sender":{"key":"tdwebste@gmail.com","avatar":null},"body":"git clone gitosis@gitserver:code.git\n\nAfter remote counting objects, remote compressing objects\ntransfer begins...\nThis compression operation results in excess of swapage on the remote server.\n\n--------------------\n\nI need to avoiding the clone compression step for servers with limited memory.\nI am doing the following to avoid this object compression. Is there a\nbetter way?\n-------------------\n\nscp -r gitserver:/srv/gitosis/repositories/code.git  .\ngit clone /tmp/junk/code.git --no-hardlinks code\n# IS there a better way of converting the bare git repository to\nworking git repository?\n\nedit .git/config\nurl = gitosis@gitserver:code.git\n"},{"id":"127061","messageId":"alpine.LFD.2.00.0911072115270.16711@xanadu.home","threadId":"21526","inReplyTo":"72877ab10911071709s200696d4mf12dc797da20be18@mail.gmail.com","subject":"Re: performance issue: git clone compression","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2009-11-08T02:17:32Z","receivedAt":"2009-11-08T02:17:32Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 7 Nov 2009, Tim Webster wrote:\n\n> git clone gitosis@gitserver:code.git\n> \n> After remote counting objects, remote compressing objects\n> transfer begins...\n> This compression operation results in excess of swapage on the remote server.\n> \n> --------------------\n> \n> I need to avoiding the clone compression step for servers with limited memory.\n\nMake sure the remote repository is fully packed.  To do so, just go into\nthe remote repository and run 'git gc'.\n\n\nNicolas\n"},{"id":"127062","messageId":"72877ab10911071845q1c60e2b0kfe6f0509b5728912@mail.gmail.com","threadId":"21526","inReplyTo":"alpine.LFD.2.00.0911072115270.16711@xanadu.home","subject":"Re: performance issue: git clone compression","fromName":"Tim Webster","fromEmail":"tdwebste@gmail.com","sentAt":"2009-11-08T02:45:29Z","receivedAt":"2009-11-08T02:45:29Z","isPatch":false,"sender":{"key":"tdwebste@gmail.com","avatar":null},"body":"On servers with limit memory it is not piratical to run git gc.\nI can run git gc on a bare mirror and rsync back to the server.\n\nI would prefer to for go compress packing entirely for the large git\nrepositories containing media files.\n\nCan I disable compression by file attribute via .gitattributes?\n\nI am trying to use git for all repositories to avoid a mix of version\ncontrol methods.\nFor media repositories I am using\n\n[core]\n    repositoryformatversion = 0\n    filemode = false\n    bare = false\n    logallrefupdates = true\n    compression = 0\n    loosecompression = 0\n\n[pack]\n    # disable delta-based packing\n    depth = 1\n    # disable compression\n    compression = 0\n\nThere is no problem with git pull and push\nJust git clone swaps the server to death\n\n\n\n> Make sure the remote repository is fully packed.  To do so, just go into\n> the remote repository and run 'git gc'.\n>\n>\n> Nicolas\n>\n"},{"id":"127063","messageId":"alpine.LFD.2.00.0911072155180.16711@xanadu.home","threadId":"21526","inReplyTo":"72877ab10911071845q1c60e2b0kfe6f0509b5728912@mail.gmail.com","subject":"Re: performance issue: git clone compression","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2009-11-08T03:04:50Z","receivedAt":"2009-11-08T03:04:50Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 7 Nov 2009, Tim Webster wrote:\n\n> On servers with limit memory it is not piratical to run git gc.\n> I can run git gc on a bare mirror and rsync back to the server.\n\nThat is fine.  As long as you end up with a single pack, then a clone \nwould basically be a sinple file transfer.\n\nAlso you might want to investigate the following config variable for a \nlow-memory server:\n\n\tcore.packedGitWindowSize\n\tcore.packedGitLimit\n\tpack.windowMemory\n\tpack.deltaCacheSize\n\tpack.deltaCacheLimit\n\n\nNicolas\n"}]}