# Total Speed Bsd vs arch optimized



## kansas (Jul 1, 2009)

I need some expert opinions please:

From what I've read (could be wrong), the bsd kernel is faster than the linux kernel. I am running a 64 bit processor. Archlinux automatically installs only binary packages that are compiled from source and already optimized for my hardware, much like gentoo linux except the compiling has already been done for me. However, to use Archlinux, I am using linux, not bsd, which is slower in general.

My question: If I were to install bsd, and also to install archlinux, and then add the same programs, which would be faster on average?

More specifically: Would the performance gained by having programs compiled from source specifically optimized for my hardware be greater in magnitude than the performance gained by using a bsd system instead of a linux kernel?

Thanks for your time,

kansas


----------



## DutchDaemon (Jul 1, 2009)

I'm sorry, but that's a blanket question which can't be answered with a blanket reply. Well, it can, but it wouldn't be accurate.

Some thoughts, though. 

You talk about 'already optimized for my hardware'. It's either marketing-speak or a misconception. Binary packages are built for an _architecture_ (like i386) and probably built with safe defaults. If anything, packages are bland and generic, rather than razor-sharp and optimized. Optimization for your specific hardware can only be attained by compiling your own software, though the advantages will only be very marginal, unless the source itself contains very specific optimizations for e.g. your CPU you can call upon. 

A simple truth about programs in general: some will run faster on Linux, some will run faster on FreeBSD. Some Linux programs run faster in Linux emulation mode under FreeBSD, even. There are 20,000+ ports, there's no way anyone can say it's one or the other. It depends on the source, and on optimizations the author may have put in there for the 'original platform' he wrote it for.


----------



## aragon (Jul 1, 2009)

Yup.  If you're trying to compare speeds between linux and freebsd you really can't say "in general".  There are far too many variables.  And even if you get very specific the differences are often negligibly small.

Run them both and choose the one that feels faster and better to you.


----------



## kansas (Jul 1, 2009)

Thanks!

If the speed difference will change depending on the different variables, and if that speed difference would be negligible anyways, I'll probably go with bsd because of personal preference.

My first concern was absolute speed. 

Again, thank you!

-kansas


----------



## aragon (Jul 1, 2009)

kansas said:
			
		

> My first concern was absolute speed.


I'll throw an ugly spanner into the works and say for desktop use and speed you might be best off with Windows!  It's biggest advantage I find is application load times.  Everything seems to load much faster under Windows, and on a desktop that is happening often.


----------



## Eponasoft (Sep 19, 2009)

aragon said:
			
		

> I'll throw an ugly spanner into the works and say for desktop use and speed you might be best off with Windows!  It's biggest advantage I find is application load times.  Everything seems to load much faster under Windows, and on a desktop that is happening often.


Even that is a blanket statement; I find applications load faster in FreeBSD than Windows could ever load them. For example, Firefox 3 takes 3 seconds to load here, but took about 15 to load in Windows XP. Even applications for Windows itself often load faster using Wine (I use Poser 4 a lot, for example...in Windows XP, it took about 20 seconds to load, but here, it loads in 5 seconds). But again, that depends on a lot of variables as well...usually on how bloated and bogged-down your Windows install is...and if you're running Vista.


----------



## Oxyd (Sep 19, 2009)

Eponasoft said:
			
		

> Even that is a blanket statement; I find applications load faster in FreeBSD than Windows could ever load them. For example, Firefox 3 takes 3 seconds to load here, but took about 15 to load in Windows XP. Even applications for Windows itself often load faster using Wine (I use Poser 4 a lot, for example...in Windows XP, it took about 20 seconds to load, but here, it loads in 5 seconds). But again, that depends on a lot of variables as well...usually on how bloated and bogged-down your Windows install is...and if you're running Vista.



I have the same experience as aragon here -- Windows definitely feels smoother when loading applications for me.  Both XP and Vista.  The most noticeable difference is starting Eclipse -- on Windows it loads up within about a second or so, on FreeBSD (and Linux too) it takes about ten seconds for it to start.

My personal theory is that desktop apps (by that I mean anything with a GUI) need to load lots of libraries on Unix-like systems (GTK+, Qt libs -- they most likely are preloaded, but I guess the dynamic linker still has to do something) and then the app needs to push its GUI through X server to get it on screen, which makes it appear slower.  While on Windows, the GUI libs are a part of the OS itself, so a starting app doesn't need to push its interface through as many different layers.

Oh, also Windows does unfair scheduling by default -- IIRC, just-starting process has higher priority.  Also, the process belonging to the currently-focused window gets a higher priority, while processes belonging to minimised windows get lower -- this should make the overall desktop experience smoother.

It'd be nice if we could get rid of this whole X thing altogether and perhaps have something that isn't split into bazillion different layers, and could maybe integrate with the OS scheduler to do what Windows does with its scheduling.  (Optionally, of course -- because I know somebody there is going to complain that they wouldn't like this behaviour.)  But X has been bashed to death already and bashing isn't going to help things any. :\


----------



## aragon (Sep 19, 2009)

Eponasoft said:
			
		

> For example, Firefox 3 takes 3 seconds to load here, but took about 15 to load in Windows XP.


Complete opposite here.


----------

