CodeWalrus

Development => PC, Mac & Vintage Computers => Topic started by: gameblabla on January 30, 2017, 05:11:13 AM

Title: Optimise Ubuntu and make it run a little faster
Post by: gameblabla on January 30, 2017, 05:11:13 AM
One of the nice things about Gentoo Linux is the fact that you can build optimized packages for your own machine,
potentially increasing performance.
However, Gentoo is kind of a pain in the ass to set up so i wondered how i could improve the perfs on my Ubuntu machine.
Here are the benchmark results with hardinfo :
Linux 4.10 rc2
Stock glibc
Blowfish
2.49
CryptoHash
567.87
Fibonacci
2.24
N-Queens
0.53
FPU FFT
1.36
Raytracing
13.86


I wondered if compiling and optimising glibc for my own PC would not improve performance ?
I looked up online and i was told it would not increase anything since it looks at the ELF table and blablabla....
I attempted it anyway, here are the options i used :
-march=native -mtune=native -O3 -s
I just modified the debian scripts (rules in particular) to compile glibc, nothing special.

After i installed my new glibc and rebooted, i ran the same benchmark again and here are the results :
Optimised Glibc (-march=native -mtune=native -O3)
Blowfish
2.10
CrytoHash
780.04
Fibonacci
2.16
N-Queens
0.50
FPU FFT
1.31
Raytracing
13.76


So optimising glibc actually improved the performance a bit, despite what most other people claimed.
FPU benchmark are not vastly improved but everything else is, especially Blowfish and CryptoHash.
I also tried compiling my own linux kernel with more aggressive optimisations (-O3 -march=native -mtune=native)
and the benefits were very, very small...

Recompiling glibc for your own PC has its benefits so...
Title: Re: Optimise Ubuntu and make it run a little faster
Post by: Yuki on January 31, 2017, 01:08:23 AM
I usually go for Linux-ck, which comes with better I/O and CPU schedulers, which would improve performance quite a bit on desktops. I don't know if there's PPAs for that for Ubuntu, but the guy who maintain the Linux-ck repo on Arch Linux also provides optimized kernels with -march=native and all. Dunno if that makes a big difference, but it's better than nothing.