git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Fredrik Gustafsson <iveqy@iveqy.com>
To: ravalika <prenuka@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git status takes too long- How to improve the performance of git
Date: Tue, 15 Nov 2016 11:24:01 +0100	[thread overview]
Message-ID: <20161115102400.GC28860@paksenarrion.iveqy.com> (raw)
In-Reply-To: <1479202392275-7657456.post@n2.nabble.com>

Hi,

On Tue, Nov 15, 2016 at 02:33:12AM -0700, ravalika wrote:
> We are using git-1.8.2 version for version control.

That's a three (almost four) year old version of git. Your first test
should be to see if an upgrade to a recent version will improve things.

> It is an centralized server and git status takes too long

A centralized server? How? git is designed to be runned locally. If
you're running git on a network file system, the performance will
suffer. Could you elaborate on how your environment is setup?

> 
> How to improve the performance of git status
> 
> Git repo details:
> 
> Size of the .git folder is 8.9MB
> Number of commits approx 53838  (git rev-list HEAD --count)
> Number of branches -  330  
> Number of files - 63883
> Working tree clone size is 4.3GB

.git folder of 8.9 MEGABYTE and working tree of 4.3 GIGABYTE? Is this a
typo?

> 
> time git status shows
> real	0m23.673s
> user	0m9.432s
> sys	0m3.793s
> 
> then after 5 mins
> real    0m4.864s
> user    0m1.417s
> sys     0m4.710s

A slow disc and empty caches are slow. Two ways of improving this is to
have faster discs or make sure your cache is up to date. When I'd a
really slow disc, I'd my shell to run a git status in the background to
load the cache everytime I started working on a project. This is however
an ugly hack that wasn't approved to be a part of git.

> 
> And I have experimented the following ways 
> -          -  Setting core.ignorestat to true
> -          -  Git gc &git clean
> -          -  Shallow clone – Reducing number of commits
> -          -  Clone only one branch 
>       - Git repacking - git repack -ad && git prune
> -     - Cold/warm cache 
> 
> Could you please let me know, what are the ways to improve the git
> performance ?
> I have gone through the mailing lists.

You could always check the --assume-unchanged bit, see the manual page
for git update-index. However this is quite extreme and demanding for
the user.

-- 
Fredrik Gustafsson

phone: +46 733-608274
e-mail: iveqy@iveqy.com
website: http://www.iveqy.com

  reply	other threads:[~2016-11-15 10:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15  9:33 Git status takes too long- How to improve the performance of git ravalika
2016-11-15 10:24 ` Fredrik Gustafsson [this message]
2016-11-15 11:44   ` Christian Couder
     [not found]   ` <CAEAva_1JAu+kWmk3MZDFK=4CgQB5M+JN8FwzMVr6zKgXTAhdXw@mail.gmail.com>
2016-11-16 13:21     ` Fredrik Gustafsson
2016-11-15 15:10 ` Heiko Voigt
2016-11-24  8:38 ` MaryTurner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161115102400.GC28860@paksenarrion.iveqy.com \
    --to=iveqy@iveqy.com \
    --cc=git@vger.kernel.org \
    --cc=prenuka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).