Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Arch --> Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
anthony5429
n00b
n00b


Joined: 14 Feb 2008
Posts: 1

PostPosted: Thu Feb 14, 2008 7:36 am    Post subject: Arch --> Gentoo Reply with quote

Hi! My name's Anthony; I've been an Arch user for years and love the distro, but wouldn't mind playing around with Gentoo when I get some time. I'm a big DIY fan so the whole compile-everything-yourself methodology sounds super-cool to me. And as an Arch user, I know the great advantage of a rolling-release package system like Gentoo has. Moreover, your community's a bit larger than Arch's. But before I get involved with a new distro, I've got a couple newbie questions...

First off, have there ever been definitive benchmarks done to see how much optimisation is possible from compiling everything on the local system? I know the logistics of such a test are difficult, but just wonder if it has been done. I would love to see some stats if there are some out there. I wonder how much those SSE2, SSE3, etc compiler flags affect the end-result, performance-wise.

Second, whenever a new version of GCC or LLVM (when you get that working) comes out which can produce more optimised binary code, is there an easy way to rebuild the whole system with the new toolchain?

Thanks in advance for your help. I've read a lot of good stuff about Gentoo and am looking forward to giving it a shot myself.
Back to top
View user's profile Send private message
baeksu
l33t
l33t


Joined: 26 Sep 2004
Posts: 609
Location: Seoul, Korea

PostPosted: Thu Feb 14, 2008 8:42 am    Post subject: Reply with quote

I don't think that there really is 'any' optimization benefits to gain from compiling your own packages. Most of the performance gains you get come from having a better control over what you are running on your machine. So if optimization is the only thing you hope to gain from trying out Gentoo, I would advise you not to.

Re-compiling the toolchain and the system is pretty easy, if you don't mind leaving your machines running when your not using them. But like I said before (and most Gentoo users will tell you this), there's not much to be gained from rebuilding your system, unless otherwise it would break.

With that being said, portage is truly a wonderful package management system, and a lot of the other tools also rock. So that might be something to entice you to join the dark side.
_________________
Gnome:
1. A legendary being.
2. A never ending quest to make unix friendly to people who don't want unix and excruciating for those that do.
Back to top
View user's profile Send private message
floffe
Guru
Guru


Joined: 24 Nov 2003
Posts: 414
Location: Linköping, Sweden

PostPosted: Thu Feb 14, 2008 8:57 am    Post subject: Reply with quote

CFLAGS might have a significant impact on the performance of a few apps (media encoding comes to mind), but in general I don't think much is gained.
Back to top
View user's profile Send private message
phajdan.jr
Retired Dev
Retired Dev


Joined: 23 Mar 2006
Posts: 1777
Location: Poland

PostPosted: Thu Feb 14, 2008 11:21 am    Post subject: Reply with quote

Generally I think Gentoo is not about 'ricing'. You get many other benefits: more granular package management (via USE flags, even different flags for different packages, easily provided by tools like euse or flagedit), more flexible package management (rollback to previous version, quickpkg, config files management, better "package messages" - elog management, etc). You also get some great commandline tools like eselect. Etc, etc, and of course really great documentation - actually I find it the best of other distros so far.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Feb 14, 2008 12:40 pm    Post subject: Reply with quote

You will see that with Gentoo there a lot of documentation :) And there is no AUR for Gentoo right now, but we have overlays.
Back to top
View user's profile Send private message
david_e
n00b
n00b


Joined: 27 Jul 2007
Posts: 51
Location: Berlin, Germany

PostPosted: Thu Feb 14, 2008 6:04 pm    Post subject: Reply with quote

Coming from Arch Linux I found Gentoo to have almost the same performance as Arch Linux, except for the init sequence: Arch Linux is a way faster than Gentoo at booting... and the Octave package which is faster here, because the default one in Arch was using the reference BLAS, not because of the CFLAGS...

The Sunrise project is better than AUR, because of the q.a. (mind also that writing ebuilds is a little bit harder than PKGBUILDs).
Back to top
View user's profile Send private message
phajdan.jr
Retired Dev
Retired Dev


Joined: 23 Mar 2006
Posts: 1777
Location: Poland

PostPosted: Thu Feb 14, 2008 6:08 pm    Post subject: Reply with quote

david_e wrote:
mind also that writing ebuilds is a little bit harder than PKGBUILDs


For me the opposite was true, but probably because I'm accustomed to ebuilds, and there is the excellent devmanual.gentoo.org.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Thu Feb 14, 2008 6:15 pm    Post subject: Reply with quote

anthony5429,

I don't think you fully understand what 'optimise' means. Its to maximise one (important) parameter at the expense of other (less important) parameters under certain well specified conditions (which you omitted from your post).

When the conditions change, the optimisation you have done to suit the conditions needs to be re-evaluated and probably changed.

It follows directly that running benchmarks tells you how good you are at running benchmarks - nothing more.
For benchmarks to be useful, you need a way to compare them to real world conditions.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
david_e
n00b
n00b


Joined: 27 Jul 2007
Posts: 51
Location: Berlin, Germany

PostPosted: Thu Feb 14, 2008 6:23 pm    Post subject: Reply with quote

_ph wrote:
david_e wrote:
mind also that writing ebuilds is a little bit harder than PKGBUILDs


For me the opposite was true, but probably because I'm accustomed to ebuilds, and there is the excellent devmanual.gentoo.org.

I found ebuilds to have a lot of features so if you want to make a good ebuild you have to learn a lot of things (use flags, eclass etc...) and you have to worry about all the possible choices of the final user (will this package really work with all the possible combinations of USE flags?)... but maybe it's just because I was accustomed with PKGBUILDs...
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Thu Feb 14, 2008 6:40 pm    Post subject: Re: Arch --> Gentoo Reply with quote

Hello and welcome, Anthony,

anthony5429 wrote:

First off, have there ever been definitive benchmarks done to see how much optimisation is possible from compiling everything on the local system? I know the logistics of such a test are difficult, but just wonder if it has been done. I would love to see some stats if there are some out there. I wonder how much those SSE2, SSE3, etc compiler flags affect the end-result, performance-wise.


A lot of people already said that above, but in case you want one more opinion: if that is the reason why you want to try Gentoo (or eventually switch from Arch to Gentoo, then you are wasting your time. That kind of *optimization* can only be achieved by buying faster hardware. Of course, compiling from source has some -measurable- advantage on a few apps. But if that what you want, you can recompile mencoder or mysql on any distro. No need to use Gentoo just for that.

I am a Gentoo lover, but I am not going to lie about it to get a new adept.

Being that said, benchmarks are one of the most stupid things I've ever seen, because they almost always tsay whatever the one who do the benchmarks want them to say. Gentoo can performan as nicely or badly as any other distro. It is the admin who usually counts, and not the distro. And, of course, the amount of knowledge and experience you have with the distro you are using.

Quote:

Second, whenever a new version of GCC or LLVM (when you get that working) comes out which can produce more optimised binary code, is there an easy way to rebuild the whole system with the new toolchain?


Sure, just emerge -eD world. But again, it is completely stupid -in my humble opinion- to spend a couple of days recompiling the whole system to gain (or lose, who knows...) two microseconds when launching konqueror... Your opinion might differ, of course.



Besides all this *uber optimization* crap. the real thing about Gentoo is that you can customize it to the bone (and I am not talkig about blindly throwing useless and potentially dangerous CFLAGS into your make.conf). There are a number of things I like about Gentoo, but if I had to choose one it would probably be USE flags. They let you enable or disable features at compile time, which can greatly reduce the number of dynamic links a given executable will have, and also impact greatly on the number and size of the dependencies. Stripping your USE flags to the minimum has also another advantage: you have less security flaws to watch over, since the size of the linked code on, let's say, php, will be much less than if you compile every feature on it, like binary distros usually do.
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Thu Feb 14, 2008 7:48 pm    Post subject: Re: Arch --> Gentoo Reply with quote

i92guboj wrote:
Sure, just emerge -eD world. But again, it is completely stupid -in my humble opinion- to spend a couple of days recompiling the whole system to gain (or lose, who knows...) two microseconds when launching konqueror... Your opinion might differ, of course.

Code:
emerge -e world

the -D wouldn't do anything if you are already dumping all the dependencies because you told portage to recompile the whole tree leading to 'target' (in this case world).

it took me 17.4 hours to -e world on a well established amd64 system (aka: a system with a lot of extra packages brought in).

if you are updating a critical part of the toolchain, i think it is worth it. then again if it really did take more then 24 hours... it'd have to be a serious update like the expat ABI change.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Thu Feb 14, 2008 8:20 pm    Post subject: Re: Arch --> Gentoo Reply with quote

jonnevers wrote:
i92guboj wrote:
Sure, just emerge -eD world. But again, it is completely stupid -in my humble opinion- to spend a couple of days recompiling the whole system to gain (or lose, who knows...) two microseconds when launching konqueror... Your opinion might differ, of course.

Code:
emerge -e world

the -D wouldn't do anything if you are already dumping all the dependencies because you told portage to recompile the whole tree leading to 'target' (in this case world).


I am not sure about that. World != "all the installed packages", and if -D is needed for a deep deps resolution, I can't see why in this case it would be any different at all. I could be wrong, though. But that is not the topic anyway. If that -D is not useful, then why would it be different on emerge -DuvN world? :P (I'm asking, not saying that that is wrong... I really don't know).

Quote:

it took me 17.4 hours to -e world on a well established amd64 system (aka: a system with a lot of extra packages brought in).

if you are updating a critical part of the toolchain, i think it is worth it. then again if it really did take more then 24 hours... it'd have to be a serious update like the expat ABI change.


Well, numbers here are completely irrelevant, they depend on a load of different factors ranging from pure hardware ones, to others like the number of packages, and the concrete packages you have on your system. Even if it's 17 hours, even if it's 1 hour, it will be much more time than the few microseconds you will get from a full recompilation with a better compiler. Also, note that "better" and "greater gcc version" do not always mean "faster binaries". That is a misconception.

I only recompile when I can expect binary breakage if I don't. But this has been discussed to exhaustion on the forums and on thousands of lists, and is also completely off-topic here.
Back to top
View user's profile Send private message
floffe
Guru
Guru


Joined: 24 Nov 2003
Posts: 414
Location: Linköping, Sweden

PostPosted: Thu Feb 14, 2008 8:31 pm    Post subject: Re: Arch --> Gentoo Reply with quote

i92guboj wrote:
jonnevers wrote:
i92guboj wrote:
Sure, just emerge -eD world. But again, it is completely stupid -in my humble opinion- to spend a couple of days recompiling the whole system to gain (or lose, who knows...) two microseconds when launching konqueror... Your opinion might differ, of course.

Code:
emerge -e world

the -D wouldn't do anything if you are already dumping all the dependencies because you told portage to recompile the whole tree leading to 'target' (in this case world).


I am not sure about that. World != "all the installed packages", and if -D is needed for a deep deps resolution, I can't see why in this case it would be any different at all. I could be wrong, though. But that is not the topic anyway. If that -D is not useful, then why would it be different on emerge -DuvN world? :P (I'm asking, not saying that that is wrong... I really don't know).

-e stands for --emptytree = "assume there are no packages installed, so reinstall all deps". -D just makes that other query check back up through all deps and see if the USE flags changed, and reinstall if they did, while leaving unchanged packages alone.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Fri Feb 15, 2008 3:01 am    Post subject: Reply with quote

So for a quick resume, to update your box daily :

Code:

#emerge --sync
#emerge -puDNv world
#emerge -uDNv world
#dispatch-conf Or #etc-update
#revdep-rebuild -p
#revdep-rebuild


With that you can update all you want :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri Feb 15, 2008 11:32 am    Post subject: Reply with quote

d2_racing,

Code:
#emerge -puDNv world
#emerge -uDNv world
can be combined into
Code:
emerge -uDNva world
as can the two revdep-rebuild commands.
The -a option means --ask
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Fri Feb 15, 2008 12:53 pm    Post subject: Reply with quote

Yeah, but I use the -p because of the genlop feature :)

Code:

#emerge -puDNv world | genlop -p


I don't know if genlop works with the -a option.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5937

PostPosted: Fri Feb 15, 2008 12:55 pm    Post subject: Reply with quote

d2_racing wrote:
Yeah, but I use the -p because of the genlop feature :)

Code:

#emerge -puDNv world | genlop -p


I don't know if genlop works with the -a option.


genlop doesn't have an --ask option, but it does have a --pretend option. :?
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Fri Feb 15, 2008 2:10 pm    Post subject: Reply with quote

it should also be
Code:
revdep-rebuild -i -av

the -i goes to revdep-rebuild and tells it to throw away any existing ~/.revdep* files.
the -av goes to the child emerge process, so you can review and quickly execute the task. 8)

I recommend these ~/.bashrc aliases:
Code:
#system control
alias e="time sudo emerge -av"
alias emerge="sudo emerge"
alias layman="sudo layman"
alias confs="sudo dispatch-conf"
alias svi="sudo vi"

no longer needing to su into root, everything can be done by your normal trusted user. The reason i bother to alias 'emerge' to itself is because i hate --sync -av :P
Code:
emerge --sync && e -uND world
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Feb 15, 2008 2:42 pm    Post subject: Reply with quote

Any new installation of Linux will probably feel faster than the old one, simply because the hard drive has basically been freshly defragmented.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum