sandeen.net now thinks it’s a laptop

dual_laptop_drives

One of the legs of the main mirror of this box was starting to throw SMART errrors, and that makes me nervous, even when I can remap the sectors.  So when life gives you lemons, make lemonade!  I replaced the main root mirror with a couple new drives – 7200RPM seagate 250G laptop drives, on sale from newegg, the pair $90 with free shipping.

And now, the Kill A Watt [amzn] says the box uses only 41W, down from 51W.  That’ll save 7 kWh/month, 88kWh/year.  Not bad!  (though far from paying for themselves).  The 2 old drives are still there, waiting to be spun up when somebody wants to listen to the music on them.

What’s up with the Intel Atom?

Update: I’ve since built a box with a mobile atom CPU which fares much better, as described in this post.

So I was all fired up to lower the power consumption of sandeen.net, the humble server upon which you read this blog.  (And thank you for that, by the way.  You can count yourselves among the 3 finest people on the internet.)

I decided to swap out the old AMD Athlon for an Intel Atom – you know, that low-power, lower-performance wonder-chip from Intel.  I ordered a Gigabyte GA-D510UD from newegg.com, for $90… it looked interesting because it had 4 SATA ports built-in, which should suffice for any amount of storage that I’d likely have connected directly to it.

sandeen.net draws about 51W, which is really not too bad considering there are 2 active drives in it (a mirror) and one sleeping drive that gets backups occasionally.  It’s a AMD Athlon(tm) 64 Processor 3400+ in an old Compaq SR1710NX that I got cheap 5 years ago or so, and updated the cpu, memory, drives, etc…  These new low-power Atoms must be really great then, right?

So it gets here Friday, and I’m all excited… I take down the server, plug it in, and well, first off RHEL5 was not happy with it, bringing the drives up as /dev/hda, /dev/hdb… (remember those?), and and after a bit of fiddling to get the config right I decide to just put things back as they were, and play with the board offline.  Before doing so, I check the Kill A Watt [amzn] … hm, still 51W.  Odd.  Hopefully a newer distro will do some magic power stuff and make it all better.  It’s an atom right?  Low power and all?

So I put the RHEL6 beta on it, and get it all fired up, and re-check … hm, nope, still 36W or so with a single drive, subtract out that 8W, the board is pulling around 27W.  This is not the low power I’d hoped for!  So I start digging – oh look, the chip doesn’t support any P-states, and only 2 C-states:

Cn                Avg residency   P-states (frequencies)
C0 (cpu running)        ( 0.3%)     1.67 Ghz   100.0%
polling           0.0ms ( 0.0%)
C1              137.5ms (99.7%)

And sure enough, checking the Intel docs, only the chips designed for mobile use have the nice power features.

In short, the shiny new low-power Atom sure appears to use just as much power as my 5-year-old run of the mill AMD Athlon64 (in a low P-state, granted).  Sure, at full-tilt maybe it’s using less, but it runs at full-tilt all the time and my Athlon is able to throttle back almost all the time.

I’ll eat the restocking & shipping and send this thing back to newegg, bitterly disappointed.

I have higher hopes for swapping out the hard drives (one leg of the mirror is dying) to WD Caviar Green drives – I can save about 8kWh/month with those if the specs are accurate.  :)

Trim/discard at mkfs time

A little-hyped development in all the hype about “trim” for ssds:

  • Recent versions of mkfs.ext2, mkfs.ext3, mkfs.ext4, and mkfs.xfs all now trim all blocks in the target device before laying down the format, so regardless of whether you have a runtime trim solution, at least you get to start fresh!

Open-source power monitoring

I’ve been interested in doing power monitoring on the house for a while, the TED 5000 unit seems neat and the Brultech ECM1240 monitor also seems pretty good.  Both are around $200, but both have drawbacks.  The TED only monitors mains, and while the Brultech can monitor around 5 branch circuits, it lacks the simplicity of a built-in webserver like the TED.  Most of the software developed by the company, at least, is Windows- oriented.  But I’ve found some neat other projects that might be fun. Continue reading

Grrr nonfree software

Really wanted to try out Hulu Desktop on my Mythbox, so I can get the Daily Show on the big screen in a convenient/legit fashion.

Knew 64-bit flash was still dicey on linux (Helloooo Adobe?  1998 called, they want their software back!) so did:

# yum localinstall huludesktop-i386.rpm

and it pulled in some 32-bit libs, I installed flash, and it should be groovy right?  No.  I run it and it says sorry you don’t have flash.  I strace the thing and see it finding flash just fine but also see:

open("/lib/tls/i686/sse2/libXt.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/sse2", 0xfff02f3c) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libXt.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686", 0xfff02f3c)     = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/libXt.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/sse2", 0xfff02f3c)     = -1 ENOENT (No such file or directory)
open("/lib/tls/libXt.so.6", O_RDONLY)   = -1 ENOENT (No such file or directory)

Hmmmm ok so we’ll just …

# yum install libXt.i586

Yay it works.  Booo Hulu for getting it wrong in a way less savvy users would never sort out.  I’ll just enter a bug in their Bugzil…. oh never mind.

Grrrr nonfree software.


					

Getting nvidia to come up without a connected monitor

I was working on trying to make my Mythbox shut down when idle, and the first big(!) hurdle was getting X to come up properly, when the HDTV is off (and by off I mean off-off, not idle-off), with the nvidia driver.  This was killing me; it kept rejecting the modes I gave it because it had no idea what was connected.

Finally I stumbled upon the fact that you can use their nvidia-settings tool to extract the edid data into a binary file, and then tell the X driver to use it in the Device section:

# So we don't need the monitor on to get panel info:
Option "CustomEDID" "DFP-0:/path/to/edid.bin"
# And tell the driver what is (or will be) connected
Option "ConnectedMonitor" "DFP-0"

Mythbox Power Consumption V2 – 51W

Dropped one tuner card from the mythbox, put the root on an SSD, and set the media drive to spin down… Kill A Watt [amzn] now says it’s 51W when idle.

This still isn’t great;  I’d never leave a 60W bulb burning 24/7 … so next stop is looking into making it shut down when idle, and wake up in time for the next recording.  MythTV has this functionality built in, but not if the frontend is running; I guess I need to homebrew something for that.

The SSD helps it boot in 18s so turning it back on on demand isn’t so painful…

MythTV Power Consumption

… In which Eric discovers a simple way to reduce the power draw of his DVR …

When I built my new MythTV box, I did it with an eye towards power efficiency – both to save me a little money, and to maybe save the planet (hey, it’s just one thing, but it’s the little choices we all make).  So with that in mind, I got a 45W AMD 5050e processor, and Antec 80Plus EarthWatts 380W power supply, etc.  I don’t yet have any “green” drives in it; I’d hoped I could get the root drive to spin down to idle, but so far that’s been elusive.

Anyway, when all was said and done, I had a quiet box that idled at about 65W according to the Kill-A-Watt.  Not awesome, but a heck of a lot better than the old P4 heat plant that it replaced.

But one thing I noticed – when the menu was on the recorded shows listing, and the little preview was playing, power jumped up to around 80W!  And unfortunately, nobody ever exits from that screen, and it’s the one that MythTV returns to when it’s not playing.  So the box sat there for hours and hours decoding mpeg, bringing the cpu out of its low power states, and adding almost 25% to the power draw.  :(

It’d be nice if MythTV would just time this out, and go back to the main menu, or at least stop the preview playback – but you can just disable it in the frontend setup menus, for now.  Go ahead and do it – I bet you won’t miss it, and you’ll save a dollar and a pound of CO2 as well.

Oh, and an addendum: If you have the MePo theme (or other animated theme) running, even that adds to the power bill.  I modified the theme to drop the animations, and chopped another couple watts off the draw.

On edit… the MythTV Wiki has a page on power savings that I’ve updated too.