Wednesday, 21 November 2012

Rain rain rain

I had hoped to go out today to finish the Green section of the MKBW, get the Green Bonus, and therefore the info for the Golden bonus. But the forecast was for heavy rain, and I sit here now watching the heavy rain falling, and being glad that I'm not out in it. But the sunset is in a clear sky, so I'm optimistic about tomorrow.

The bad weather means I've had a chance to think more about Raspberry Pies.

I've ordered a couple of dual-drive Sata USB docks. It occured to me that I could probably use two of them with a Pi, to get a four-drive computer; since drives are 3TB these days, that's 12TB. The power draw will be pretty low, I think. Experiments will tell me if this is practical.

I calculated my cost of electricity - it's horrendous! I'm paying something like £6000 per year to power all these computers, including the air conditioning which is needed (I know it's needed, because I left it off overnight, and the temperature climbed to 34 degrees C). So it's well worth looking at how I can get that down.

I've got 45 computers running here, each drawing about 1/2 amp at 240 volts = 120 watts. My Really Big servers, with up to 16 drives, take more like 300 watts. A Pi draws 2.5 watts. A hard drive draws about 8 watts, so a Pi plus three drives (which is about my average) would be 26 watts. But the power supply chews up some power itself, my tests indicated about 10-50 watts (quite a range). But one PC power supply can drive a lot of pies.

I looked at a 500 watt power supply. That draws 16 watts for itself and its fans. And it will supply 33 amps at 5 volts, enough for 66 pies. And 18 amps at 12 volts, enough for 27 hard drives. A 550 watt power supply takes 22 watts for itself and its fans, and supplies 45 amps at 5 volts (90 pies) and 25 amps at 12 volts (37 hard drives). Which means that I can ignore the amount that the power supply draws for itself, because it averages out at a fraction of a watt per device it's powering. And it means that another good idea will be to use two power supplies in parallel to power a batch of pies and drives; that way, if one of them fails, the systems keep running, and I can change the failing power supply without switching everything off.

So it sounds like I could cut electricity consumption by up to 75%. Maybe.

One of the things I've been doing, is combining functions. It's a rule I've often heard, one role per computer. But then you wind up running a lot of computers, all slurping down the electricity. I've eliminated three computers completely, by giving their functions to other computers that weren't doing a lot, and I'll be looking for more savings in this way, even before the pies arrive.

I've also been looking into how to back up the pies. I've done a full file-by-file backup of the SD card as it was yesterday, and I've done an image of the card (I can use that to do a very quick install of the other Pies, when they arrive). but for routine use, I want something that happens automatically.

So I've written a program that accesses the root directory of the card across the network, and backs up each directory tree from the root, looking for files that have changed (excluding /dev and .proc, of course). I'm using the program, available here - I've been using it for 15 years, and it's great. I keep three generations of backup, one that's taken on the 1st to 10th of the month, one taken on the 11th to 20th, and the third on the remaining days. That way, if something dreadful happens and the backup is corrupted, if I find out within a month, I can go back to a good copy.

Also, I had a chat with Jason - he's buying a Maplin's robot arm for his boy. That made me think of the Geocaching Robot Arm, which was very popular until the controller board died, and I couldn't find a replacement.

I had already looked into the Maplin thing, and I decided that it wouldn't be what I wanted, as it uses ordinary electric motors, not stepper motors. You can't control the arm as accurately as you can with stepper motors, and since people will be using this across the internet, with a long lag between them giving a command and seeing the result, I do need accuracy.

But it got me thinking again, and I had another look for the controller board - I still couldn't find one the same. But I did find something similar - the Pololu six-channel Micro Maestro USB servo controller,
which can control up to six channels (I need five) via USB, and it's not expensive, so I've ordered one. The Geocaching Robot Arm might get to live again!

No comments:

Post a Comment