List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:January 1 2000 6:52pm
Subject:Re: 2 hours to compile mysql?
View as plain text  
>>>>> "Leif" == Leif Neland <leif@stripped> writes:

Leif> On Sat, 1 Jan 2000, Paul DuBois wrote:

>> At 4:23 PM +0100 2000-01-01, Leif Neland wrote:
>> >So far it has been taking 2 hours to compile sql_yacc.cc from mysql3.22.
>> >
>> >I had to find an old disk for swap, and it's swapping all the time.
>> >
>> >top shows 156M size and 46M res., run time 20min's for cc1plus.
>> >That probably means it's been waiting for swapping in 1h40m...
>> >
>> >The box is a 333MHz PII, with 64M ram. Do I just need more ram to be able
>> >to compile in reasonable time, or is something broken?
>> >
>> >I'm running FreeBSD current from 01/01/2000.
>> 
>> It's not unusual for sql_yacc.cc to take a long time to compile, although
>> two hours is pretty extreme. :-)
>> 
>> If it eventually dies with an error, try re-running configure with the
>> --with-low-memory option.

Leif> It took 3 hours or so, but finally succeeded.

Leif> Leif

Hi!

The reason for this is that some gcc optimizations stages takes
exponentially more memory when compiling big functions.
bison produces one big function for the grammar parsing and its
this that takes a long time to compile;  To compile sql_yacc.cc quickly
on Intel, you nead at least 160M of free ram.  On a PentiumII 400mz with 256M
ram, it takes 11 seconds to compile sql_yacc.o.  Having to use swap
can easily make things 1000 times slower

Regards,
Monty
Thread
2 hours to compile mysql?Leif Neland1 Jan
  • Re: 2 hours to compile mysql?Paul DuBois1 Jan
    • Re: 2 hours to compile mysql?Leif Neland1 Jan
      • Re: 2 hours to compile mysql?Michael Widenius2 Jan
        • Re: 2 hours to compile mysql?Leif Neland2 Jan
          • Re: 2 hours to compile mysql?Michael Widenius2 Jan
          • Re: 2 hours to compile mysql?Sasha Pachev4 Jan
            • Re: 2 hours to compile mysql?Daniel O'Connor4 Jan
            • Re: 2 hours to compile mysql?Sascha Schumann4 Jan
            • Re: 2 hours to compile mysql?Kevin Day4 Jan
  • Re: 2 hours to compile mysql?Tonu Samuel1 Jan
  • Re: 2 hours to compile mysql?hypnos1 Jan
    • Re: 2 hours to compile mysql?Benjamin Pflugmann1 Jan
Re: 2 hours to compile mysql?Leif Neland9 Jan
  • Re: 2 hours to compile mysql?Ralph Graulich10 Jan