Showing posts with label Power Measurement. Show all posts
Showing posts with label Power Measurement. Show all posts

Tuesday, 16 July 2013

Going Live

The State of Things

My four wire case fan arrived last week featuring low speed operation, rubberised frame and unique corrigated design blades. Originally I'd ordered the three wire version by mistake, but this was unsuitable if you want the system board to be able control the fan speed. Then towards the end of the week I worked out how to transfer my databases over for Davical and Mediawiki. I'd already transferred my other mySQL databases by copying the files from /var/lib/mysql, but the Wiki failed to work and Davical uses PostgreSQL. I knew next to nothing about PostgreSQL so it was a slog to work out how the security worked, how data might be transfered, and how to fix the annoying missing PHP library problems along the way. Nothing works without a battle and this was a fresh install, so it should have been easy?! Go-live was now or never, the other apps could wait, and I didn't want to go through the hassle of transferring data again.

On the hardware side, the new fan (an 80mm 'be quiet!' SHADOW WINGS SW1)
required its mounting plugs to be modified, as the plastic locking pins wouldn't go through the threaded mounting bracket. It would have been flimsy anyway, so I discarded the pins, shortened two of the mounting plugs and used a couple of long bolts and washers to secure it. The fan was then plugged into the system fan header on the motherboard and the computer started. It was immediately obvious that the fan was running very slowly, the BIOS reporting just 500 rpm.

Fan mounted using modified only the lower pegs.

Nb, always test things before you modify them, that way if it's DOA you can get it replaced!

That should be just enough to keep a small amount of air moving through the case, and if temperatures heat up, then the fan should speed up to a maximum of 2000 rpm, at a whisper quiet 16.6dB sound level.

Out With The Old

Going live essentially means moving the data and backup disks over to the new server. But before doing this I was keen to compare power usage and disk speeds, (before and after) ultimately reassuring myself that spending all that money was worthwhile.

With all drives running on the old Via C7 based machine the system was shown to draw a steady 32 watts. This dropped to 24 watts after the drives were removed, leaving just the IDE SSD and case fan as additional loads. That's higher than expected for an eleven watt system board, even allowing for power supply inefficiencies.

I used a utility called hdparm to measure the drive speeds. This is a general purpose drive tweaking tool that can perform a multitude of tasks such as optimising speeds and changing time-out parameters. The following command produces two performance measurements:

   pingu:=# hdparm -Tt /dev/sdx (where x is the drive letter to be measured)

DriveCached ReadsBuffered Reads
IDE SSD225Mb/sec28.4Mb/sec
Samsung Momentus HN-M101MBB 2½" sata disk (via IDE to SATA adapter)225Mb/sec29.5Mb/sec
Samsung Momentus ST1000LM024 2½" sata disk (sata port)233Mb/sec30.1Mb/sec
Western Digital Caviar Green 3½" sata disk (sata port)234Mb/sec111.5Mb/sec

It's interesting that the SSD wasn't out-performing the other drives in this test, though in practice it had certainly yielded a performance boost when I'd first installed it. I know they wear out, but I'm sure they don't go slower!

For Shiela.

In With The New

The disks where installed in the new Intel i3 based machine and mount points added to the fstab. These I added using their Block ID rather than their device name, which is a unique drive identifier rather than one that's tied to the port being used. You can find out which disks are connected by typing the following command:

   pingu:=# blkid

The address numbers are a little bit too long to write down and type in manually, so I piped the output of this file into my fstab and edited the result to the correct format.

   pingu:=# blkid >> /etc/fstab

This task completed, I re-tested the disks for speed.

DriveCached ReadsBuffered Reads
Intel 525 60Gb mSATA card6470Mb/sec247Mb/sec
Samsung Momentus HN-M101MBB 2½" sata disk6500Mb/sec103Mb/sec
Samsung Momentus ST1000LM024 2½" sata disk6590Mb/sec100Mb/sec
Western Digital Caviar Green 3½" sata disk (in SATA2 port)6500Mb/sec119.5Mb/sec

There's quite obviously a performance boost but it's surprising that the 3½ inch desktop drive connected to a faster sata2 port wasn't any quicker on buffered reads. To be fair this disk is designed for efficiency and low power with only a 5,400 rpm platter.

Two laptop drives on top and a desktop drive under the mounting plate.

With all disks running the power drawn was just 23 watts, a nine watt saving over the previous machine. That's like turning off a compact fluorescent light bulb that's been burning for the last four years.

Tuesday, 9 July 2013

Power Corrupts

Pleased to Meter

My plug-in electricity usage meter arrived from Maplin (N67FU). It cost just just a tenner and gives me the ability to see if my careful purchasing has actually delivered me an efficient server. You plug it into a mains outlet, and then the device to be measured connects to the three pin 13 amp socket in the front. It has a maximum power rating of just over 3Kw so it should be enough for an Intel i3 (laffs), and the flat-ish design means wall-warts shouldn't be a problem.



It works really well, and it's cheap as chips, but the niggle I've had with it is reading the LCD screen. Parts of the display are really tiny and my eyes aren't what they used to be. Plus mains power sockets tend to be in low, poorly lit places, making reading harder still. The only real issue has been the mode indicator, which is the smallest bit and block inverse. (Who dreamed that up?.. I can understand from a design point of view how you'd want to differentiate that a little, but they might as have well used Egyptian Hieroglyphs!)

Meter mode indicator shown top right.
Thankfully the screen layout changes enough so that you can work out which mode you're in, and it's mostly about that big number in the top left so I can get by without needing a flashlight and my reading glasses.

Measuring Up

The existing Pingu had to be shut down to install a replacement /home and /data drive. I use 2.5" laptop drives these days to keep check on the noise and heat, and this disk was the first one I'd bought after switching to the policy four years ago. Last week it started to fail big time, throwing numerous errors, making loose rattling noises and finally showing files with zero bytes size. I won't bore you with the gory details because I have regular backups, but it gave me the chance to plug in the power meter and see how much juice my trusty old server has been using all these years.

The Via system board is rated at 11 watts, there's an SSD, two laptop drives and a 2Tb desktop drive for my auto-backups, which is normally asleep. So after allowing for a power supply efficiency of 80%, I'd estimated about 25 watts in total, but found it actually used just under 27w. I'm pretty sure it's the disks that are dragging it up so high, but until I unplug them it's just an educated guess. But having the electricity meter means I can be a little more pragmatic about future disk purchases. Maybe one day SSD's will be big enough and cheap enough to fulfil my data storage requirements.

Next to be benchmarked was the new Intel i3 based machine. The bulk of the software, two database servers (Postgresql and mySQL), as well as Apache2 had already been installed but not configured. And as I blogged last time, Minecraft Server was ready to go. Turning on the machine it peaked for a few seconds at 20 watts and then dropped to a very reasonable 14.5 watts. It pretty much stayed at that value until I started the Minecraft service and then it went up by about ½ a watt. I measured CPU temperature by installing LM-Sensors and CPU utilisation was monitored using the Top utility.

With one player joining the game the power rose to about 15.5 watts and (by pressing 1 while running top) I was able to see that all four of the CPU cores had started to register light utilisation. (So I stand corrected, Minecraft Server does use multiple cores - thanks to Dr Vesuvius for that heads-up).

top - 18:47:19 up 1 day, 22:48,  1 user,  load average: 0.18, 0.12, 0.08
Tasks: 106 total,   2 running, 104 sleeping,   0 stopped,   0 zombie
%Cpu0  :  5.6 us,  0.7 sy,  0.0 ni, 93.4 id,  0.3 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  : 18.6 us,  1.0 sy,  0.0 ni, 80.4 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  3.3 us,  0.0 sy,  0.0 ni, 96.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  6.4 us,  0.3 sy,  0.0 ni, 93.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   8127440 total,  1199480 used,  6927960 free,    19984 buffers
KiB Swap:  3090420 total,        0 used,  3090420 free,   862192 cached

Some of this could be the other services running but without the Minecraft Server there's very little utilisation on the other cores.

With the case lid removed the CPU temperature drifted up to around 45 degrees centigrade and the fan still turned at it's original lazy rate. I gotta admit, that's better than I expected.