From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30605 invoked by alias); 6 May 2003 20:46:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 30587 invoked by uid 71); 6 May 2003 20:46:02 -0000 Date: Tue, 06 May 2003 20:46:00 -0000 Message-ID: <20030506204602.30583.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Peter van Hoof Subject: Re: optimization/10155: [3.3/3.4 regression] gcc -O2/-O3 uses excessive amount of memory Reply-To: Peter van Hoof X-SW-Source: 2003-05/txt/msg00415.txt.bz2 List-Id: The following reply was made to PR optimization/10155; it has been noted by GNATS. From: Peter van Hoof To: Steven Bosscher Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, jh@suse.de, rakdver@atrey.karlin.mff.cuni.cz Subject: Re: optimization/10155: [3.3/3.4 regression] gcc -O2/-O3 uses excessive amount of memory Date: Tue, 06 May 2003 21:41:00 +0100 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10155 > It looks like it's related to the amount of RAM in your > box. For me, GCC -O2 never consumes more than 40MB, and > my machine has 192MB. If your system pulls it off to > keep cc1 alive up to 1772MB, then I suppose you have at > least four times as much, so your GC param settings will > be much larger than mine --> GCC eats more memory. That > _should_ give you a nice speedup over older GCC 3.x... > So perhaps we can change the synopsis to reflect that his > really only is a bug with -O3. > > Peter, if you compile with "gcc -v", you can see your > garbage collector parameter settings. For me they are: > GGC heuristics: --param ggc-min-expand=42 --param ggc-min-heapsize=23891 > > Can you show us your settings? Now that my computer is back in the land of the living, I can finally answer this (in case it is still relevant)... I ran the initial test case on a Sun Blade 100 with 2GB of RAM, these are the settings with this machine: GNU C version 3.4 20030504 (experimental) (sparc-sun-solaris2.9) compiled by GNU C version 3.4 20030504 (experimental). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 The compiler reaches a maximum size of 1894MB, which means that the machine has to swap out some other processes. I also have an Ultra 5 with 640MB of RAM, these are the settings on that machine GGC heuristics: --param ggc-min-expand=73 --param ggc-min-heapsize=81920 I killed the compilation when the compiler grew to >1700MB because swap space was running dangerously low, i.e. on this machine the compiler would use up all the swap space it could get its hands on. Hope this helps... Peter.