{"thread":{"id":"44484","subject":"Git status takes too long- How to improve the performance of git","startedAt":"2016-11-15T09:38:38Z","lastAt":"2016-11-24T08:43:51Z","messageCount":6,"participants":["ravalika","Fredrik Gustafsson","Christian Couder","Heiko Voigt","MaryTurner"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"305941","messageId":"1479202392275-7657456.post@n2.nabble.com","threadId":"44484","inReplyTo":null,"subject":"Git status takes too long- How to improve the performance of git","fromName":"ravalika","fromEmail":"prenuka@gmail.com","sentAt":"2016-11-15T09:33:12Z","receivedAt":"2016-11-15T09:38:38Z","isPatch":false,"sender":{"key":"prenuka@gmail.com","avatar":null},"body":"Hi All,\n\nWe are using git-1.8.2 version for version control.\nIt is an centralized server and git status takes too long\n\nHow to improve the performance of git status\n\nGit repo details:\n\nSize of the .git folder is 8.9MB\nNumber of commits approx 53838  (git rev-list HEAD --count)\nNumber of branches -  330  \nNumber of files - 63883\nWorking tree clone size is 4.3GB\n\ntime git status shows\nreal\t0m23.673s\nuser\t0m9.432s\nsys\t0m3.793s\n\nthen after 5 mins\nreal    0m4.864s\nuser    0m1.417s\nsys     0m4.710s\n\nAnd I have experimented the following ways \n-          -  Setting core.ignorestat to true\n-          -  Git gc &git clean\n-          -  Shallow clone – Reducing number of commits\n-          -  Clone only one branch \n      - Git repacking - git repack -ad && git prune\n-     - Cold/warm cache \n\nCould you please let me know, what are the ways to improve the git\nperformance ?\nI have gone through the mailing lists.\n\n\nThank you,\nRenuka\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Git-status-takes-too-long-How-to-improve-the-performance-of-git-tp7657456.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"305942","messageId":"20161115102400.GC28860@paksenarrion.iveqy.com","threadId":"44484","inReplyTo":"1479202392275-7657456.post@n2.nabble.com","subject":"Re: Git status takes too long- How to improve the performance of git","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2016-11-15T10:24:01Z","receivedAt":"2016-11-15T10:19:09Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"Hi,\n\nOn Tue, Nov 15, 2016 at 02:33:12AM -0700, ravalika wrote:\n> We are using git-1.8.2 version for version control.\n\nThat's a three (almost four) year old version of git. Your first test\nshould be to see if an upgrade to a recent version will improve things.\n\n> It is an centralized server and git status takes too long\n\nA centralized server? How? git is designed to be runned locally. If\nyou're running git on a network file system, the performance will\nsuffer. Could you elaborate on how your environment is setup?\n\n> \n> How to improve the performance of git status\n> \n> Git repo details:\n> \n> Size of the .git folder is 8.9MB\n> Number of commits approx 53838  (git rev-list HEAD --count)\n> Number of branches -  330  \n> Number of files - 63883\n> Working tree clone size is 4.3GB\n\n.git folder of 8.9 MEGABYTE and working tree of 4.3 GIGABYTE? Is this a\ntypo?\n\n> \n> time git status shows\n> real\t0m23.673s\n> user\t0m9.432s\n> sys\t0m3.793s\n> \n> then after 5 mins\n> real    0m4.864s\n> user    0m1.417s\n> sys     0m4.710s\n\nA slow disc and empty caches are slow. Two ways of improving this is to\nhave faster discs or make sure your cache is up to date. When I'd a\nreally slow disc, I'd my shell to run a git status in the background to\nload the cache everytime I started working on a project. This is however\nan ugly hack that wasn't approved to be a part of git.\n\n> \n> And I have experimented the following ways \n> -          -  Setting core.ignorestat to true\n> -          -  Git gc &git clean\n> -          -  Shallow clone – Reducing number of commits\n> -          -  Clone only one branch \n>       - Git repacking - git repack -ad && git prune\n> -     - Cold/warm cache \n> \n> Could you please let me know, what are the ways to improve the git\n> performance ?\n> I have gone through the mailing lists.\n\nYou could always check the --assume-unchanged bit, see the manual page\nfor git update-index. However this is quite extreme and demanding for\nthe user.\n\n-- \nFredrik Gustafsson\n\nphone: +46 733-608274\ne-mail: iveqy@iveqy.com\nwebsite: http://www.iveqy.com\n"},{"id":"305943","messageId":"CAP8UFD2tHW5_L4yPzVSxK2jpUKPKiq26sCnJ1Ts7R5TWiOpzEg@mail.gmail.com","threadId":"44484","inReplyTo":"20161115102400.GC28860@paksenarrion.iveqy.com","subject":"Re: Git status takes too long- How to improve the performance of git","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2016-11-15T11:44:42Z","receivedAt":"2016-11-15T11:44:51Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tue, Nov 15, 2016 at 11:24 AM, Fredrik Gustafsson <iveqy@iveqy.com> wrote:\n> On Tue, Nov 15, 2016 at 02:33:12AM -0700, ravalika wrote:\n\n[...]\n\n>> And I have experimented the following ways\n>> -          -  Setting core.ignorestat to true\n>> -          -  Git gc &git clean\n>> -          -  Shallow clone – Reducing number of commits\n>> -          -  Clone only one branch\n>>       - Git repacking - git repack -ad && git prune\n>> -     - Cold/warm cache\n>>\n>> Could you please let me know, what are the ways to improve the git\n>> performance ?\n>> I have gone through the mailing lists.\n>\n> You could always check the --assume-unchanged bit, see the manual page\n> for git update-index. However this is quite extreme and demanding for\n> the user.\n\nIf you install a recent version version, you may be able to use the\nuntracked cache feature.\n(See \"core.untrackedCache\" in the git config documentation and\n--untracked-cache in the git update-index documentation.)\n"},{"id":"305956","messageId":"20161115151009.GB7854@book.hvoigt.net","threadId":"44484","inReplyTo":"1479202392275-7657456.post@n2.nabble.com","subject":"Re: Git status takes too long- How to improve the performance of git","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2016-11-15T15:10:09Z","receivedAt":"2016-11-15T15:10:19Z","isPatch":false,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"On Tue, Nov 15, 2016 at 02:33:12AM -0700, ravalika wrote:\n> Number of files - 63883\n\nSince you also posted this to the \"Git for Windows\" mailinglist I assume\nthat you are using Windows. Reduce the number of files. For example\nsplit the repository into two one for documentation and one for source.\nThats what I did with a converted repository that had to many files.\n\nWindows is unfortunately very slow when it comes to handling many files\nand if I recall correctly ~30000 files was in a nicely handleable range\nfor a Git repository on Windows, but that might have changed...\n\nCheers Heiko\n"},{"id":"306043","messageId":"20161116132154.GA18362@paksenarrion.iveqy.com","threadId":"44484","inReplyTo":"CAEAva_1JAu+kWmk3MZDFK=4CgQB5M+JN8FwzMVr6zKgXTAhdXw@mail.gmail.com","subject":"Re: Git status takes too long- How to improve the performance of git","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2016-11-16T13:21:54Z","receivedAt":"2016-11-16T13:16:56Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Wed, Nov 16, 2016 at 05:13:57PM +0530, Renuka Pampana wrote:\n> > On Tue, Nov 15, 2016 at 02:33:12AM -0700, ravalika wrote:\n> > > It is an centralized server and git status takes too long\n> >\n> > A centralized server? How? git is designed to be runned locally. If\n> > you're running git on a network file system, the performance will\n> > suffer. Could you elaborate on how your environment is setup?\n> >\n> >\n> We have setup main git repository in remote location on Linux server\n> And created a git repository in local Linux server, as a reference for the\n> remote git repository,\n> And update the local git repository for every 15 min in local server\n> \n> Users will be able to access the  local git repository through NFS\n\nAnd each user will have their own copy of the repository locally on\ntheir machine? That is having done a git clone?\n> \n> All users will clone the git repository from remote project url  by using\n> local git repo as reference\n> \n>  For example : git clone --reference ~/gitcaches/reference user@drupal\n> :/home/project/drupal.git\n> \n> All the users have ssh credentials for the remote server\n\nWhy are you using --reference for a 8.9MB big clone?\n> \n> \n> What is the best way to implement remote git repo and able to access the\n> git repo from other location, without any performance glitches?\n> Users should be able to access git repo from different servers and from\n> different locations.\n\nThe best way is to have it locally cloned. Yes the initial clone will be\nexpensive but operations after that will be fairly smooth. You do not(!)\nwant to execute git on one machine and having the repository beeing on\nan other machine (for example via a network file system, except git\nclone, git fetch, git push, etc.).\n\n> >\n> > > How to improve the performance of git status\n> > >\n> > > Git repo details:\n> > >\n> > > Size of the .git folder is 8.9MB\n> > > Number of commits approx 53838  (git rev-list HEAD --count)\n> > > Number of branches -  330\n> > > Number of files - 63883\n> > > Working tree clone size is 4.3GB\n> >\n> > .git folder of 8.9 MEGABYTE and working tree of 4.3 GIGABYTE? Is this a\n> > typo?\n> >\n> > All git related information is stored in .git directory of the working\n> directory\n>   It is 8.9M\n> And size of the local workspace is 4.3G\n\nCan you please elaborate on this? How can you store 8.9 MB of data that\nwill result in a 4.3 G workspace?\n\n-- \nFredrik Gustafsson\n\nphone: +46 733-608274\ne-mail: iveqy@iveqy.com\nwebsite: http://www.iveqy.com\n"},{"id":"306401","messageId":"1479976686956-7657457.post@n2.nabble.com","threadId":"44484","inReplyTo":"1479202392275-7657456.post@n2.nabble.com","subject":"Re: Git status takes too long- How to improve the performance of git","fromName":"MaryTurner","fromEmail":"jamesjohan493@gmail.com","sentAt":"2016-11-24T08:38:06Z","receivedAt":"2016-11-24T08:43:51Z","isPatch":false,"sender":{"key":"jamesjohan493@gmail.com","avatar":null},"body":"Nice\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Git-status-takes-too-long-How-to-improve-the-performance-of-git-tp7657456p7657457.html\nSent from the git mailing list archive at Nabble.com.\n"}]}