Monday, August 30, 2010

64 Bits Bytes

Sad day for an idea and a couple of days of intense work.

I realized that the computer system I built about a year and a half ago had some capability that was not being used.  That is, that the processor in the system was capable of running a 64-bit operating system, but I was running a 32-bit version of Gentoo Linux on it.  There really are two main reasons why one would want to run a 64-bit OS:  First is that the amount of memory that can be addressed can be more than 4GB (the address registers are larger).  Second, there are registers and operations within the processor that can handle 64-bit-wide numbers, and this can potentially speed-up certain software.  While the additional memory support would not have immediately helped me, I figured that having 64-bit operations would.  I also considered the idea of turning the entire system into a host for virtual machines, so I could run several systems simultaneously, and figured that the 64-bit support in the OS would help with that.

Those who have installed a 64-bit version of the Windows operating system probably understand that going back and forth is not as easy as flicking a switch or checking a box.  Because the operating system (OS) itself and all the associated programs need to be aware of the increased address space and the additional processor registers, the entire OS needs to be replaced...which means, essentially, rebuilding the OS.  In the case of Gentoo Linux where everything is compiled from scratch, this is an involved operation.  I was also doing this on my main computer system that is my server, Internet gateway, and orchestrates much of the home automation and network support I use.

So in the space of a couple of days, I had to analyze how my system was configured and what software needed to be recompiled, recompile all the software, copy all the configuration settings to the new configuration, and test it out.  I knew this would take a few days, and I would likely run into some problems, so I also purchased a new hard disk to build everything onto (that would become the new system disk).  Needless to say, this turned out to be a lot of work.

The proverbial fine print that you read over and over in your mind is that while 64-bit operating systems have great potential, there is also the potential for software that was not designed to work in a 64-bit environment to fail miserably.  Windows users are familiar with this as well.  Everything seemed to work fine for me until the very last application that I went to test:  wine.  Wine is a piece of software that allows Windows applications to run natively under Linux.  I have one such application that is very important to me, and that is Quicken...an old 32-bit version of Quicken.  So not only did I need to run a Windows application under Linux, and that application was 32-bit, but also wine needed to be compiled as a 32-bit application using special software libraries designed to handle the translation.  This is where everything fell apart -- wine didn't even compile.  Unfortunately the people who coordinate the Gentoo Linux project simply have not sufficiently tested 32-bit wine compiled on a 64-bit OS.  If I compile wine to support 64-bit Windows applications, then my old 32-bit Quicken doesn't run.  So after all that work, things have come to a complete standstill thanks to Quicken.

Yes, 64-bit operating systems can be a bitch.  With apologies to those at hak5, I don't "trust my technolust" right now.

That all said, it is likely that I will move forward with this project, but not entirely as planned.  Since almost everything works, I can essentially transition to the new operating system in a few days, if nothing else starts having problems.  In the meantime, I need to figure out how to get VirtualBox (virtual machine software) running.  If that works in 64-bit mode OK, and I can run a 32-bit virtual machine, then I could have a virtual machine running the old 32-bit Gentoo Linux thats sole purpose is to handle applications that won't work properly on the new operating system.  Will that actually work?  I don't know yet.  I also could move the 32-bit applications to an older computer system until I can come-up with a new plan.

On a more positive note, I did see a performance improvement with the new OS.  It was clear just from compiling the applications that the software was taking better advantage of the Intel Core2 processor's capabilities.  I also found several serious configuration errors, including a bug in one of Gentoo's system initialization scripts, that I was able to correct.  Unfortunately, the mad rush to get everything working has taken a mental toll and I could use a break from looking at this.  So a few steps back before hopefully moving forward again.

A more detailed explanation of what a 64-bit architecture means can be obtained from this article in Wikipedia:
http://en.wikipedia.org/wiki/64-bit

Likewise this article in Wikipedia explains virtual machine technology in detail:
http://en.wikipedia.org/wiki/Virtual_machine

No comments: