# 32-bits vs 64-bits -- thoughts, issues, etc.



## DrJ (Jun 19, 2009)

(this thread has been split off from http://forums.freebsd.org/showthread.php?t=4873)

How severe is the performance penalty of running i386 binaries on amd64?  I am soon going to be putting together a new box, and I assumed that I would run amd64 for the added addressing space.  I had thought that the speed penalty would be overwhelmingly compensated by the increase in speed (from a seven-year-old dual Athlon to some flavor of quad core).

Is that not true?  Are there other "gotchas" with amd64?  I don't need Wine, but I will need VBox, Flash, Acroread, Java and the usual other stuff.


----------



## wonslung (Jun 19, 2009)

DrJ said:
			
		

> How severe is the performance penalty of running i386 binaries on amd64?  I am soon going to be putting together a new box, and I assumed that I would run amd64 for the added addressing space.  I had thought that the speed penalty would be overwhelmingly compensated by the increase in speed (from a seven-year-old dual Athlon to some flavor of quad core).
> 
> Is that not true?  Are there other "gotchas" with amd64?  I don't need Wine, but I will need VBox, Flash, Acroread, Java and the usual other stuff.



there is java, flash works via linux compat, i haven't tried vbox yet...theres no nvidia graphics drivers for amd64, not the 3-D ones at least (theres the normal desktop nv driver)
I run it on 2 desktops and it runs well enough for me.  But in all honesty 32 bit runs really well too.

The main reason i used AMD64 was because i was learning ZFS and i really liked the idea of snapshots, it works in 32 bit as well but i read it was better in amd64 so i tried that.


----------



## DrJ (Jun 19, 2009)

Right -- that much I know.  But it would seem that you need to keep separate 32 and 64 bit binaries; how are the various library calls handled?  With separate libraries?  Any issue with managing those?  Or is it pretty transparent?  And do you need a 32-bit Firefox (for example) to use the plugins?  Not that these is anything particularly wrong with that.


----------



## Oko (Jun 19, 2009)

DrJ said:
			
		

> Right -- that much I know.  But it would seem that you need to keep separate 32 and 64 bit binaries; how are the various library calls handled?  With separate libraries?  Any issue with managing those?  Or is it pretty transparent?  And do you need a 32-bit Firefox (for example) to use the plugins?  Not that these is anything particularly wrong with that.



Doc, let me be straight with you. I have not used amd64 version of FreeBSD so I can say only talk about OpenBSD version. OpenBSD is fully 64-bit OS on amd64. That in practical terms means that you will not be able to use any 32 bit binaries. OpenBSD doesn't have linux emul on amd64 so you wouldn't be able to use flash, win32-codes, or wine or more serious things like Maple, Mathematica, MatLab, Adobe reader. Java compiles on amd64 so you would be able to have JDK and JRE. The same goes for FreeMat, Maxima, Octave and similar.  

Penalization on amd64 is not significant but it does exit for applications which are written with 32 bit in mind. It is offset by the fact that you can utilize 4Gb of RAM unlike i386 which can not see more than 3Gb in practical terms.  

OpenBSD amd64 is fully functional and ready for prime time. My decision to stick with i386 was also based on the fact that from the  maintenance point of view unless all your PCs (in my case probably close to dozen) are capable of running amd64 you are better off sticking with the single version of OS.

I do however have to worn everybody. Unless you are 100% sure that you will be mostly running 64 bit applications your life will be probably simpler if you stick with i386 at least for now.


----------



## DrJ (Jun 19, 2009)

Oko said:
			
		

> That in practical terms means that you will not be able to use any 32 bit binaries.


I assume you mean Linux binaries, right?  You should be able to run a 32-bit version compiled on FreeBSD on 64-bit, right?


> OpenBSD doesn't have linux emul on amd64 so you wouldn't be able to use flash, win32-codes, or wine or more serious things like Maple, Mathematica, MatLab, Adobe reader.


FreeBSD has amd64 versions of the linuxator, at least according to the ports page.  So many of these concerns seem not to apply to Free.  That leaves out Wine, but that's no issue for me.


> Penalization on amd64 is not significant but it does exit for applications which are written with 32 bit in mind. It is offset by the fact that you can utilize 4Gb of RAM unlike i386 which can not see more than 3Gb in practical terms.


That's exactly it.  I'm wavering between 4 cores and 8; it seems silly to have an 8-core (16 with HTT) computer that has 3GB of memory.  For practical purposes, anything over 4 cores seems silly.


> from the  maintenance point of view unless all your PCs (in my case probably close to dozen) are capable of running amd64 you are better off sticking with the single version of OS.


This would be the first amd64 computer I have, but slowly I will move over as funds permit.  The 32-bit ones can stay on Windows -- they are fine for everyday things, and my employees understand the system and software.  The ones with Win7 and FreeBSD I want to migrate over.  (I will retire an AMD 1500 system as part of the upgrade, though.)


----------



## Oko (Jun 19, 2009)

DrJ said:
			
		

> I assume you mean Linux binaries, right?  You should be able to run a 32-bit version compiled on FreeBSD on 64-bit, right?


Absolutely NOT. All applications have to be compiled on amd64 in order to be usable on amd64. Cross compilation is possible but as you know it is only for developers to introduce new architectures. That is not something that should be regularly practiced.

Still unless the developer have properly used 64 bits registers in the program you will be penalized by machine for executing such code on 64-bits even though it is compiled on amd64.


----------



## DrJ (Jun 19, 2009)

Oko said:
			
		

> Absolutely NOT. All applications have to be compiled on amd64 in order to be usable on amd64.


Ah -- that helps.  And it is one difference from Vista (for example) where you practically have to run 32-bit browsers to use their plugins.  So those reside in a separate directory, with their statically-linked libraries.

I'll have to look further into the FreeBSD linuxator.  If it works with 32-bit code, then the situation might not be as severe as it is on Open.  Even the Adobe Reader really is necessary.  While the Poppler-based readers have improved a great deal, there are some files (primarily from TeX) tht just don't render properly.  At least that is what I've found.


----------



## DrJ (Jun 19, 2009)

Hmm.  nspluginwrapper works on both i386 and amd64.  So the plugins would seems to work on FreeBSD.  That would seem to take care of most of it.  That leaves nVidia, which I'd bet comes out in alpha form in a couple of months.

Admittedly this is a surface view, and things might not work as well in practice.  Comments?


----------



## Oko (Jun 19, 2009)

DrJ said:
			
		

> Ah -- that helps.  And it is one difference from Vista (for example) where you practically have to run 32-bit browsers to use their plugins.  So those reside in a separate directory, with their statically-linked libraries.


That is the 32 bit chroot (sendbox) on 64 bits that I was talking about. That is the "proper" way to run 32 bits binaries on 64 bit machine.




			
				DrJ said:
			
		

> I'll have to look further into the FreeBSD linuxator.  If it works with 32-bit code, then the situation might not be as severe as it is on Open.  Even the Adobe Reader really is necessary.  While the Poppler-based readers have improved a great deal, there are some files (primarily from TeX) tht just don't render properly.  At least that is what I've found.



I would be really pleasantly surprised that linux emulator works
as good on amd64 as it does on i386. Check the user@netbsd for
horror stories.


----------



## DrJ (Jun 20, 2009)

Oko said:
			
		

> That is the 32 bit chroot (sendbox) on 64 bits that I was talking about. That is the "proper" way to run 32 bits binaries on 64 bit machine.


So can that be set up easily?  I'm not that concerned about security -- this is a desktop, and not a server, and my internet habits are very well managed.


> I would be really pleasantly surprised that linux emulator works as good on amd64 as it does on i386.


You may well be right.  On Free, in particular because of all the work done on the linuxator recently (f9 and f10, for example).  That of course overlooks the fundamental problem of mixing all these programs together in a manageable way.


----------



## Oko (Jun 20, 2009)

DrJ said:
			
		

> Hmm.  nspluginwrapper works on both i386 and amd64.  So the plugins would seems to work on FreeBSD.  That would seem to take care of most of it.  That leaves nVidia, which I'd bet comes out in alpha form in a couple of months.
> 
> Admittedly this is a surface view, and things might not work as well in practice.  Comments?



nspluginwrapper is open source code which can be compiled on amd64. Do not forget that flash is not open source. If there is no native 64-bits version of flash for Vista do you really think that there is a good 64-bits version for Linux?

I think, people are kidding themselves about amd64 and how wide spread are applications written for 64 bits. 
On the another hand if the application is written for 64 bits it is going to out preform 32-bit application by a mile. Yes, that is the "future". 
For the record SGI had fantastic 128 bit implementation of last versions of Irix if I remember correctly and they were even had implementation of 256 bit operating system and applications.


----------



## Oko (Jun 20, 2009)

DrJ said:
			
		

> So can that be set up easily?  I'm not that concerned about security -- this is a desktop, and not a server, and my internet habits are very well managed.


32 bit chroot on amd64 requires serious kernel hacking. I am not aware of any BSDs currently having any activity in that direction but I might be wrong. For OpenBSD, I am 100% sure that there is absolutely no interest for implementing something like that. 

Linux emulator is on life support on OpenBSD. I think it will be gone soon. On the another hand there is significant work done on porting latest Wine to OpenBSD.


----------



## DrJ (Jun 20, 2009)

Oko said:
			
		

> nspluginwrapper is open source code which can be compiled on amd64. Do not forget that flash is not open source. If there is no native 64-bits version of flash for Vista do you really think that there is a good 64-bits version for Linux.


That right, of course.  Oops!  On the main Adobe site, there is no 64-bit version of either Reader or Flash.  Wasn't there a buggy version of Flash that was released for Linux?


> I think, people are kidding themselves about amd64 and how wide spread are applications written for 64 bits.
> On the another hand if the application is written for 64 bits it is going to out preform 32-bit application by a mile. Yes, that is the "future".


This sure has been a slow transition.  It seems like such a waste of good hardware.


----------



## DutchDaemon (Jun 20, 2009)

*bump* to get thread-split noticed


----------



## wonslung (Jun 20, 2009)

i think it depends on what you're doing.  I've noticed better performance on amd64 on my quadcore with 8gb ram.  I'm sure it's mostly due to the ram and 32 bit address space but for a lot of stuff it's noticeable, just not so much in the desktop area.


----------



## DrJ (Jun 20, 2009)

DutchDaemon said:
			
		

> *bump* to get thread-split noticed



Thanks -- I was just sending you a note requesting the thread split.  Once again, you are fast!


----------



## DrJ (Jun 20, 2009)

wonslung said:
			
		

> i think it depends on what you're doing.



That right, of course.  And what exactly a "desktop" is is not clearly defined, either.  To be specific, my intended application is to do the usual email/browsing/text processing/spreadsheets like the rest of the world.  That includes Flash and Reader and codecs and stuff like that.  

There are also applications that require Windows or OS X, like access to certain remote databases or flawless Word or WordPerfect compatibility.  Those I have traditionally done in a VM (or on a Win Box).  The old VMware worked just fine for these purposes, but it just is too old for today's hardware.  That's one reason I've been testing VBox so extensively.

The next layer is that I work on a lot of big 2D images, and will be moving more into high-resolution videos (from photomicroscopy, FWIW).  I also am getting ready to do some calculations that would be big on most people's scales, though they are small for OKO's.  They will certainly exceed 3GB.

I had hoped that I could do all of that on one computer, and replace my very old desktop box.  A 64-bit box would seem to be the way to go, if it could do these things.  Perhaps I am being too optimistic, but that was the goal.


----------



## Oko (Jun 20, 2009)

DrJ said:
			
		

> That right, of course.  And what exactly a "desktop" is is not clearly defined, either.  To be specific, my intended application is to do the usual email/browsing/text processing/spreadsheets like the rest of the world.  That includes Flash and Reader and codecs and stuff like that.
> 
> There are also applications that require Windows or OS X, like access to certain remote databases or flawless Word or WordPerfect compatibility.  Those I have traditionally done in a VM (or on a Win Box).  The old VMware worked just fine for these purposes, but it just is too old for today's hardware.  That's one reason I've been testing VBox so extensively.
> 
> The next layer is that I work on a lot of big 2D images, and will be moving more into high-resolution videos (from photomicroscopy, FWIW).



To be frank, I would use i386 for that. If for no other reason just be on the safe side. You want to spend time working not fixing things.





			
				DrJ said:
			
		

> I also am getting ready to do some calculations that would be big on most people's scales, though they are small for OKO's.  They will certainly exceed 3GB.
> 
> I had hoped that I could do all of that on one computer, and replace my very old desktop box.  A 64-bit box would seem to be the way to go, if it could do these things.  Perhaps I am being too optimistic, but that was the goal.



I agree on that one as long as the applications are native for FreeBSD and native for 64 bit architecture.


----------



## wonslung (Jun 20, 2009)

i use freebsd 7.2 amd64 for my home media server desktop and laptop.

I have been thinking about trying it on my htpc's as well if i can get it to run xbmc well enough in 32 bit mode but i might stick with linux here for awhile simply because of the new nvidia drivers have hardware accel for xbmc which is great.

I have flash running no problem in amd64 via the linux compat mode
I haven't tried vmware or virtualbox yet but if they ran i'd be very happy.  

for flash i used this guide http://crnl.org/blog/2008/11/01/flash-9-for-freebsd-71 though i didn't follow it 100%, i used f10 instead of f8 and i MIGHT have used flash10, i can't remember to be honest.

I know this, kde4 looks great on my laptop.


----------



## DrJ (Jun 20, 2009)

wonslung said:
			
		

> I have flash running no problem in amd64 via the linux compat mode
> I haven't tried vmware or virtualbox yet but if they ran i'd be very happy.



I've poked around a bit, and it seems that it is easier to get 32-bit Linux applications to run on amd64 than native FreeBSD ones.  It is part of the linuxator.

So do the codecs and the Adobe reader all work?  And do you use native 64-bit java, and can that execute with the plugins?


----------



## DrJ (Jun 20, 2009)

Oko said:
			
		

> To be frank, I would use i386 for that. If for no other reason just be on the safe side. You want to spend time working not fixing things.
> 
> I agree on that one as long as the applications are native for FreeBSD and native for 64 bit architecture.



Sounds like you would suggest two different boxes.  Maybe it is time to set up a small cluster, and leave the desktop to the i386 world.


----------



## vivek (Jun 20, 2009)

For desktop usage I will always go with 32bit operating systems, especially all multimedia stuff.

For server or dedicated router / nat / firewall there is no question - amd64 rules. 

Also, freebsd 7.2 can run 32bit jails. So you can dump your desktop inside a jail (however, you have to relax /dev/ rules to get working linux stuff).


----------



## Oko (Jun 20, 2009)

vivek said:
			
		

> Also, freebsd 7.2 can run 32bit jails.



This is very interesting and important information. Am I hearing well Vivek that you are saying that 32 bit jail can be run on 64-bit amd64 on FreeBSD 7.2? Are you 100% sure? If that can be done that is very, very cool!


----------



## DrJ (Jun 20, 2009)

> Also, freebsd 7.2 can run 32bit jails.



I didn't know this, but it makes perfect sense.  i386 in amd64 is a userland issue, and not a kernel issue.  Setting it up in a jail would allow for a clean solution to this.  

What exactly do you have to do with the dev rules?  Can it be set up so that it is transparent in day-to-day use (maintaining it, primarily)?


----------



## Oko (Jun 20, 2009)

DrJ said:
			
		

> I didn't know this, but it makes perfect sense.  i386 in amd64 is a userland issue, and not a kernel issue.  Setting it up in a jail would allow for a clean solution to this.


Doc it is more complicated. It is kernel issue as well. That being said, it is "correct" way to do it. I am still not 100% convinced. Can a developer or somebody who is using 32 bit Jail on amd63 confirm Vivek's statements?


----------



## DrJ (Jun 20, 2009)

Oko said:
			
		

> Doc it is more complicated. It is kernel issue as well.



I thought of that as well as I was making the evening cocktail run.  Both nVidia and VBox need kernel drivers; these would have to be 64-bit, as that is the underlying kernel.  However, the user space is all 32 bit.  That has to cause problems unless great care is given to its management (if it is possible at all). 

That also ignores that nVidia 64-bit does not exist right now, but presumably will be coming soon.


----------



## vivek (Jun 20, 2009)

Let me google it for you :e


> 32bit Compatibility with 64bit jails
> 
> Compatibility support which permits 32-bit jail binaries to be used on 64-bit systems to manage jails has been added.


http://www.freebsd.org/releases/7.2R/relnotes.html and http://www.cyberciti.biz/tips/freebsd-72-review-improved-virtualization.html 

Default /dev rules inside jails are designed with security in mind. This is configurable and well documented in man page. Also, you need /proc stuff for Linux. This can be also mounted in a jail.


----------



## DrJ (Jun 20, 2009)

With respect, I could not find any information on kernel drivers in your suggested pages.


----------



## vivek (Jun 20, 2009)

I'm not sure about kernel drivers but 32bit desktop can be dumped inside jail on amd64 for sure. Are you talking about your other thread?


----------



## DrJ (Jun 20, 2009)

vivek said:
			
		

> Are you talking about your other thread?



No.  Say I want to run VBox in a jail that has my desktop stuff, which has a 32-bit userland; the host runs a 64-bit kernel.  I wish to run VBox in that jail as a part of the general desktop.  How do I do so?


----------



## vivek (Jun 20, 2009)

You can't have vbox in jail (but I'm not sure about it as I never tried vbox on freebsd or linux or inside jail). What you can do is install all normal 32bit stuff in jail including desktop, Linux flash, wine and other stuff.

Another idea, get VMWARE Server ESXi 64 bit free version. Now you can install all sort of operating systems on top of it. I've done this in our lab and we run virtually all operating system in GUI mode. We have 16GB RAM and RAID-10 storage on server. You can load FreeBSD and another Linux distro and/or Windows vista / xp can be done with 4GB RAM and your 64bit CPU. What kind of hardware spec do you have?


----------



## DrJ (Jun 20, 2009)

vivek said:
			
		

> You can't have vbox in jail



I'm taking the liberty to make a very large snip here.  It makes sense that you can run i386 in amd64 as long as you don't need kernel modules.  That may well muck things up.

ESXI (or however it is capitalized) is a whole 'nother layer.  It may make sense, but it is another issue.  Can my goals be achieved reasonably in straight FreeBSD?


----------



## vivek (Jun 20, 2009)

There is only one way to find out -- try it out yourself and may be write a little tutorial in how-to section  I could have done this myself but really don't have free time in hand... 

Oh, ESXi itself can be booted from USB. It is super fast and it is not slow like vmware server 2.0 which runs on top of Windows or Linux host. However, ESXi don't support all hardware out there.. it is designed for people with deep pockets. I'd suggest you go with 32bit jails. Oh and FreeBSD 8.0 will also have native XEN dom0. You can boot Linux or windows. It is scheduled to released in q3 2009.


----------



## DrJ (Jun 20, 2009)

This is part of a hard-money decision.  I have no 64-bit computers at the moment; how I spend my money depends on what will work.  And sorry, I won't spend that money on speculation on what *might* work, at least without a reasonable foundation.

This sounds harder that I want it to.


----------



## wonslung (Jun 21, 2009)

i was under the impression that you could start a 32 bit jail in a 64 bit os but some stuff still will not work, like wine for instance.


----------



## phoenix (Jun 22, 2009)

Oko said:
			
		

> Absolutely NOT. All applications have to be compiled on amd64 in order to be usable on amd64.



BZZZZZZTTTT!!!! WRONG!!! And that's the whole beauty of the amd64 CPU architecture.

A 64-bit AMD CPU can run in one of three "modes":

pure 32-bit (can only run 32-bit binaries)
pure 64-bit (can only run 64-bit binaries)
hybrid (boots in 64-bit mode, can run 32-bit binaries)

Thus, so long as you have 32-bit libraries, loader, ELF interpreter, etc installed on a 64-bit system, then you can run 32-bit binaries.

You'll notice there's a */usr/lib32* directory on a standard 64-bit FreeBSD install.  That's to support 32-bit binaries.

You can also create a jail, and install a 32-bit userland in there, all running on top of a 64-bit kernel.

There's (according to AMD) virtually no performance penalty for running in hybrid mode.

Things on the Intel side are similar, with a few peculiarities, but it also works well in practise.


----------



## Oko (Jun 22, 2009)

phoenix said:
			
		

> BZZZZZZTTTT!!!! WRONG!!! And that's the whole beauty of the amd64 CPU architecture.


I was talking about OpenBSD amd64 which is honest fully 64-bit operating system. I have never run FreeBSD amd64 in my life. Look at my original post and disclaimer! You told me a lots of interesting information and to be frank with you some of them quite surprising.


----------



## hedwards (Jun 22, 2009)

vivek said:
			
		

> For desktop usage I will always go with 32bit operating systems, especially all multimedia stuff.


At this point pretty much the only stuff that doesn't work are Flash, wine and some proprietary drivers as far as basic desktop stuff goes.

And at least for the nVidia drivers there's been serious work going on in recent times, so we should have a proper driver in the foreseeable future.

Or in other words, there isn't really a whole lot that one needs to give up if one wishes to use amd64, it is a tier 1 architecture after all.

EDIT: Unfortunately at this time virtual box doesn't seem to compile at all on AMD64, or rather a few of the dependencies don't.


----------



## fronclynne (Jun 23, 2009)

hedwards said:
			
		

> At this point pretty much the only stuff that doesn't work are Flash, wine and some proprietary drivers as far as basic desktop stuff goes.
> . . .
> EDIT: Unfortunately at this time virtual box doesn't seem to compile at all on AMD64, or rather a few of the dependencies don't.


I have heard that wine doesn't work/compile, I don't know.  I'll take your word for it.

graphics/gnash works here, somewhat.  Youtube, at least.  Meh.  "rich media" is asenine at best.

emulators/virtualbox compiles fine (including dependancies), runs fine (okay, 8-CURRENT, amd64, blah blah), but the video on ATI does funky stuff.  can't use it, graphics-wise.  ymmv.

But, please, be more specific about what doesn't work.  the FUD is annoying.


----------



## phoenix (Jun 24, 2009)

Oko said:
			
		

> I was talking about OpenBSD amd64 which is honest fully 64-bit operating system. I have never run FreeBSD amd64 in my life. Look at my original post and disclaimer! You told me a lots of interesting information and to be frank with you some of them quite surprising.



Yes, but this is a FreeBSD forum, with questions relating to FreeBSD, so giving a strictly OpenBSD response (which is incorrect for FreeBSD) is not such a great thing to do.  

While OpenBSD may currently run as a "pure" 64-bit OS, there's nothing technologically stopping it from running 32-bit apps (the CPU architecture supports it).  All they have to do is add support to the linker/ELF loader to detect 32-bit apps, and to load the 32-bit libs, and voila!  Presto-chango, support for 32-bit apps is enabled on 64-bit OpenBSD.


----------



## aragon (Jun 27, 2009)

I've been running amd64 on the desktop for over a year.  There are very few things now that one can't do in amd64 FreeBSD 7.  The notable ones for me:

* wine
* mplayer's win32-codecs

I weened myself off wine over a year ago - there is so much great (sometimes better) open source software that I don't need wine.  I still use native Windows for video editing, but that didn't work in wine anyway.

Lack of win32-codecs isn't a biggie - I've only been unable to play certain WMV files which I very rarely encounter.  All other WMVs that I encounter are playable as win32-codecs is only needed for very specific codecs (the latest HD WMV stuff, IIRC).

Flash works in the linuxulator.  Java works and runs 64bit (install java/diablo-jdk16).  QEMU works (need to test virtualbox still).  Any other uncertainties?


----------



## DrJ (Jun 27, 2009)

aragon said:
			
		

> Any other uncertainties?



No, that pretty much covers it.  I have done some reading, and it seems that the linuxator does 32 bit fine.  So the Adobe Reader should work too (does it have the same issue unloading ld as does i386?).  Yes, the poppler-based PDF viewers have improved a lot, but there still are files that need Reader.

I've read many reports that VBox works fine, but there still are some issue with 8.  Those will be fixed.  And nVidia is moving on their 64 bit driver, so that should be resolved in the next few months.

I think my next box will be amd64.  I can always go back to i386 if must needs be.


----------



## aragon (Jun 27, 2009)

Can't comment on Adobe Reader as I use xpdf only.

I traded an nvidia card for an ATI just so that I could run amd64 with decent 2D for the past year.  I'm hoping the radeon/radeonhd devs will have 3D working on RV6XX before nvidia get their 64 bit drivers in motion.


----------



## DrJ (Jun 27, 2009)

aragon said:
			
		

> I'm hoping the radeon/radeonhd devs will have 3D working on RV6XX before nvidia get their 64 bit drivers in motion.



Good luck with that.  I'd bet an alpha version of the nVidia driver is out in two months, maybe three.  3D on ATI I'd guess is a year or two off.  Personally it does not matter to me, but I have found the nVidia driver to be very good.


----------



## blah (Jun 27, 2009)

Decent 2D is available for nvidia on amd64, too. Nouveau driver is fast enough to play HD video without lags. On my Core 2 Duo E8400 it takes around 2% CPU utilization to show 1080p content using Xvideo (on G94) in fullscreen with 1600x1200 resolution and 40~46% to decode it from h264 on mplayer. With advent of TTM/GEM memory manager and driver pixmaps I bet nouveau will be even faster for 2D.


----------



## wonslung (Jun 27, 2009)

I'm very happy with my transiston to freebsd amd64.
at the end of the day the faster boot times and more stable os are worth the 2 or 3 things it doesn't do yet.  I've never been a fan of windows so switching to linux wasn't hard.  Looking back on this, i probably should have went straight to freebsd.  The first time i remember seeing anything about it was on techtv years ago on a show called "The Screen Savers" and it stayed in the back of my mind. At some point i was looking for a QOS router and stumbled onto the pfsense project, at that point i was already using linux 100% of the time.  After using pfsense and seeing how stable it was i decided to try freebsd as my desktop. Now i use it for most of my computers.

I still have 2 linux htpc's  Does anyone know if xbmc works well enough on freebsd? If it works at least AS well as it does on linux i'll probably switch those machines over too.


----------



## aragon (Jun 27, 2009)

blah said:
			
		

> Decent 2D is available for nvidia on amd64, too. Nouveau driver is fast enough to play HD video without lags.


Unfortunately at the time I switched to amd64 nouveau was broken and nv was slow, and both had little hope of improvement without nvidia providing hardware documentation.  On a personal note, I'd rather keep buying hardware from a vendor that supports open source - AMD and Intel have both been quite good in this regard, while nvidia haven't.


----------



## morbit (Jun 27, 2009)

Oko said:
			
		

> I was talking about OpenBSD amd64 which is honest fully 64-bit operating system. I have never run FreeBSD amd64 in my life. Look at my original post and disclaimer! You told me a lots of interesting information and to be frank with you some of them quite surprising.



If you would like to run "pure" FreeBSD amd64 system, just put WITHOUT_LIB32=true in src.conf and build kernel without 
	
	



```
options         COMPAT_IA32             # Compatible with i386 binaries
```
 line.


----------



## wonslung (Jun 27, 2009)

aragon said:
			
		

> Unfortunately at the time I switched to amd64 nouveau was broken and nv was slow, and both had little hope of improvement without nvidia providing hardware documentation.  On a personal note, I'd rather keep buying hardware from a vendor that supports open source - AMD and Intel have both been quite good in this regard, while nvidia haven't.



nvidia DOES support opensource

they actually need kernel features to make this work properly

From what i understand, the main issue with nvida freebsd amd64 driver was due to kernel code.

There is a great nvidia driver for freebsd i386 and there should be an amd64 driver soon (2-3 months)

If i understood things correctly there was a lot of issues that needed to be resolved at the kernel level before they could finish the driver and that was up to the freebsd kernel team....but i may be wrong.

http://wiki.freebsd.org/NvidiaFeatureRequests
http://www.nvnews.net/vbulletin/showthread.php?t=41545

and personally the nvidia drivers on linux are 10 times better than the ati drivers....i'm sure the same will be true for freebsd eventually


----------



## aragon (Jun 27, 2009)

wonslung said:
			
		

> nvidia DOES support opensource
> 
> they actually need kernel features to make this work properly
> 
> ...


I know all that.  What I meant is that they don't support open source in the manner of providing open source drivers or hardware documentation so that the community can develop open source drivers.  All their "support" is in the form of closed up binaries.


----------



## wonslung (Jun 27, 2009)

aragon said:
			
		

> I know all that.  What I meant is that they don't support open source in the manner of providing open source drivers or hardware documentation so that the community can develop open source drivers.  All their "support" is in the form of closed up binaries.



ahh
yah, i getcha....

I still think nvidia drivers work better on linux than the intel or ati drivers, but yah, there ARE both open and closed source binaries for ati

so i totally see what you mean.


----------



## oliverh (Jun 27, 2009)

>I still think nvidia drivers work better on linux than the intel or ati drivers

They suck less. Anyway I don't like the business model of nVidia with legacy drivers and so on, it's a only mess in open source operating systems.


----------



## wonslung (Jun 28, 2009)

to be fair the linux nvidia driver is QUITE good.  ESPECIALLY for hd video

hopefully the amd64 nvidia driver will be as good when it comes out


----------



## Oko (Jun 28, 2009)

wonslung said:
			
		

> nvidia DOES support opensource



Could you be so kind to provide a link to the documentation for their hardware. I didn't think so. How would you be able to write a professional graphical application for their hardware if you do not know specifications. You wouldn't. You just need that binary blob crap to play video games. I know, I know... 

5 years old Tezro graphics station made by SGI which you can probably get on Ebay for 5K is 100 times better than anything NVidia will be able to produce in next 10 years. There are people around here who did more than just playing moronic games with their computers.

For the record NVidia binary blob drivers are huge security risks.


----------



## wonslung (Jun 28, 2009)

If i was playing games with my computer i wouldn't be using freebsd.  If you had read the rest of the thread you'd know that we just had a slight misunderstanding, no need to get snippy.

And to be fair, my Nvidia cards do fine.  I mainly use them for hd movies and 2d stuff anyways but i am not unhappy with them in the least.

and why the hell would i pay 5k for a used tezro? seems crazy.


----------



## Oko (Jun 28, 2009)

wonslung said:
			
		

> and why the hell would i pay 5k for a used tezro? seems crazy.



In order to make special effects for the newest Star War movie I am directing which you will be able to watch in HDD using your crappy NVidia video card


----------



## wonslung (Jun 28, 2009)

the questions wasn't why would you pay 5k for one.
But i'm sorry Mr Lucas.


----------



## oliverh (Jun 28, 2009)

wonslung said:
			
		

> If i was playing games with my computer i wouldn't be using freebsd.  If you had read the rest of the thread you'd know that we just had a slight misunderstanding, no need to get snippy.
> 
> And to be fair, my Nvidia cards do fine.  I mainly use them for hd movies and 2d stuff anyways but i am not unhappy with them in the least.
> 
> and why the hell would i pay 5k for a used tezro? seems crazy.



If I would play such games, I wouldn't even try Linux. And instead of using Windows I would buy some Playstation. I'm using open source to get rid of companies like nVidia. I wouldn't even support a blob in the kernel, but well that's just my opinion.


----------



## wonslung (Jun 28, 2009)

i don't see the big problem with closed source stuff if it's not horrible.  I can see why it would be nice if it was completely open but at the same time i don't see it as being "wrong" or "evil" for being closed.


----------



## Oko (Jun 28, 2009)

wonslung said:
			
		

> i don't see the big problem with closed source stuff if it's not horrible.  I can see why it would be nice if it was completely open but at the same time i don't see it as being "wrong" or "evil" for being closed.



How do you know that isn't horrible if you can't see the code.
How do you know that NVidia binary blob driver is not just collecting private information about you and that NVidia people are just waiting for an opportunity to get all money from your bank accounts?

There is nothing wrong with charging for code. You want pay out for your work investment. There is nothing wrong with licensing your software under any license you like even the one like GPLv3 which expect you to become a communist before you can use their code. However, there are so many things that are wrong with the close source concept. Close source concept if fundamentally wrong! 


I happen to be a mathematician. Could you imagine me stating theorem in one of my papers and then saying that the proof is closed source and I can not show it to you? That is just laughable. 

There is not such a thing as close source scientific/engineering
activity. Close source in computer science is code word for lack of competence, poor work, and hidden agenda.It is as simple as that.


----------



## wonslung (Jun 28, 2009)

Oko said:
			
		

> How do you know that isn't horrible if you can not see the code.
> How do you know that NVidia binary blob driver is not just collecting private information about you and that NVidia people just wait for an opportunity to get all money from your bank accounts?
> 
> There is nothing wrong with charging for code. You want pay out for your work investment. There is nothing wrong with licensing your software under any license you like even the one like GPLv3 which expect you to become a communist before you can use their code. However, there are so many things that are wrong with the close source concept. Close source concept if fundamentally wrong!
> ...



i guess i'm just not that paranoid.  If it works for what i need it to do, i am not worried. Your math analogy is an apples to oranges comparison though.


I am not a programmer, so even if i COULD see the code i'd have no idea what i was looking at and would still have to rely on another group or person to tell me it's not "horrible"

But you know what i meant when i said it's not horrible anyways, you are just trying to turn this into an argument.  I am a fan of opensource but i do NOT believe all closed source projects are evil, terrible or wrong.  I could just as easily make an argument for why the BSD license isn't as fair/good/right as GPL3.  I don't BELIEVE that but you see what i'm saying.  I personally can see valid reasons for closed source and open source projects. I applaud companies and originations that are opensource but I do not condemn them just for being closed either.

ANYWAYS we're getting WAY off topic here.  It's honestly really silly to turn my comment into this.  If you want to start another thread about closed source vs open source, i'll be glad to explain my position but i'm through arguing it in this thread, which is supposed to be about 32 vs 64 bit FreeBSD


----------



## DrJ (Jun 28, 2009)

Oko said:
			
		

> There is not such a thing as close source scientific/engineering activity.



I don't agree with this.  In fact, unless there is a patent filed (and hence it is disclosed) many scientific and engineering activities are entirely closed.  My area is in biotech instrumentation; other than the patents there's often nothing published about those instruments at all.  You certainly don't get the source code to the programs that operate the instruments.  Same for traditional biotech production: that is all a trade secret.

Now I grant that there is a huge academic and quasi academic community that publishes their results in the open literature, and I'm starting to do so with some interesting novelties that are not patentable.  But it really is a stretch to claim that there isn't closed-source science or engineering.


----------



## DutchDaemon (Jun 29, 2009)

There is about to be a closed thread, however ..


----------



## Oko (Jun 29, 2009)

DrJ said:
			
		

> My area is in biotech instrumentation; other than the patents there's often nothing published about those instruments at all.  You certainly don't get the source code to the programs that operate the instruments.  Same for traditional biotech production: that is all a trade secret.



I guess our opinions are influenced by the fields in which we work.

Computer assisted proof of mathematics theorem aided by a close source program or even worse non scrutinized algorithm is just unpublishable in a serious Mathematics journals. I am not saying that you will not be able to find journal which will accept such paper. I am just saying that I could not care less for such papers and journals. 

Let me put more bluntly. Any biology paper which claims new results using bio-tech instruments for which you can not provide specification and code IMHO is not admissible peace of scientific work. 

There is a fantastic paper on that topic by Fields Medalist Sergei Okounkov published couple years ago in Notices of American Mathematical Society.

I guess an analogy in C.S. would be a having a binary blob on your firewall machine. People are doing it but ask serious people like Theo what they think about it. 

Sorry Dutch for this way off topic comment. 

Oko

P.S. Doc, you also mentioned the topic of open publishing which is completely different thing. Some people, me included, believe that knowledge should be available at no cost to anybody. In particular, I am appalled by text-books which are sold for $100 out of which usually only $5 goes to author of the book who probably also prepared the book in electronic format. The price of printing is probably no more than $2-$3 which means that 90% of the price of a text book is just profit for publisher. That topic is far more controversial and is really subject to debate.


----------



## DrJ (Jun 29, 2009)

Oko said:
			
		

> Let me put more bluntly. Any biology paper which claims new results using bio-tech instruments for which you can not provide specification and code IMHO is not admissible peace of scientific work.



I wouldn't go that far.  You must of course run standards and get known results, and keep the gizmo calibrated.  It must also operate on sound technical principals.  And the specifications are known.  The code that runs them uniformly is closed.  All of them.  With your position there would be no publication in chemistry or biology.  None. 



> P.S. Doc, you also mentioned the topic of open publishing which is completely different thing.


I meant something a bit different.  Publishing in the open literature is a term of art that means it has gone through the traditional peer-review process, and is available to the public.  It counts as a public disclosure for patent purposes.



> Some people, me included, believe that knowledge should be available at no cost to anybody. In particular, I am appalled by text-books which are sold for $100 out of which usually only $5 goes to author of the book who probably also prepared the book in electronic format. The price of printing is probably no more than $2-$3 which means that 90% of the price of a text book is just profit for publisher. That topic is far more controversial and is really subject to debate.



Dutch, if you want to break this into another thread, that's fine with me.

Publishing is very expensive.  I can assure you that 90% of the cost of a textbook is not straight profit.  There is the advance to the author, the distribution costs, junking titles that don't sell, editorial review and a whole host of other expenses.  It just is not that profitable a business.

It is even worse at the journals, though.  Those are incredibly expensive, and they don't even pay their peer reviewers (ask me how I know).  Unlike an academic institution, where this expense is buried in a Prof's salary, I essentially bear the cost of reviewing out of my own pocket.  I review for journals that do not even allow me complimenary access to the underlying journal!  The Royal Society is the worst in this regard.


----------



## Oko (Jun 29, 2009)

DrJ said:
			
		

> Those are incredibly expensive, and they don't even pay their peer reviewers (ask me how I know).  Unlike an academic institution, where this expense is buried in a Prof's salary, I essentially bear the cost of reviewing out of my own pocket.  I review for journals that do not even allow me complimenary access to the underlying journal!  The Royal Society is the worst in this regard.



Well, I do know what are you talking about. I said that open publishing is much more controversial idea. I got $50 for reviewing 300 pages textbook. With Journals the situation in mathematics is probably better than in other fields. Of course you will get $0 for being reviewer but at least you get a copy of Journals. 

My friends who are astronomers have to pay out from their grants to the publishers of some Journals to publish their accepted and per-reviewed papers. That is just the standard in their business.

I guess it really depends a lot from field to field. The cost of doing mathematics (where I work) is just buried in our salaries which are largely paid by tax payers and tuition money. It is as simple as that.


----------



## DrJ (Jun 29, 2009)

Oko said:
			
		

> I guess it really depends a lot from field to field. The cost of doing mathematics (where I work) is just buried in our salaries which are largely paid by tax payers and tuition money. It is as simple as that.



It is more that you work at an academic institution, and service (for which this counts) is part of the academic expectation.  I have to eat what I kill (as it were) so if I'm not paid for something, then I am not paid.  There is no salary that covers it.


----------



## DutchDaemon (Jun 29, 2009)

I think we're done with the 32-bit/64-bit topic, and I believe the open/closed source dichotomy (when it comes to software, at least) has been done to death already. I'll leave this thread open for some closing arguments, gentlemen, but that'll be it


----------



## wonslung (Jun 29, 2009)

i'm a big fan of both the 32 bit and 64 bit FreeBSD

I tend to use the 64 bit more though because of ZFS.

I think if you don't mind using linux-compat for flash, and don't need 3d video or wine 64 bit freebsd is fine.


----------



## harishankar (Jun 29, 2009)

Has anybody done video encoding editing on both platforms (i386 as well as AMD 64)?

Can anybody tell me if the performance difference is significant? Does the 64-bit version utilize the CPU's features better?


----------



## oliverh (Jun 29, 2009)

harishankar said:
			
		

> Has anybody done video encoding editing on both platforms (i386 as well as AMD 64)?
> 
> Can anybody tell me if the performance difference is significant? Does the 64-bit version utilize the CPU's features better?



Of course not, buy some multicore cpu and find software which utilizes it.


----------



## harishankar (Jun 30, 2009)

oliverh said:
			
		

> Of course not, buy some multicore cpu and find software which utilizes it.



My laptop is 64-bit, it uses Intel Core 2 Duo 1.7 GHz processor.


----------



## kungfujesus (Jun 30, 2009)

Last I checked, 8 was nearing completion and contained the features necessary for nvidia to code a 64 bit driver.


----------



## DrJ (Jun 30, 2009)

kungfujesus said:
			
		

> 8 ... contained the features necessary for nvidia to code a 64 bit driver.



Not all of them have been incorporated yet.  Ed Zander at nVidia speculates it will be a few weeks yet before that happens.  Then nVidia has to complete its driver (and much of it works now).


----------



## aragon (Jul 17, 2009)

DrJ said:
			
		

> Good luck with that.  I'd bet an alpha version of the nVidia driver is out in two months, maybe three.  3D on ATI I'd guess is a year or two off.  Personally it does not matter to me, but I have found the nVidia driver to be very good.


The ATI drivers might be ready sooner than you think.


----------



## polishdude (Sep 17, 2009)

Hi,
 I wanted to setup DVR/CCTV (eg zoneminder) and server (apache/sql/ftp/etc)
I have found 2nd hand 64bit pc, much cheaper etc. So my question is (after reading all of this posts . ..   ) 
if ZoneMinder is for 32bit, can I compile it on the 64bit machine and run it? I think i can ,but then it won't be using the full 64bit ?

CCTV requires lots of processing power, and i found cheap dual core 64bit, so i though why not? . . .
Pls advise, i have never run even seen 64bit chips!

thank you!


----------



## overmind (Mar 16, 2010)

*32bit OS vs 64bit OS*

*[ thread merged in - Mod ]*

Hello

I'm just about to install a FreeBSD on a server that would never have more than 4GB of RAM.

I am interested in arguments why is better a 64 bit OS (as a database and web server), rather than 32 bit. I will go for 64 bit, but are there any advantages (huge performance increase) on 64 bit over 32?

I know that 64 is better because:
- I can use more than 4GB of RAM
- I's faster but by very little (I've done some benchmark for kernel compilation on both cases and (intel atom 330: make -j4, on i386 I got 1948 seconds and on amd64 I got 1926 seconds).

Are any arguments on choosing 64 bit except the following ones?
- 64 bit is newer (cooler)
- I use Video/audio encoding or graphic processing that make use of 64 bit.

I've read somewhere a post by a FreeBSD port maintainer that said that many FreeBSD AMD64 application from ports (this fact is also true on Linux) are taken from i386 source and make to be compiled and run under 64 bit but the cod do not make use of 64 bit features, so that's why is not faster.   Those aps should probably be rewritten from scratch to make use of 64 bit.

That's what I've read, I want to learn more about this topic, what is your opinion regarding 64 bit over 32.  From now on I'll probably install only 64 bit OSes but I want to know if I can make better use of them.

thanks


----------



## oliverh (Mar 16, 2010)

>I am interested in arguments why is better a 64 bit OS (as a database and web server), rather than 32 bit. I will go for 64 bit, but are there any advantages (huge performance increase) on 64 bit over 32?

Search the forums, the web ... there is no absolute answer, just try it and if you don't experience any disadvantages stay with it, otherwise ...


----------



## Ghirai (Mar 16, 2010)

One advantage of running on amd64 is that there are twice as many general purpose registers available, the the're twice as big as those on i386.
The obvious disadvantage to this is that pointers are twice as big, but this is not really an issues unless you have very little ram.
I'd say that if you have more than 1G of RAM, and you don't have any special reasons to do otherwise, use amd64.



> I've read somewhere a post by a FreeBSD port maintainer that said that many FreeBSD AMD64 application from ports (this fact is also true on Linux) are taken from i386 source and make to be compiled and run under 64 bit but the cod do not make use of 64 bit features, so that's why is not faster. Those aps should probably be rewritten from scratch to make use of 64 bit.



Unless you're writing assembly, the compiler should know how to use and take advantage/optimize for the target architecture.


----------



## overmind (Mar 16, 2010)

The only disadvantage I've found on 64bit was not properly working as desktop (nvidia drivers), but that was solved. There might be some apps in ports that are not working on 64 bits, I don't know.

I did some google/forums research but I could not came to a conclusion. I've seen some benchmarks 64 vs 32, for usual apps performance improvement is very little. Somebody was asking (himself) on a forum why now when all hardware supports 64 bit (even intel Atom), there are a lot of users that still use 32 bit.

Ghirai@ I'll use your advice, I'll go for 64. I've been using FreeBSD 64 bit on a server for a year now and I had no problem with it (Apache,PHP,MySQL).

oliverh@ >there is no absolute answer        I want to know what you guys think of that topic (which is best for you and why?)


----------



## oliverh (Mar 17, 2010)

@overmind, usually I hate it doing other peoples homework:

32-bits vs 64-bits -- thoughts, issues, etc.: http://forums.freebsd.org/showthread.php?t=4916

And there are many more ...

[ threads merged - Mod ]


----------



## ckester (Mar 17, 2010)

OK, this thread has established that most apps will work on amd64.  And it was always a given that amd64 gets you access to more memory.

It seems to me that the only remaining open issue(*) is performance. But nobody's offered any hard data from benchmark testing or otherwise.  A couple of commenters have observed that the performance difference seems negligible; can that be fleshed out with more data?

(* Not counting, of course, the diversions into open vs closed source and other irrelevant stuff.)


----------



## webtc (Apr 7, 2010)

> The only disadvantage I've found on 64bit was not properly working as desktop (nvidia drivers), but that was solved. There might be some apps in ports that are not working on 64 bits, I don't know.



so just to clarify, Nvida drivers are now 64bit compliant? or they still dont work? if not do ATI drivers work? I just ask because Im anout to get a new video card and was under the impression that there was still no 64 bit support for either?

Thanks


----------



## fronclynne (Apr 7, 2010)

webtc said:
			
		

> > The only disadvantage I've found on 64bit was not properly working as desktop (nvidia drivers), but that was solved. There might be some apps in ports that are not working on 64 bits, I don't know.
> 
> 
> 
> ...



ATI driver works fine here (8.0 amd64)
	
	



```
ATI Technologies Inc RS690M [Radeon X1200 Series] rev 0,
```
x11-drivers/xf86-video-radeonhd (& -devel) lock up for me, but the ol' radeon driver from x11-drivers/xf86-video-ati works fine, & if you set WIHOUT_NOUVEAU=yes the newer Mesa stuff actually provides some 3d accel.


----------



## volatilevoid (Apr 7, 2010)

webtc said:
			
		

> so just to clarify, Nvida drivers are now 64bit compliant? or they still dont work? if not do ATI drivers work? I just ask because Im anout to get a new video card and was under the impression that there was still no 64 bit support for either?
> 
> Thanks



They're working! I'm running amd64 with a GeForce 8800 GTS G92 here.


----------



## expl (Apr 8, 2010)

volatilevoid said:
			
		

> They're working! I'm running amd64 with a GeForce 8800 GTS G92 here.



Ye, and now there is a second release fixing some major issues with new Nvidia cards on amd64.


----------

