Tag Archives: power

Fedora 25 is out, virt-builder images available

$ virt-builder -l | grep fedora-25
fedora-25                x86_64     Fedora® 25 Server
fedora-25                i686       Fedora® 25 Server (i686)
fedora-25                aarch64    Fedora® 25 Server (aarch64)
fedora-25                armv7l     Fedora® 25 Server (armv7l)
fedora-25                ppc64      Fedora® 25 Server (ppc64)
fedora-25                ppc64le    Fedora® 25 Server (ppc64le)
$ virt-builder fedora-25
$ qemu-system-x86_64 -machine accel=kvm:tcg \
      -cpu host -m 2048 \
      -drive file=fedora-25.img,format=raw,if=virtio

Or to try out Fedora on a different architecture:

$ virt-builder fedora-25 --arch ppc64le -o fedora-25-ppc64le.img
$ qemu-system-ppc64 -cpu POWER8 -m 2048 \
      -drive file=fedora-25-ppc64le.img,format=raw,if=virtio

5 Comments

Filed under Uncategorized

OCaml 4.04, RISC-V, S/390, POWER and more …

I pushed OCaml 4.04.0 to Fedora Rawhide last week. There are loads of new features for OCaml users, but the ones that particularly affect Fedora are:

  • New, upstream POWER (ppc64, ppc64le) backend, replacing the downstream one that we have maintained for a few years. I was quite apprehensive about this change because I had tried the new backend during the OCaml 4.03 release cycle and found it to be quite unstable. However the latest version looks rock solid and has no problem compiling the entire Fedora+OCaml software suite.
  • New, upstream S/390x backend. I actually found and fixed a bug, go me!
  • New, non-upstream RISC-V backend. I found a bug in this backend too, but it proved to be easy to fix. You can now install and run most of the OCaml packages on Fedora/RISC-V.

And talking about Fedora/RISC-V, it took a month, but the mass-rebuild of all Fedora packages completed, and now we’ve got about ⅔rds of all Fedora packages available for RISC-V. That’s quite a lot:

$ du -sh SRPMS/ RPMS/
31G	SRPMS/
27G	RPMS/

1 Comment

Filed under Uncategorized

Not very serious quest to run Linux on every architecture

Just looking at the Debian Ports page, how many of these architectures do I own?

Arch Notes
Alpha Good, working Alpha hardware is getting hard to obtain these days.
amd64 (x86-64) Obviously …
ARM (32 bit) I don’t really care about anything less than ARM version 7 these days, although I do have a Sheevaplug which I think is v5 or v6. My “go-to” 32 bit ARM board is the Cubietruck.
ARM (64 bit) I don’t own, but have under my desk at work, the Applied Micro X-gene (picture), and a lovely piece of kit it is too.
HP-PA I would love to get my hands on some HP-PA RISC hardware, but it’s even harder to get hold of than Alpha. Edit: If you really want HP PA then the HP C8000 workstation is available on eBay for $300 or so.
i386 I own a Lenovo X60s laptop, which is one of the few 32 bit Intel processors with (very slow) hardware virtualization
ia64 HP Itanium RX2620
M68K As I started out my professional career writing 68k assembler, I’d love to buy an MVME crate, but incredibly they go for upwards of $1000 on ebay, even 20 years after they stopped being made.
MIPS ✓/✗ I just bought the MIPS Creator CI20. I don’t own any Big Endian MIPS hardware, nor any 64 bit MIPS hardware.
OpenRISC I have this burned into an FPGA, but in storage.
PPC (32 bit) I recently sent a couple of old 32 bit Mac G4s to recycling.
PPC/POWER (64 bit) ✓/✗ I own a Mac G5 running Linux (picture). However I don’t own, and as far as I know cannot get my hands on any of the more interesting POWER7 or POWER8 hardware, although I have remote access to it through Red Hat.
s390/s390x Similar to ppc64, no possible way to own it, but I am able to remote access it through Red Hat.
SPARC (32 bit) Currently sitting in storage, but it’s there and it used to run Linux, albeit with only 128 MB of RAM
SPARC (64 bit) Is it possible to buy 64 bit SPARC hardware for a reasonable price?

Looks like I’m about half way there!

6 Comments

Filed under Uncategorized

virt-builder: Fedora 21 ppc64 and ppc64le images

virt-builder now has Fedora 21 ppc64 and ppc64le images available, and you can run these under emulation on an x86-64 host. Here’s how to do it:

$ virt-builder --arch ppc64 fedora-21 \
    -o fedora-21-ppc64.img

or:

$ virt-builder --arch ppc64le fedora-21 \
    -o fedora-21-ppc64le.img

To boot them:

$ qemu-system-ppc64 -M pseries -cpu POWER8 -m 4096 \
    -drive file=fedora-21-ppc64[le].img \
    -serial stdio

Oddly the boot messages will appear on the GUI, but the login prompt will only appear on the serial console. (Fixed)

Libvirt also has support, so with a sufficiently new version of the toolchain you can also use:

$ virt-install --import --name=guestname \
    --ram=4096 --vcpus=1 \
    --os-type=linux --os-variant=fedora21 \
    --arch=ppc64[le] --machine pseries \
    --disk=fedora-21-ppc64[le].img,format=raw
$ virsh start guestname

It’s quite fun to play with Big Iron, even in an emulator that runs at about 1/1000th the speed of the real thing. I know a lot about this, because we have POWER8 machines at Red Hat, and they really are the fastest computers alive, by a significant multiple. Of course, they also cost a fortune and use huge amounts of power.

Some random observations:

  1. The virt-builder --size parameter cannot resize the ppc64 guest filesystem correctly, because Anaconda uses an extended partition. Workaround is to either add a second disk or to create another extended partition in the extra space. (Fixed)
  2. The disks are ibmvscsi model (not virtio or ide). This is the default, but something to think about if you edit or create the libvirt XML manually.
  3. Somehow the same CPU/machine model works for both Big Endian and Little Endian guests. It must somehow auto-detect the guest type, but I couldn’t work out how that works. Anyway, it just works by magic. it’s done by the kernel
  4. libguestfs inspection is broken for ppc64le
  5. Because TCG (qemu software emulation) is single threaded, only use a single vCPU. If you use more, it’ll actually slow the thing down.

Thanks: Maros Zatko for working out the virt-install command line and implementing the virt-builder script to build the images.

Leave a comment

Filed under Uncategorized

Caseless virtualization cluster: power usage

I have a handy power meter which is useful for measuring the power consumed by my virtualization cluster under various loads.

20140429_180316

Note in the figures below I’m only including the four cluster hosts. Not included: the NFS server (which is my development server, so I have it switched on all the time anyway), or the network switch.

With all four hosts idling, power usage of the total cluster was around 174-177 watts. To give you an idea of how much that costs to run, it would be about £263 p.a. at a typical UK rate for electricity.

Interestingly, with one host running, power usage was 50W (I would have expected it to be exactly one quarter), and with no hosts running, something consumes 7W. I suspect the PSUs leak a bit even when nominally off but with the hardware switch still in the ON position.

Under some moderately heavy loads (parallelized compiles in a loop) I was able to drive the power usage up to a maximum seen of 584W (£869 p.a.). Note that was a one-off, and most of the time it bumps wildly around the 300-500W range (unfortunately my simple power meter doesn’t do running averages).

So low power ARM this ain’t! One thing we can do to mitigate this (apart from turning it off) is to migrate VMs to a single node when load is low, and turn the other nodes off. That should save a fairly considerable amount of power.

I also installed lm_sensors so I could monitor temperatures and fan speeds, but there’s not really anything interesting to say. Under load the fans of course spin like mad (typically 3000 RPM), but the temperatures stay at a cool 40°C or so. Even though there is only one fan per motherboard (the CPU fan) there don’t appear to be any cooling issues.

1 Comment

Filed under Uncategorized

How to power computers from solar panels?

The garden office has got one entirely unused feature — a large roof! What better place to mount solar panels for an off-grid power supply …

These Sharp PV modules (ND-R245-A6) [PDF datasheet] are manufactured in Wrexham and (although pricing is very opaque) appear to cost around £250 per module. I would need three or four. Each module produces a peak of 30V, 8A (= 240W) although in reality I’d guess the voltage would vary wildly from 0-30V.

Inverters, the part which normally converts the DC and highly variable power from the modules to mains AC voltage, are expensive, costing likely as much or more than the panels themselves. As this is an “off-grid” installation, this is useless. It would seem to be better to use the power to charge car batteries.

The car batteries provide the smoothed 12 V supply which would be used to run servers and lighting.

So there seem to be two problems in the way: (1) How to charge the batteries. I think I need something like this? (2) How to power servers directly off 12V …

Update

As always, it becomes much clearer once you have the key search term, and the word in this case is caravan. Apparently people who own caravans, static caravans, narrow boats and so on are in precisely this situation, and there are special purpose charge controllers used for this (made by Steca, amongst others).

Here and here [both PDF] are two excellent starter guides for the self-builder.

Now all I need to do is to size my requirements and work out how to power a server off a 12 or 24V supply.

6 Comments

Filed under Uncategorized

Articles: Inside Apple chargers, real and fake

Two really interesting articles from Ken Shirriff’s blog:

http://www.arcfn.com/2012/05/apple-iphone-charger-teardown-quality.html

http://www.arcfn.com/2012/03/inside-cheap-phone-charger-and-why-you.html

Leave a comment

Filed under Uncategorized