开发者

Git status slow on VMWare guest but not host

I am running an Ubuntu Lucid guest inside VMWare Player on a Windows XP machine, using a shared folder. git status is slow in the VM (24 seconds) but fast on the host machine (0.06 seconds) Any idea why?

More details:

  • My repo is about 620 MB (obtained by doing du -hs . in the guest OS)
  • I've tried running git gc as described here, but it made no difference:

Counting objects: 3604, done.

Compressing objects: 100% (1069/1069),

done. Writing objects: 100%

(3604/3604), done. Total 3604 (delta 2143), reused 3604 (delta 2143)

Removing duplicate objects: 100%

(256/256), done.

  • My repo contains lots of CSV files as well as code - is this a bad idea?
  • On Windows host I am using PortableGit-1.7.2.3-preview20100911
  • On Ubuntu guest I use Git version 1.7.0.4 installed from aptitude
  • On Ubuntu开发者_运维知识库 guest I am sharing a folder from the windows host using the VMWare shared folder facility
  • On Windows guest I have no choice but to have Sophos running, but I temporarily turned off "on-access scanning" and it made no difference.
  • I originally had problems with the guest clock running slow, but this was fixed with grub options nosmp noapic nolapic as described here.


Shared Folders have a fair amount of overhead, since you're crossing the guest<>host boundary. I'm not super-familiar with the internals of git, but I would assume it does a lot of fairly small operations, involving a relatively high amount of per-operation overhead. You could try doing a git repack to reduce the amount of individual objects (files), might help a bit.

Is it imperative that you share the repository between guest and host?


1/ Read access are generally slower through a VM than a native OS

2/ git status is slow when the repo has submodules: do you have any?
With git1.7.2+, you can ignore those with the --ignore-submodules option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜