Performance issue while doing git pull

XMLWordPrintable

    • Type: Bug
    • Resolution: Not a bug
    • Priority: Low
    • None
    • Affects Version/s: 3.11.2
    • Component/s: None

      I have a small Git repository, using Atlassian Stash. The repo has bout 250 files, not much history, and the files are all small - total repo size is about 10MB.

      Git pull (returning just "Already up-to-date") in many cases over 8 seconds.

      With GIT_TRACE set, the following is shown:

      23:35:25.109710 git.c:555 trace: exec: 'git-pull'
      23:35:25.109745 run-command.c:351 trace: run_command: 'git-pull'
      23:35:25.122176 git.c:346 trace: built-in: git 'rev-parse' '--git-dir'
      23:35:25.131460 git.c:346 trace: built-in: git 'rev-parse' '--is-bare-repository'
      23:35:25.132926 git.c:346 trace: built-in: git 'rev-parse' '--show-toplevel'
      23:35:25.134679 git.c:346 trace: built-in: git 'ls-files' '-u'
      23:35:25.136349 git.c:346 trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
      23:35:25.139419 git.c:346 trace: built-in: git 'config' 'branch.master.rebase'
      23:35:25.142520 git.c:346 trace: built-in: git 'config' 'pull.rebase'
      23:35:25.144089 git.c:346 trace: built-in: git 'config' 'pull.ff'
      23:35:25.145995 git.c:346 trace: built-in: git 'rev-parse' 'q' '-verify' 'HEAD'
      23:35:25.147660 git.c:346 trace: built-in: git 'fetch' '--update-head-ok'
      23:35:25.148347 run-command.c:351 trace: run_command: 'ssh' '-p' '7999' 'git@smsvcs' 'git-upload-pack '\''/srm/srm.git'\'''
      23:35:31.758436 run-command.c:351 trace: run_command: 'rev-list' '-objects' 'stdin' 'not' 'all' '-quiet'
      23:35:31.761165 run-command.c:351 trace: run_command: 'rev-list' '-objects' 'stdin' 'not' '-all'
      23:35:31.761307 exec_cmd.c:129 trace: exec: 'git' 'rev-list' '-objects' 'stdin' 'not' '-all'
      23:35:31.762459 git.c:346 trace: built-in: git 'rev-list' '-objects' 'stdin' 'not' '-all'
      23:35:33.806938 run-command.c:351 trace: run_command: 'gc' '--auto'
      23:35:33.807048 exec_cmd.c:129 trace: exec: 'git' 'gc' '--auto'
      23:35:33.808245 git.c:346 trace: built-in: git 'gc' '--auto'
      23:35:33.809709 git.c:346 trace: built-in: git 'rev-parse' 'q' '-verify' 'HEAD'
      23:35:33.813711 git.c:346 trace: built-in: git 'fmt-merge-msg'
      23:35:33.818468 git.c:346 trace: built-in: git 'merge' 'Merge branch '\''master'\'' of ssh://smsvcs:7999/srm/srm' 'HEAD' 'f77e569b202ef7674dc30d219e71b2587e87f708'
      Already up-to-date.

      The biggest delay seems to happen at 23:35:25.148347, while it's running git-upload-pack over SSH (it takes over 6.5 seconds).

      SSH connection is pretty fast:

      =->time ssh xyz@smsvcs 'echo test'
      test

      real 0m0.136s
      user 0m0.009s
      sys 0m0.001s

      Second biggest delay is at 23:35:33.806938, and it's 2 seconds - running rev-list.

              Assignee:
              Unassigned
              Reporter:
              Pavel Chernikov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: