Measuring power consumption of appliances, update

Just under a year ago I purchased a Mains Power meter, as described in a previous post. It did cause me a little concern, because the voltage reading was quite high - up to 270-290 volts sometimes, instead of 240 or so, which meant it was way out of calibration. I exchanged it with another one which only read a little high - it’s reporting 254 volts as I type this. It means that it was probably reading around 20% higher than its actual usage. I thought I would give you some updated power figures, as well as show you the difference in consumption of the older Athlon XP system, compared with a newer, Core 2 Quad system that is its replacement.

For my system, I have updated it a little since the previous post. It now has a TV tuner card, 2GB of DDR2-6400 memory, and is clocked at 2.76GHz, a bit higher than previously. I have also scored a UPS, which the PC, modem, router and the backup server are now plugged into.

Some updated readings:

My Core 2 Duo PC:

On, running folding@home, screen on: 120W
On, idle, screen on: ~110W

These readings are really just estimates, as the power meter’s readings just keep fluctuating anywhere from 104 to 129W. It is also clouded by the fact that the UPS is plugged into the power meter, playing havoc with the results. when the PC is off, it can still show a power draw of around 70W, with just a modem, router and a standby server running off it.

Athlon System:

On, folding@home running: 150-160W
On, idle: 148W
On, idle, screen off: 130W

Core 2 Quad Q9300 PC, nvidia 7200GS, all at stock speed:

On, folding@home running: 130W
On, folding@home running, screen off: 106W
On, idle, screen off: 64W

You can see what a difference a few years and processor generations makes. I also recently purchased an nvidia 8600GT graphics card for the Quad box, to boost its folding output with the GPU2 client. I chose a relatively low-power drawing card, as I am conscious of how much juice it uses.

Core 2 Quad Q9300, nvidia 8600GT, all at stock speed:

On, folding@home SMP (CPU) client only running: 133W
On, folding@home SMP and GPU2 clients running: 143-151W

I was pleasantly surprised. The faster video card, running the folding client, consumed only around 20 Watts more power than an idle 7200GS. Quite a good result for an extra 1400 points per day in folding production, in terms of performance per watt.

While I was in the mood, I though I’d re-test the home theatre setup. The only difference here was that the video player has been unplugged, since it is no longer used.

Home Theatre:

All on standby: 16W
All on standby, HD Set Top Box on: 31W
TV and STB on: 146W*
TV,STB, receiver on: 120W

* The figure for the TV and STB on was curious. since there was no signal to the TV, it was displaying the blue background and power usage went up. Once a signal went to it from the receiver, usage dropped.

Folding@Home performance fix for Ubuntu

For a number of years now, my PC has never sat idle. Its every operating moment has been spent running flat out, looking for a possible cure for cancer, Alzheimer’s disease, Parkinson’s disease and many others. This has been done by running the Folding@Home program. It sits in the background, using any spare CPU cycles that aren’t being used by any other programs you are running. It downloads some data from the servers at Stanford University, processes it, running simulations on protein folding, then uploads its results back to Stanford. It is a great cause, made a little more interesting by the awarding of points for every work unit your PC processes. These points introduce an element of competition - trying to out-produce fellow folders and make your way up the leaderboard. There are teams as well, with their own rankings. I am currently folding for the Overclockers Australia team - currently ranked number 2 in the world and trying to hold onto that spot and make a move to regain number 1.

If you feel like joining, you are more than welcome. Just enter Team 24 when you are setting it up!

Aaaanyway, after updating my system earlier in the year, I noticed my points production had dropped off. What had happened, is that the CPU was not running at full speed: it was throttled back to its slower idle speed. A little fishing around the web turned up this forum thread at techreport.com. It turns out that the CPU speedstep function on was on, with the multiplier dropped back to 6, not 7 (in my case with an intel E6300). The operating system’s frequency scaling control was not treating the folding client as an ‘important’ enough process - it was ignoring the ‘nice’ processes by default. To find what speed the system is running at, open a terminal prompt and enter:

cat /proc/cpuinfo

A bunch of info will come up - look for the cpu MHz field and see if it is the speed it should be. The other way is to install the CPU frequency scaling toolbar applet in Gnome - I have done this and can see at a glance if the cores are running at full speed or not.

To let the frequency governor include ‘nice’ processes, a flag has to be set, as the root user:

sudo su
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
exit

For a dual- or quad-core machine, you may have to do this for all cpus - cpu0, cpu1, cpu2 and so on. An example for the second core:

echo 0 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/ignore_nice_load

Note that I only had to set it for the first CPU (cpu0) and the other one changed as well.

To make this change permanent, instead of having to re-enter the above commands after each boot, there are two methods, only one of which worked for me. The first method, which did not work, is to add the echo 0 > … line to the /etc/rc.local file, before the line “exit 0″. This did not work for me, as I found out after rebooting.

Instead, I used the second method, found in this thread at the ubuntu forums, involving changing a setting in the Gnome Configuration editor (found under the Applications -> System Tools menu):

Open gconf-editor, go to /apps/gnome-power-manager/cpufreq
and check box consider_nice.
Takes effect immediately.

I believe that the setting in gconf-editor was overriding the setting in rc.local, so it never took effect. After changing that, my system has been happily folding away ever since.

New linux flash player 9 update a dud

Lately I had been having trouble on flash-based websites where things just wouldn’t display properly - sometimes a screen would come up with the flash content, then just go blank. I was a little puzzled, but thought it more of the usual ‘not tested on linux/firefox’ issues from the web developers. But then it just started getting silly, and looked into it a bit. I remembered that a few weeks back, an update was available for the flash plugin (in ubuntu, the package is called flashplugin-nonfree) that upgraded from 9.0 r48 to 9.0 r115.

Turns out that most of the problems stemmed from that. In a thread in the ubuntu forums, it is stated that the current flash release is still pretty buggy. Kilz from the ubuntu forums has created a script that installs the plugin with the nspluginwrapper, for running in 64-bit installations. The thread in question is here. I tried it, first uninstalling the current plugin using the synaptic package manager, then ran the script. I now have the 9.0 r48 version, and it everything is running fine again.

Damn Adobe Flash - the majority of my linux usability problems have centred around getting the damn plugin to work in browsers at all, then to actually work properly. I can’t wait for the Gnash project to have a viable replacement up and running so I can dump Adobe’s product for good.

Desktop OS in 64K - GEOS

Over the last weekend I had a sudden attack of nostalgia for the Commodore 64. I have fond memories of the thing, having one for my first computer. I remembered how there was an operating system available for it that was able to show a graphical desktop, with icons and all, a WYSIWIG word processor, even a spreadsheet, in only 64 kilobytes of memory. It was amazingly tightly coded, and such a difference from today’s software that needs tens of megabytes to show a pissy icon in a system tray, for instance.

This operating system was GEOS, standing for Graphical Environment Operating System. An excellent article about it is here. I felt like having a bit of a tinker with it, relive some old memories. One problem though was I no longer had a C64 to load it on. However, emulators came to the rescue. For linux, I installed VICE, which is in the ubuntu repositories. To make it work though, you have to download the version from viceteam.org, that contains the ROM files that are not included in the ubuntu version. There are two ways of putting the ROM files in.

First, the way I tried, was to unzip the version 1.22 file from viceteam, and copy the ROM files into the installation directories (in ubuntu, it is /usr/lib/vice/). The ROM files are the ones without file extensions that live in the data directory in the zip file. They are named ‘kernal’, ‘basic’, ‘chargen’, and so on, and are in different subdirectories for different commodore models the program emulates. Once it is installed and the ROM files are in the right spots, you can start the C64 emulator by typing ‘x64′ at the command prompt. If all goes well, you will see the C64 screen come up in a window.

The second way, which I did not try, is to follow the instructions here for compiling the latest version of VICE.

Once you have the emulator running, you can download a copy of GEOS. Put the *.D64 files in a directory somewhere, and using VICE, choose the File -> Attach a disk image -> Unit #8 menu. Point it to the GEOS64.D64 file, and it should start loading. You can then marvel at the mid-1980’s computing experience. It is similar to the first Mac desktop, but was available for a fraction of the price.

There are other productive things you can do with the Commodore 64 emulator, too…

Measuring power consumption of appliances

UPDATED August 6, 2008: I have re-measured some of these values with a new meter, and also measured the power usage of a Core 2 Quad PC built to replace the Athlon box described below. See this post for more.

Today I bought a Mains Power Meter, model MS6115 from Jaycar Electronics. They finally arrived in stock - I’d been waiting for one of these since before Christmas of 2006. The principle of the thing is that it plugs into the power outlet, and you then plug an appliance (or appliances, if you use a powerboard) into the socket on the meter. Dan’s Data has reviewed one of these just recently - I suggest you have a look there for more detail than I will be able to provide.

I started testing a few things around the house to see how much juice they draw, and got a few surprises. First of all, the voltage it read was 290V - from a 230ish volt outlet. This was a bit curious. Plugging in a kettle and starting it off then gave me a maximum reading of 2984 Watts. Hmm. Switching over to the Amp reading screen showed it was pulling just over 10 Amps, which makes more sense.

Next to try was the home theatre setup, consisting of a 76cm widescreen CRT TV, high Definition set top box, dvd player, video recorder, receiver and 5 speakers plus a subwoofer (more info about the setup can be read in an earlier post). The results are as follows:

Home Theatre Power Consumption
All items on standby: 31 Watts
All items on standby, except set top box on: 43W
TV and set top box on: 172W
TV, set top box and receiver on: 197W

Wife’s PC: Athlon XP 2500+, running at 9x200MHz (1800MHz), Abit NF7-S, Radeon 9700, 19″ Samsung 930BF

PC and screen in standby: 37W
PC and screen on, idle at Windows desktop: 168W
As above, folding@home client running: 178W
As above, folding@home and 3DMark2001SE demo running at 1024x768, speakers on: 181W

Server: Pentium 233MMX
On, idle: 40W

My PC: Core 2 Duo E6300 @ 7x350 (2450MHz), Abit AB9, GeForce 7300GT, 19″ Viewsonic VX912

PC standby, server off, router (Netgear RP614) & Modem (Standard Optus Cable) on: 22W
PC on and idle, server on: 99W
PC on, idle, screen off, server on: 82W
All on, Folding@Home running: Max 99W (0.34A)
All on, folding, mythtv watching live TV, stereo on: 96W

That was a shock to see how much more power the older system used than my new dual core box, considering how much more powerful the Core 2 Duo is. It really shows the progress made in making new systems more energy efficient. I think the time may have come to upgrade the Athlon box…

Flash 9 player crashing in Linux? Try This

I was experiencing some annoying crashes of Firefox while viewing Youtube videos, or any other streaming flash-based video sites. I could watch video for a while, but if I hit the back button, or chose another video to watch, the browser would just lock up hard. Looking on the Ubuntu Forums came up with a few possible causes and solutions, but none really worked for me. Until I saw this post, where someone suggested that the onboard sound on the motherboard could be at fault. They disabled the onboard sound in BIOS, and the crashing went away. Re-enabling sound in BIOS caused the crashes to come back.

This person used the same sound chip that is in my Abit AB9 motherboard, the Realtek ALC-888. It looks like Adobe is having issues with Realtek chips. I tried disabling onboard sound on my system, and the crashes stopped for me as well. Fortunately I still had another sound card that I plugged into a free PCI slot - an old Aureal Vortex 2 - based card made by Videologic. Ubuntu booted up, detected the card and the thing worked straight away! Bloody impressive, if you ask me. Here was a card that I bought about a week before Aureal was swallowed up by Creative, meaning the last fully working driver set was for Windows 98. The card was only partly usable in Windows 2000 and XP, and yet Linux has given the thing a new life. I’m happy.

The only downside to this fix is that you will have to shell out for an external sound card if you don’t have one lying around. Maybe in the future Adobe will come out with a fix that lets the Realtek audio work, but until then this is the best fix, or rather, workaround, available.

Here’s an idea - a phone that translates languages

Today I thought of something that would be rather cool. It is probably not feasible yet, but given another few years of processor power increase for mobile devices, it could be. I’m thinking of a mobile phone that, after setting the speaker’s and the listener’s languages, could translate between the two.

It would record what you spoke, process the sentence - probably into text - then translate that sentence into another language. That translated sentence would then be sent to the earpiece of the person you’re talking to.

Some of the technology is here - speech recognition exists, with software like Dragon Naturally Speaking. That is one half of the equation. Translation tools exist - look at Google’s language tools. Text-to-speech synthesisers are easy, too, and are already in some phones I think - for reading out emails and text messages.

Problems? There are a few. It wouldn’t be able to translate on the fly - there would be pauses in conversation, like speaking with a human interpreter. This ties into the second problem - using Google’s translator, it often translates word-for-word, meaning sentences can be all out of order due to different language structures. Unless the translating algorithm can adjust sentence structure, it’s going to sound weird. It would also be part of the reason why it would have to listen to the whole sentence before beginning the translation.

Another problem would be potential market - who calls people who don’t speak their language? I guess the pauses would be quite off-putting to someone unfamiliar with what’s going on. Maybe it would need a little pre-recorded message at the beginning of the call letting the recipient know what’s happening. Anyway, it could have uses in emergencies, such as tourists in foreign countries trying to call an ambulance.

 I’m sure I’m not the only one who has thought of this, but it’s the first time it’s come into my head, anyway. The first example could be PC-based (maybe even using a VOIP service like skype). Even if the phone idea doesn’t work, just a dictation-style device, that speaks out what you just said into it (again, as a tool for foreign tourists) could be doable.

If it happens, hell, remember where you read it first. 

The little PC that could

One of the little PC related projects that I recently undertook was to do something about a backup strategy. I wanted something that I didn’t have to think about much; that would perform backups basically unattended. That pretty much ruled out burning stuff to DVDs - too tedious. I did that previously and ended up backing up stuff about twice a year. The other issue is I have two PCs to back up - my main one running Ubuntu linux, the other machine of Mrs Bort that dual boots into Windows XP and Gentoo linux. The second machine also has no DVD drive. The answer came down to three options:

  1. A tape drive. Expensive, I’d also need a SCSI adapter card to put in the machine and buy a bunch of tapes. While capacity would probably be OK, I’d have to get the drive up and running in linux, and if something were to happen to the machine with the tape drive (fire, for instance) I’d not have a way to get the data back without buying a new drive. I never really considered it as an option. 
  2. External Hard drive. I already have an external box, but I think the power connector is a bit flaky. Last time I used it the disk would spin up, down, up again. Wouldn’t really trust it. I’d have to buy a new disk drive, something big enough to hold what’s on two 250G drives (one in each PC). I then thought, well, if I have to buy a new disk, I could put it in…
  3. A linux fileserver, built from an old PC I had lying around. This is the approach I took, described below.

For sentimental reasons mainly, I still had the case that my first PC came in, a beige Arrow minitower case. Bought from the now defunct Pacific Microlab computers in 1992, with a 386DX-25 chip and a whopping 2 megabytes of RAM. A couple of upgrades later, it ended up with a Gigabyte GA-586TX2 motherboard and a Pentium 233MMX. This is what I decided to base the new fileserver around. Previously it had a spell as a firewall and router, sharing a dialup connection running the excellent IPCop. When I moved to cable internet and a hardware firewall, that could do the same job using only about 7 watts, it was retired.

It is a bit poky nowadays, but with a Voodoo2 card in it I used to have hours of fun playing quake, need for speed 3 and powerslide on it, with quite good framerates. I figured if it could do that, it could probably handle life as a bit bucket, receiving files across a network.

The first task was to buy a hard drive. Since there’s about 500GB worth of possible storage on both PCs (not that it would get filled, most is just duplicated as another form of backup) I’d splurge on a 500GB drive. So a Seagate IDE 500GB drive, with 16MB cache was purchased. Since 500GB is way higher than the 8GB the onboard disk controller could read, and its ATA100 interface was far higher than the onboard controller’s ATA33 max speed, I used an add in IDE card that is capable of ATA133 speeds. Fortunately I happened to have one of those lying around. I also bought a 100 megabit capable network card to replace the 10mbit one in it. Since everyone wants wireless networks these days, a wired network card was picked up for under ten dollars - bargain! And with better speed, more reliability and less security hassles than wireless as well!

The next task was finding an operating system that would detect the IDE card and be able to boot from it. I initially had installed Damn Small Linux on it for a laugh when it had a 40GB drive (An IBM Deskstar that hadn’t died, actually) and intended to use that or a fresh install of Debian. Unfortunately, that used an older version of the linux kernel which didn’t yet have support for the IDE card. I considered Ubuntu server but thought it might be a bit heavy on resources - it was going to run in only 64MB after all.

In my search for a linux distro that was light on resources and had a recent kernel, I thought, what about Gentoo? Since it was a source based distribution, any updates have to be compiled, but I could afford to just leave the thing running overnight to let it finish. Plus, I already had a few years’ experience running it on the other PC.

So I downloaded an install CD, printed out the current installation guide, put it in the CD drive of the new (old) box and… it booted! And it detected the IDE card. The hard drive was detected as the full 500GB, so there was no hardware issues. A few hours later, I was into a working Gentoo install. Since there was no graphical desktop environment installed, it felt nice and quick.

One cool thing that can be done if you have a few machines is install a program called distcc, which uses the faster machines to offload the compiling from the old, slow machine. This would be great to get running, so I tried setting it up. First of all on the Core 2 Duo machine, but despite following a guide, I had no luck setting that up. Next was the Athlon XP machine. Sure it isn’t that quick compared to the E6300, but it is lightning compared to a Pentium 233. After quite a few hours of editing config files, environment variables and swearing, I think it is at a stage where the little P233 hands work to the Athlon to compile, saving a heap of time.

So now it is at a stage where I now have around 450ish Gigabytes of storage, a backup that is scheduled to run on my Ubuntu box (a full backup weekly, incremental backups daily) going to the backup server. Since I also now have two gentoo boxen, the server is now set up to grab the latest list of updates (emerge –sync) every night, and the Athlon box now  points to that for its update list. 

Just a few things need to be taken care of now -  the little fan on the Pentium is pretty loud. I’d like to be able to use a larger, slower fan to cool the CPU and also direct a bit of breeze onto the hard drive too. Getting the disk to power down when it is not needed would be good too, in the interests of the drive’s lifespan. Once that is sorted I’ll be getting an extension cord and a long network cable, then putting the thing in the cupboard. As long as it doesn’t get too hot in there it would also keep the noise down a bit.

Hopefully it will chug along for another few years! 

More on Dell PCs without Vista

A few days ago I wrote about my experiences trying to get a Dell laptop with Windows XP installed, rather than Vista. Dell had basically changed all their computers over to being sold with Microsoft’s new operating system, although not everybody is comfortable with switching over right away.

I must not have been the only one with concerns, because when I was configuring a desktop PC to be purchased for work, I noticed that near the top of the page, there is now a link titled "Still want to buy a PC with Windows XP?". Now they have made available a few models in their Latitude, Optiplex and Precision range with XP installed. This was quite handy, because the system I was going to order was heading to a different office, where the staff aren’t too computer savvy. A learning curve for a new operating system is not something they would want, nor would I like to field the phone calls from them - I wouldn’t be much help as I’ve had no experience with Vista either.

So it all should turn out OK - a new machine has been ordered with a core 2 duo E6300 and 2GB of RAM, giving it plenty of headroom. And later on, should they want to, Vista will be able to run pretty well on it too.

Another take on this subject is at overclockers.com, but the author took a more drastic step of ordering the machine with Vista, going out to another store and buying an OEM copy of XP, wiping the Vista install and putting on  XP. It worked out cheaper for him to do that than to spec-up the machine with extra memory, faster video and the like.

Want a Dell PC without Vista? Good Luck!

Since one of the work laptops was stolen from the office recently, I had to order a new one to replace it. We had bought Dell PCs before, and found the service to be pretty good, especially in after sales support - stuff like warranty repairs. So I went onto the Dell site to place an order. I had done a bit of browsing last week there, but since January 30 or so, when Vista was released, that is all you can get with the notebook I wanted (A Latitude D820). Since I was going to be using it with some rather memory-hungry software that runs, and works with data from, a 3D Laser Scanner, I wanted the memory to be available for the program, not hogged by the operating system. Not to mention the possible compatibility issues and bugs that will emerge.

I don’t think I am the only one who doesn’t want to go to Vista in the workplace yet, and I think Dell are shooting themselves in the foot with the Vista-only PCs they are selling. In the end, I managed to get the Latitude with XP after calling them, but they gave the impression that I was getting one of the few remaining ones left with that operating system. My workplace is thinking of getting another desktop as well, to replace one that is a bit flaky, but again, I had difficulty ordering one without Vista. This could lose them quite a few sales, particularly in the conservative business PC sector.

At least I’m not trying to order a laptop without any operating system, that’s another world of pain…