Wednesday, March 07, 2012

A plea to 64-bit Linux users

Please do the following:
  1. Head to the Dolphin SL viewer web site.
  2. Download the Linux viewer (there's what I presume is an RPM file for OpenSUSE, and a gzipped tar file for other distributions) and run it.
  3. Go back to the web site and respond to the "I'm on 32-bit Linux"/"I'm on 64-bit Linux" poll.
I doubt that you can even buy a new x86-based computer these days that doesn't have a 64-bit processor; peeking at newegg.com, one sees the majority of the netbooks on sale have 64-bit CPUs.

There are a bunch of us running 64-bit Linux out there; Ubuntu Community documentation says that unless you have some special reason to run 32-bit Linux, run 64-bit Linux. and I suspect people are following that advice--including non-geeks. Canonical, for example, is working hard on giving Ubuntu a user interface that will appeal to the average user, and while geeks like me don't care for Unity and despise the arrogant, high-handed approach that the GNOME 3 developers are taking, I have to admit that usability is at least their stated goal and respect the work being put into it.

Unfortunately, with the exception of Imprudence (and someday, Kokua?) and omvviewer, the latter not having updated their Ubuntu PPA since Lucid Lynx, the SL clients for Linux are 32-bit. Running them requires not only the ia32libs packages, but hackery to put 32-bit gstreamer libraries in place if streaming media are to work--and remember that non-geek portion of the Linux user population? They aren't going to go to that trouble, and will probably just blow off Second Life.

64-bit mode does have advantages. The x86 architecture is infamous for having a limited, highly non-orthogonal register set. For those whose response to that is "Huh?", a brief explanation:

The 32-bit x86 (80386 and newer) CPUs, or 64-bit x86 CPUs in 32-bit mode, have the following integer registers (a register is a place in the CPU that holds a value, upon which one can do various operations (add, subtract, and the like); the CPU can access the registers faster than anything else in your computer): EAX, EBX, ECX, EDX, ESP, EBP, ESI, and EDI. That's eight altogether.

ESP and EBP have dedicated uses to keep track of memory allocation and function calls; they can't be used for anything else, so in practice you just have six... and every single one of them is magic--that is, there are x86 operations that can only work with values in that particular register. That limitation is why we call it non-orthogonal, and it means that a lot of x86 code is taken up with moving a value into the magic register it needs to be in for a particular operation that the program has to perform. The limited number of them means that a lot of x86 code consists of moving values between them and memory, which is a lot slower to read or write.

Compilers try to minimize these moves wherever they can by evaluating expressions into the registers they know the results will have to be in for the next operation, but they can't get rid of them all.

In 64-bit mode, x86 processors have eight additional integer registers, and all sixteen of the registers (eight old and eight new) can hold 64 bits of data and can operate on 64 bits at a time. They can also use a register we haven't mentioned yet, IP (the "instruction pointer") to reference memory, which makes what's called "position independent code" easier, and simplifies access to tables of constants.

All this leads to a performance improvement--how much depends on what you're doing. That Ubuntu Community page points at a Phoronix study that showed no loss, and some respectable gains, in performance with the move to 64-bit code.

So... [pauses to catch her breath] there really should be a 64-bit Linux SL viewer. With that poll, Dolphin appears to be listening... and this is a kind of innovation that LL hasn't forbidden, at least not yet. Please let them know you're out there.

UPDATE: I took my own advice. The Dolphin Viewer 3 worked very nicely for me!

No comments: