Optimised blender build GNU Linux AMD64

I was able to get scons woking this morning, and I made my first blender compile.

My question is , How do I make it so it is LAA, SSE3 , and 64bit aware?

After I get a decent build, I will upload it for other Ubuntu and GNU Linux users.

I hope that you have better luck than I. I tried to do all the compile optimizations and such for Gentoo linux, Fedora, and Ubuntu. What I got was Blender versions that were nearly the exact same speed when compared to the official Blender 64 bit builds.

I’d test the official builds from www.blender.org (64 bit) to your custom ones to see how they compare.

I got a similar result - not a huge speed increase. I think some coding knowledge is necessary to really take advantage of optimizing potential. I have also read that aggressive optimization can lead to problems with functionality.

However, I found some useful info. here:-
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html (may not be current)

I don’t know what LAA is but if you build on 64 bit it’s 64 bit compatible.

It helps to know what support there is for your cpu with the version of gcc you are using for your ‘-march’ flag.

I found this version of 2.45 on graphicall.org which renders about 25% faster than other versions I have - I’ll be sad when it’s out of date.

If you find some successful optimization techniques let me know, I’d love to learn more about it.

Good luck!

Ok thanks guys :slight_smile:

I have come up with this so far for my system:

CCFLAGS.extend( [ '-march=athlon64', '-O3', '-ffast-math', '-mmmx', '-msse', '-msse2', '-msse3', '-m3dnow'] )
CXXFLAGS.extend( [ '-march=athlon64', '-O3', '-ffast-math', '-mmmx', '-msse', '-msse2', '-msse3', '-m3dnow'] )

Well, now I just need to know where to put that information. Is there some .RC file somewhere I enter it into?

user-config.py in your root svn dir.


Angela, what is your cpu?

I believe if you specify(I’m no developer) -msse2 and -msse3 it will only apply the second option. Safe if you don’t know which is applicable, but your system should be capable of either.

I’m looking forward to seeing your results Angela . . . I’ve seen separate builds optimized for SSE3 or 64bit, and was wondering about both together (didn’t have much luck doing my own builds in the past).

BTW: Am I mistaken, or would LAA be unnecessary when running under a 64bit environment, as it would already recognize over 2GB RAM? Or, does the difference lie between using more total system RAM and allowing more memory space per process?

Also, some of those flags are automatically added when using that march option. Those are some of the same options that I tried along with other optimizations in the entire Linux system. I recompiled my entire toolchain in Gentoo with all the recommended optimizations and then build Blender using those optimizations. It was like .02 seconds faster than the official builds.

I enjoyed doing it so that I understand more of the building process, but in the end…it didn’t pay the dividends that I was hoping. I am still eager to find out how yours turn out though. I might have been missing something.

Do some searches in this forum for Linux and compile…there are quite a few threads that have discussions of the various options used when compiling and their effects on render times.

Thanks Basse ,I did a file search on my entire system, and I cannot find the user-config.py .
I am going to look for the SVN root directory next. thanks for your help :slight_smile:

Hi jcode, AMD +4800 X2 with 4 gigs of system ram

Hi Organic, So should I just use this:

and leave out all of the:
‘-O3’, ‘-ffast-math’, ‘-mmmx’, ‘-msse’, ‘-msse2’, ‘-msse3’, ‘-m3dnow’

Thanks for the help :slight_smile:

Thanks Cire!
I will post my results as fast as I get it compiled :slight_smile:

I only have a static build from graphical for the SVN version is the reason i decided to compile. I want to take advantage of OpenGL . Plus I have always wanted to customize my splash screen :slight_smile:


you have to create the user-config.py yourself. It goes into the same directory as where the SConstruct resides. See also the doc/ directory for a document on how to use our scons system.


I was hoping you weren’t going to ask me anything technical; but definitely leave in ‘-03’, ‘-mmse3’(or 2), and ‘-m3dnow’-if you want to use it.
Don’t quote me, but you might want to try without ‘-ffast-math’ I think I remember reading that it may not do what you think(but what do I know?). Trying to verify, but the blender .org server seems to be down.

Edit - Here we go. You may be able to find it here (cache version I hope)-
[QUOTE} stiv Posted: Wed Sep 19, 2007 3:49 am
Joined: 05 Aug 2003
Posts: 986
Quote: ‘-ffast-math’

You probably do NOT want this one. Read the compiler docs to be sure. It does not do what you might think from the name.[/quote]