NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

vm.bufcache and git



I am in the process of learning git.  I have all of netbsd (src, xsrc)
and pkgsrc imported into git, and can commit/push/pull fine.  But, "git
status" was very slow, taking around 75s (reasonably modern i386).

Looking into this, I found git blocked on disk io, and the disk light
was on solid.  buffer cache (for inodes, not contents - not in UBC)
usage was near the upper limit.  I had in sysctl.conf

  vm.bufcache=5

because everyone knows it doesn't need to be as high as default :) I
then put vm.bufcache to 20, and after another run git status was under
10 seconds.  I ran ktrace, and there are about 180K stat calls (matches
count of files in my checkout).  My cache usage is around 130MB.  That's
764 byte so cache per stat call (of course other things are happening).
Also, it seems vm.bufcache is effectively limited to 10%, even if I set
it to 20, based on

vm.bufcache = 20
vm.bufmem = 138708992
vm.bufmem_lowater = 26738688
vm.bufmem_hiwater = 213909504

(on a 2GB machine)

vm.bufcache = 10
vm.bufmem = 138708992
vm.bufmem_lowater = 26723840
vm.bufmem_hiwater = 213790720


So,

  has anyone else tried to put all of netbsd in git, and did you run
  into this problem?

  Is each inode in the buffer cache really 512 bytes?

  Has anyone thought about merging the buffer cache into UBC?

  Any thoughts about what to do on e.g a 512M VM?

Attachment: pgpMvHzxOjj6R.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index