Re: 2 hours to compile mysql?
On Sat, 1 Jan 2000, Dan Nelson wrote: In the last episode (Jan 01), Leif Neland said: 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? You probably need more RAM. sql_yacc.cc is one of those "worst-case" programs as far as gcc is concerned; I don't think gcc can parse large case statements like this efficiently. Adding "--with-low-memory" to your port Makefile, in the CONFIGURE_ARGS line, will help. I got 64M more RAM(1), so the system now has 128MB. Mysql now compiles in 10 minutes or so. Leif (1) My wife got the kids a new game for christmas. It was too demanding for their 486's, so I got 2 K6-3-400MHz/64MB motherboards for them. To preserve my self-esteem, I had to upgrade my own PII-333/64Mb somehow to be more powerfull than theirs... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: 2 hours to compile mysql?
Leif Neland wrote: 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 Is amount of ram available (portably) to configure? So configure could decide to use --low-memory by itself? Allowing overrides, naturally. Leif There is actually a method to portably guess how much RAM your have available from configure -- just write a small C program that will keep malloc()-ing until it gets an error, but I do not think it is worth the effort. -- Sasha Pachev +--+ | TcX __ _ _ ___ == [EMAIL PROTECTED]| | /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sasha Pachev| |/*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] | | /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Provo, Utah, USA| | /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| | | /*/^^^\*\^^^| | /*/ \*\ Developers Team | +--+ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: 2 hours to compile mysql?
Is amount of ram available (portably) to configure? So configure could decide to use --low-memory by itself? Allowing overrides, naturally. Leif There is actually a method to portably guess how much RAM your have available from configure -- just write a small C program that will keep malloc()-ing until it gets an error, but I do not think it is worth the effort. -- Sasha Pachev How much ram you have and how much ram+swap you have before you hit your limit is quite different. :) # sysctl hw.physmem hw.physmem: 400883712 This will return the amount of ram you have minus your kernel size, though. Perhaps helpful if you really want to do this. :) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: 2 hours to compile mysql?
On Sat, Jan 01, 2000 at 01:32:19PM -0600, Dan Nelson wrote: 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? You probably need more RAM. sql_yacc.cc is one of those "worst-case" programs as far as gcc is concerned; I don't think gcc can parse large case statements like this efficiently. Adding "--with-low-memory" to your port Makefile, in the CONFIGURE_ARGS line, will help. I have the same thing compiling mysql (daily updated cvs of ports, and just yesterday recompiled my world). I have a P2 450 with 256MB of ram. So, I don't think that RAM is an issue here... -Steve -- Stephan van Beerschoten Email: [EMAIL PROTECTED] Network EngineerLuna Internet Services PGP fingerprint 4557 9761 B212 FB4C 778D 3529 C42A 2D27 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: 2 hours to compile mysql?
[ moved to freebsd-ports ] On 01-Jan-00 Leif Neland wrote: So far it has been taking 2 hours to compile sql_yacc.cc from mysql3.22. This is an indication that something is SERIOUSLY wrong! MySQL has never taken my PII-450 w/ 128MB RAM more than, say, 10-15 minutes to build/install. It would be nice if you showed the transcript of your MySQL build. I hope you're doing this from the port.. (that reminds me, this should really have gone to freebsd-ports, not freebsd-current). -- Will Andrews [EMAIL PROTECTED] GCS/E/S @d- s+:++:- a---+++ C++ UB P+ L- E--- W+++ !N !o ?K w--- ?O M+ V-- PS+ PE++ Y+ PGP t++ 5 X++ R+ tv+ b++ DI+++ D+ G+ e- h! r--+++ y? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: 2 hours to compile mysql?
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 Is amount of ram available (portably) to configure? So configure could decide to use --low-memory by itself? Allowing overrides, naturally. Leif To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: 2 hours to compile mysql?
"Leif" == Leif Neland [EMAIL PROTECTED] writes: 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 Leif Is amount of ram available (portably) to configure? I don't think thats easy to check for.. Aother problem is also that even if you have only little ram, you may still want to compile MySQL without --low-memory, because the final code is much better if you don't have to use --low-memory. Leif So configure could decide to use --low-memory by itself? Allowing Leif overrides, naturally. Leif Leif Regards, Monty To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message