Monday, June 15, 2009

Two Things I Learned This Weekend

I recently started working with a "new" computer at work. I'm not sure how old it is -- we may have had it for a while -- but it has a 64-bit quad-core processor running at 3.2 GHz.

Those of you as old as I am may remember that the desktop computers of the early 1980s had 16-bit microprocessors. The "16-bits" means that the computers could only access 216 ~ 64K of memory -- a paltry sum even then. Intel got around this problem for a while by using two 16-bit registers, offset by 4 bits, to enable access to 220 ~ 1M of memory. But everyone was grateful when Intel introduced the 80386 32-bit microprocessor, which offered addressing for 232 memory locations. How much memory is that? I remember asking this question myself at the time, and being assured that we would never, never have computers with that much memory.

Um . . . yeah.

Recently, I started working with data cubes that would exhaust the memory available to Matlab on a 32-bit machine. The data cubes are 1024x1024x224 memory locations large, each location consuming (I assume) about 4 byes. If my math is correct here, then the data cubes take up about 1 Gigabyte of memory. But for a variety of reasons, Matlab can't access that much memory on a computer running Windows XP, even if the computer has that much memory available. I've heard that Matlab running over Linux doesn't have this problem, but I don't know why.

The new 64-bit computer contains 8G of memory, which makes working with these data cubes possible. And with four execution cores, the processor allows me to run my time-consuming algorithms and still check my email while I wait.

But I noticed something last Friday about the performance meter on the computer. It looked like this:

Notice how it has four different graphs under "CPU usage history". Those show the CPU usage for each of the four processor cores. But it occurred to me that I hadn't noticed this on my own personal laptop, even though it had a "Core 2 Duo" processor. The performance meter on my laptop had only one graph. So Saturday, I tried to discover why.

In the process of googling around, I observed that people referred to the processor entry in the device manager:

Notice how there are four entries under processor, one for each core. But my device manager had only one processor listed.

I tried to see if there were any driver updates that I needed, but there were not. So finally I started a chat session with Dell tech support. (I love Dell. I can still get live tech support on a computer that is 2 1/2 years old.)

The Dell guy had me force driver updates, but these ultimately had no effect. Then he had me check my BIOS, and lo and behold, it turns out that "multiprocessor support" had never been enabled in the BIOS! I had never had occasion to mess with the BIOS since I bought the computer second hand two years ago. Who knew that the BIOS wouldn't be set to allow me to use both halves of my processor!

After enabling multiprocessor support, I now had two processors showing up in Device Manager, but still only one CPU graph in the performance meter. To fix that, I then had to do a "repair install" of Windows. (A "repair install" lets you keep your file system and applications, while a "clean install" erases them.) Since my installation media was Windows XP Service Pack 2, while the present version of XP is Service Pack 3, I spent the better part of the evening downloading and installing the updates. (And I'm still not done.)

Bleg: has anyone else had problems with Internet Explorer 8? Internet Explorer supports 3rd party "add-ons" for various applications, but these add ons generate a warning message at the top of the browser window telling me that add-ons have been disabled for one reason or another. I'm not sure why this is, and I couldn't fix it, so I eventually reverted to IE7.

I was talking to Mrs. Φ about all this when she asked me some questions about the history of Intel processors. It seems like Intel processors used to be so simple (386, 486, Pentium), but there are now so many variants out there that it's impossible for a casual observer like myself to keep them straight.

For instance, in oourse of solving the issue of the core count, I observed that my laptop has a "T7200" processor. What does this mean? When I looked it up, I discovered that it was a 64-bit processor. I checked my wife's desktop: it had a E4400 processor, also 64-bits. Who knew! I had always assumed that they were both 32-bit processors; after all, they came on computers running the 32-bit versions of XP and Vista, respectively.

But my computer has only ("only" - ha!) 2GB of memory, so I don't really need the extra addressing a 64-bit computer would provide. Would there be any other reason to upgrade Windows to 64 bits? What would that do to all my (presumably) 32 bit applications I have installed? I'm pretty sure that going from a 32-bit operating system to a 64-bit operating system would require re-installing all my apps; a look at my "programs" directory tells me this would be a significant headache. But I don't know any performance-related reason why I should worry about it. Anybody?

6 comments:

trumwill said...

Do not, under any circumstances, update to Windows 64-bit. My employer knows a thing or two about the Windows OS and it is avoided around here like the plague. More than a couple pplications that work on 32-bit processors often won't on 64. Drivers are similarly problematic. Unless you work with applications that require an upgrade, it is not an upgrade.

Brandon Berg said...

Virtually all processors sold in the last few years have had 64-bit support.

I haven't had any problems with 64-bit Windows*, but there are really only two reasons you'd want to upgrade: Either to use more than about 3.5GB of RAM (for reasons I don't remember, 32-bit Windows can't actually use a full 4GB), or to run an application that's only available in 64-bit or which has a 64-bit version that performs better than the 32-bit version.

*Granted, my hardware's fairly newish. As Will points out, some older hardware may not have 64-bit drivers available.

Burke said...

Trumwill: when you say "32-bit processor", did you mean "32-bit OS"? Because I was under the impression that the OS made the microprocessor invisible to the application.

For instance, I use Matlab code developed by our physics department that must be run on one of our "32-bit servers" through which we can connect from home via a virtual private network using Windows Desktop Connection. But that server turns out to be (I just checked) a Xeon 5130, which is a 64-bit architecture. How many apps care about the architecture irrespective of the operating system?

Burke said...

Brandon: is there a 64-bit version of Linux, and, if so, is the driver support for it more widespread than for 64-bit Windows?

I wonder if I was running Matlab over Linux, if the Physics Department code would still care if it was 32-bit or not.

trumwill said...

Phi, you're right, I meant the 32-bit OS. They will work fine on a 64-bit processor that's running a 32-bit OS. I've been running a 64-bit processor at home for years and there were never any problems.

Our problems at work are not just with drivers but with applications as well. And stability running applications that will run. Of course, our setups here can be pretty odd, so maybe in typical use it's not a big deal. Even so, unless there's something specific you need to do, I'd strongly recommend against upgrading.

Brandon Berg said...

Φ:
There are 64-bit versions of at least some Linux distributions, and I assume of most of the major distributions.

Driver support is not one of Linux's strong points. If there's no Windows driver, there probably won't be a Linux driver.