PDA

View Full Version : Compiling Ubuntu from scratch 2



fahadysf
January 29th, 2010, 11:23 PM
But would you get any benefit tuning for your processor type ('-march=core2 -mtune=core2 -msse4 etc etc' ?

cariboo
January 29th, 2010, 11:27 PM
The above post was tacked on to the end of a 5 year old thread.

See the origional thread here (http://ubuntuforums.org/showthread.php?t=43096)

Xbehave
January 30th, 2010, 12:24 AM
Not really, i doubt you will gain more than a few % and it will take agers to do, ofc the only way to know for sure is to do it and benchmark it.

I doubt it's too hard to do but it will take quite some time, i think youd need to look at apt-src or something like

apt-get build-dep $program;apt-get source -b $program
edit your default build options and script a way to do all of your apps then leave it running for a few hours.

dragos240
January 30th, 2010, 12:30 AM
The above post was tacked on to the end of a 5 year old thread.

See the original thread here (http://ubuntuforums.org/showthread.php?t=43096)

Fixed.

cariboo
January 30th, 2010, 01:15 AM
Thanks dragos240, I noticed it was spelled wrong, but didn't change it. :)

MaxIBoy
January 30th, 2010, 03:54 AM
Believe it or not, you can get some benefit-- not significantly by compiling for your CPU architecture (although that certainly doesn't hurt,) but by stripping out unneeded drivers (smaller kernel that loads faster,) eliminating the initrd (also for faster boot time,) upping the tickrate (better desktop latency,) applying the BFS patch (much better performance,) and much more. There are plenty of knobs and switches which cause crashes on a minority of hardware and need to be disabled for everyone.

Don't expect miracles, but the kernel you choose can clearly matter for performance:
http://www.phoronix.com/scan.php?page=article&item=ubuntu_32_pae&num=1


On the other hand, if you really mean "compiling Ubuntu from scratch," you need to do a lot more than just the kernel.

Xbehave
January 30th, 2010, 05:08 AM
Believe it or not, you can get some benefit-- not significantly by compiling for your CPU architecture (although that certainly doesn't hurt,) but by stripping out unneeded drivers (smaller kernel that loads faster,) eliminating the initrd (also for faster boot time,) upping the tickrate (better desktop latency,) applying the BFS patch (much better performance,) and much more. There are plenty of knobs and switches which cause crashes on a minority of hardware and need to be disabled for everyone.
Most of that will only decrease boot time (a modular kernel + initrd + udev meands only needed drivers are loaded)
The BFS patch is debatable, I've seen claims it has little effect (but ofc the mainline devs would say that)
The tickrate you are right about though, default ubuntu=100, best for desktop=10000 (but it might cost you a tiny bit of battery life)