Blog

NUT on my Pi, so my servers don't die

NUT Pi in Rack

A few weeks ago, power went out for the first time in my studio space, and that meant all my servers just had power cut with no safe shutdown.

Handling power outages is never a top priority... until it's the only priority! And by then it's usually too late! Luckily for me, no data was lost, and my servers all came back up safely.

This week the power company emailed and said they'd be cutting power for maintenance next week, but they don't have an exact time. So it's even more excuse to finally set up NUT on a Pi!

Benchmarking multiple network interfaces at once in Linux with iperf3

Recently, I've been working on a Pi router build with multiple 2.5 Gbps Ethernet ports using Radxa's Dual 2.5G Router HAT.

I wanted a simple way to check on total network TCP throughput using both interfaces (or really, as many interfaces as possible) to multiple computers on my network, and I noticed iperf3's --bind option (like --bind [ip address of interface]) was not splitting the traffic on both interfaces—it would just route all traffic through one!

Luckily, I found the issue Failing to bind to interface when multiple interfaces are present, and in it, @bmah888 mentioned the --bind-dev option, which is new as of iperf 3.10+.

Using that option (like --bind-dev [interface name]), you can force an instance of iperf3 to bind to one particular device. For example, assuming I have two servers on my network running iperf3 -s, I can run the following on the Pi to saturate both connections as much as the Pi will allow:

SiFive's HiFive Premier P550 is a strange, powerful RISC-V board

SiFive HiFive Premier P550 leaning on case

SiFive's HiFive Premier P550 is a strange board. It's the fastest RISC-V development board I've tested—though I haven't tested a Milk-V Megrez. It's also Mini DTX, which is an ATX-adjacent standard board size that won't fit in many Mini ITX SFF PC cases, which might be why SiFive and ESWIN are releasing a custom case for it (pictured above, which they sent along with the board for my review).

How to Recompile Linux (on a Raspberry Pi)

Because I get the same question on every video where I recompile the Linux kernel on a Pi to work on GPU or other hardware driver support, I finally made a video answering it:

How do you recompile Linux?

In my case, since I mostly rebuild the kernel for the Pi, I rebuild Raspberry Pi's Linux kernel fork instead of 'mainline' linux (the upstream Linux kernel source).

Raspberry Pi publishes a very thorough guide covering building and cross-compiling the Pi Linux kernel, and my video today mostly goes through that (with a few little tips on making the experience more convenient):

Build Box64 with Box32 for X86 emulation on RISC-V Linux

RISC-V GPU system testing

Recently I've been testing a SiFive HiFive Premier P550, and as part of that testing, I of course plugged in some AMD GPUs I had laying around.

I'll get to that testing at a later date, but one thing I enjoy in my testing is finding what 3D accelerated games and other applications can be run on alternative architectures. With the great work from Wine and Proton over the years, a great many games run out of the box on Linux—and they can be made to run on Arm and RISC-V architectures with almost as much ease as Linux on X86/AMD64!

How to build Ollama to run LLMs on RISC-V Linux

RISC-V is the new entrant into the SBC/low-end desktop space, and as I'm in possession of a HiFive Premier P550 motherboard, I am running it through my usual gauntlet of benchmarks—partly to see how fast it is, and partly to gauge how far along RISC-V support is in general across a wide swath of Linux software.

From my first tests on the VisionFive 2 back in 2023 to today, RISC-V has seen quite a bit of growth, fueled by economics, geopolitical wrangling, and developer interest.

The P550 uses the ESWIN EIC7700X SoC, and while it doesn't have a fast CPU, by modern standards, it is fast enough—and the system has enough RAM and IO—to run most modern Linux-y things. Including llama.cpp and Ollama!

Compiling Ollama for RISC-V Linux

I'm running Ubuntu 24.04.1 on my P550 board, and when I try running Ollama's simple install script, I get: