PDA

View Full Version : Compiling for Optimum Speed


KingMort
05-02-2009, 05:53 PM
I'm on Fedora Core 6 Linux atm.. I want to change from our normal Debug mode to the official Retail / Release version... How does one go about that in Linux ??

King

erde
05-03-2009, 02:58 AM
open world/makefile
look for this line:
COPTS=$(WFLAGS) -g -march=i686 -O -pthread -pipe -I../common/SocketLib \
-DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)

remove the option -g and change -O to -O3. maybe you would lower the loglevel? if so change EQDEBUG=5 to a lower value.

from debug.h the EQDEBUG values
////// File/Console options
// 0 <= Quiet mode Errors to file Status and Normal ignored
// 1 >= Status and Normal to console, Errors to file
// 2 >= Status, Normal, and Error to console and logfile
// 3 >= Lite debug
// 4 >= Medium debug
// 5 >= Debug release (Anything higher is not recommended for regular use)
// 6 == (Reserved for special builds) Login opcode debug All packets dumped
// 7 == (Reserved for special builds) Chat Opcode debug All packets dumped
// 8 == (Reserved for special builds) World opcode debug All packets dumped
// 9 == (Reserved for special builds) Zone Opcode debug All packets dumped
// 10 >= More than you ever wanted to know

just do the same for the zone and eqlaunch makefile

I am not a gcc expert!

Sorry for the bad english, i am from germany.

erde
05-03-2009, 03:21 AM
gcc hompage with optimization flags link (http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options)

KingMort
05-03-2009, 07:38 PM
Much appreciated ! Thank you

supersolar
05-25-2009, 01:14 AM
Old thread but I've been away for a while. When you compile make sure to toss in your -jx flag. That alone will get a lot more work when you're doing the work.

To figure out the value of x tale the number of cpu threads and add 1 to it. So a single core cpu with no hyperthreading gets make -j2, a quad core would get -j5, and so on. Now note this will totally peg your machine while it's doing this, so you may step back one or two numbers if you run anything else on the box, like apache.