Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git status slow on VMWare guest but not host

Tags:

git

ubuntu

vmware

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.
like image 716
Pengin Avatar asked Oct 05 '10 08:10

Pengin


2 Answers

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?

like image 102
snemarch Avatar answered Oct 17 '22 17:10

snemarch


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.

like image 29
VonC Avatar answered Oct 17 '22 15:10

VonC