public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/50636] New: GC in large LTO builds cause excessive fragmentation in memory map
@ 2011-10-06 18:21 andi-gcc at firstfloor dot org
  2011-10-06 19:20 ` Jan Hubicka
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: andi-gcc at firstfloor dot org @ 2011-10-06 18:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50636

             Bug #: 50636
           Summary: GC in large LTO builds cause excessive fragmentation
                    in memory map
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: andi-gcc@firstfloor.org


When doing a very large LTO build I fail with "out of virtual memory"

Some investigation showed the problem was not actually running out of 
memory, but gcc excessively fragmenting its memory map. The Linux kernel
has a default limit of 64k mappings per process and the fragmentation 
exceeded that. This lead to gc mmap allocations failing and other problems.

A workaround is to increase /proc/sys/vm/max_map_count

Looking at /proc/$(pidof lto1)/maps I see there are lots of 1-3 page holes
between other anonymousmemory. I think that's caused by ggc-pages free_pages()
function freeing too early and in too small chunks
(and perhaps LTO garbage collecting too much?)


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-10-20  0:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-06 18:21 [Bug other/50636] New: GC in large LTO builds cause excessive fragmentation in memory map andi-gcc at firstfloor dot org
2011-10-06 19:20 ` Jan Hubicka
2011-10-06 19:21 ` [Bug other/50636] " hubicka at ucw dot cz
2011-10-06 21:29 ` jakub at gcc dot gnu.org
2011-10-06 21:32 ` andi-gcc at firstfloor dot org
2011-10-06 21:42 ` jakub at gcc dot gnu.org
2011-10-06 21:47 ` andi-gcc at firstfloor dot org
2011-10-07  5:49 ` andi-gcc at firstfloor dot org
2011-10-07  5:51 ` andi-gcc at firstfloor dot org
2011-10-07  8:25 ` rguenth at gcc dot gnu.org
2011-10-07 10:01 ` jakub at gcc dot gnu.org
2011-10-07 14:45 ` andi-gcc at firstfloor dot org
2011-10-08 16:48 ` andi-gcc at firstfloor dot org
2011-10-08 19:55 ` andi-gcc at firstfloor dot org
2011-10-08 20:14 ` jakub at gcc dot gnu.org
2011-10-08 21:10 ` andi-gcc at firstfloor dot org
2011-10-17 14:44 ` ak at gcc dot gnu.org
2011-10-20  0:11 ` andi-gcc at firstfloor dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).