* strange git delays
@ 2008-03-20 13:32 James Utter
2008-03-20 14:05 ` Johannes Sixt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: James Utter @ 2008-03-20 13:32 UTC (permalink / raw)
To: git
Hi,
Many git operations are running really slowly for me.
For example 'git commit' and 'git branch' are taking 10 seconds to
complete, even on an almost empty repository, and no longer on a 60MB
repository with plenty of history.
There does not appear to be any CPU or disk activity caused by git.
I would appreciate your help in resolving this problem.
Regards,
James Utter
Details of my environment:
-------------------------------
Linux 2.6.24-1-amd64 #1 SMP x86_64 (from debian testing) [1]
git-core 1:1.5.4.3-1 (from debian testing) [2]
Core 2 duo, 2Ghz
[1] I have been experiencing this problem across several kernels
[2] possibly over several git versions too (not sure)
Here is a test run on my computer
---------------------------------
james@timesink:~$ mkdir testgit
james@timesink:~$ cd testgit/
james@timesink:~/testgit$ time git init-db
Initialized empty Git repository in .git/
real 0m0.013s
user 0m0.000s
sys 0m0.008s
james@timesink:~/testgit$ echo "hai there" > hello
james@timesink:~/testgit$ time git add .
real 0m0.103s
user 0m0.000s
sys 0m0.004s
james@timesink:~/testgit$ time git commit --message "initial commit"
Created initial commit 4f4b3a3: initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 hello
real 0m10.008s
user 0m0.000s
sys 0m0.008s
james@timesink:~/testgit$ time git branch new
real 0m10.006s
user 0m0.000s
sys 0m0.004s
james@timesink:~/testgit$ time git branch -d new
Deleted branch new.
real 0m0.005s
user 0m0.000s
sys 0m0.004s
james@timesink:~/testgit$ echo "im in ur git\n slowin ur workflo" >>
hello
james@timesink:~/testgit$ time git commit -a --message "how long"
Created commit 2392de6: how long
1 files changed, 1 insertions(+), 0 deletions(-)
real 0m10.059s
user 0m0.000s
sys 0m0.008s
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: strange git delays
2008-03-20 13:32 strange git delays James Utter
@ 2008-03-20 14:05 ` Johannes Sixt
2008-03-20 14:19 ` Johannes Schindelin
2008-03-20 21:53 ` Linus Torvalds
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Sixt @ 2008-03-20 14:05 UTC (permalink / raw)
To: James Utter; +Cc: git
James Utter schrieb:
> Many git operations are running really slowly for me.
> For example 'git commit' and 'git branch' are taking 10 seconds to
> complete, even on an almost empty repository, and no longer on a 60MB
> repository with plenty of history.
>
> There does not appear to be any CPU or disk activity caused by git.
...
> james@timesink:~/testgit$ time git commit --message "initial commit"
> Created initial commit 4f4b3a3: initial commit
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 hello
>
> real 0m10.008s
> user 0m0.000s
> sys 0m0.008s
What does
strace -c git commit --message "initial commit"
report? 'strace -tt' or 'strace -T'?
-- Hannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: strange git delays
2008-03-20 13:32 strange git delays James Utter
2008-03-20 14:05 ` Johannes Sixt
@ 2008-03-20 14:19 ` Johannes Schindelin
2008-03-20 21:53 ` Linus Torvalds
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2008-03-20 14:19 UTC (permalink / raw)
To: James Utter; +Cc: git
Hi,
On Fri, 21 Mar 2008, James Utter wrote:
> james@timesink:~/testgit$ time git commit --message "initial commit"
> Created initial commit 4f4b3a3: initial commit
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 hello
>
> real 0m10.008s
> user 0m0.000s
> sys 0m0.008s
I'd try to oprofile it to know what is taking so long.
Hth,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: strange git delays
2008-03-20 13:32 strange git delays James Utter
2008-03-20 14:05 ` Johannes Sixt
2008-03-20 14:19 ` Johannes Schindelin
@ 2008-03-20 21:53 ` Linus Torvalds
2 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2008-03-20 21:53 UTC (permalink / raw)
To: James Utter; +Cc: git
On Fri, 21 Mar 2008, James Utter wrote:
>
> james@timesink:~/testgit$ time git commit --message "initial commit"
> Created initial commit 4f4b3a3: initial commit
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 hello
>
> real 0m10.008s
> user 0m0.000s
> sys 0m0.008s
Ok, that is almost exactly 10 seconds longer than it should take.
And I can almost guarantee that it's something like a problem looking up
your hostname or perhaps user identity - I would guess you have some name
service problem.
Do an
strace -tT git commit --message "initial commit"
on that git commit to make sure, but I would almost bet that it's when git
does tget "getpwuid()" thing to get your name from the gecos fields, and
you have some setup problem with nscd o similar.
It might just go away if you set up your user name and email manually, ie
try doing
git config --global user.name "James Utter"
git config --global user.email james.utter@gmail.com
and see if that makes the delay go away. It probably tries to look up your
login info from some non-existent NIS setup, and then times out after ten
seconds and picks the data from your /etc/passwd file instead.
(There can be other things that do similar things - misconfigured name
servers etc can cause delay etc. So maybe I'm wrogn on blaming nscd, but
it would be my first guess).
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-20 21:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-20 13:32 strange git delays James Utter
2008-03-20 14:05 ` Johannes Sixt
2008-03-20 14:19 ` Johannes Schindelin
2008-03-20 21:53 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox