Re: A bit OT: git - ridiculous memory requirements

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/30/2012 04:13 AM, Vaclav Mocek wrote:
> Hi all,
> 
> I have a cloned GCC git repository, on PC with 1.5GB of RAM and 3GB
> swap.
> 
> When I run "$git gc --aggressive", I will get after few hours an
> error:
> 
> $ git gc --aggressive Counting objects: 1332887, done. Delta
> compression using up to 2 threads. fatal: Out of memory, malloc
> failed (tried to allocate 4838335 bytes) error: failed to run
> repack $
> 
> 4.5GB of memory is not enough, what is that?
> 
> I wonder what git is internally doing, it seems to me as a pretty 
> non-optimal implementation. It is the first application I have
> which has been killed by OOM killer.

Are you sure it got oom-killed? It appears to have just received a
malloc failure and quit. You'd expect abnormal termination via a
signal for an oomkill.

It would also be interesting to see the /proc/<pid>/{s,}maps output or
even a top snapshot of the git process before this happens - the
failing allocation was only for a little over 4MiB.

You might also get better results trying git-repack or git-fsck on
your tree first (git-repack on a cluttered repo can speed things up
greatly although I don't know if you may run into similar memory
consumption problems there).

With that said I'm not sure the behaviour is that out of line
considering the description of --aggressive:

  --aggressive
     Usually git gc runs very quickly while providing good disk
     space utilization and performance. This option will cause
     git gc to more aggressively optimize the repository at the
     expense of taking much more time. The effects of this
     optimization are persistent, so this option only needs to be
     used occasionally; every few hundred changesets or so.

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk91hFIACgkQ6YSQoMYUY95aQwCgzJQyBla5KRwQR4NF5BcVy70p
CEYAn0NWuCW7S271KHivb20OlfBUTPov
=DRP/
-----END PGP SIGNATURE-----
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux