Power to the Hive (but just a little)

During the last Core Dev meeting, I’ve mentioned my Hive consensus node setup that consumes 7W of power. That was just my rough estimate, but because I was asked for more details, I took a closer look to provide a more detailed presentation. Please note that this is just an example, definitely not the optimal. It serves my needs, but yours might be different.

Hardware choices

Brand new, fancy Zotac (except not)

Hey, wait, is this Zotac sponsored content? No, it’s not. They suck (now with AirJet technology) ;-)
I've heard about this particular new model: ZBOX pico PI430AJ with AirJet.
Maybe it’s cool, maybe it’s not.
I wanted to buy it and try it, but it doesn’t seem to be available (as of December 2023), and they ignored my emails.

Maybe it’s expensive, but at least it's unavailable ;-)

Other modern alternatives

There are plenty of those. It depends on the details of what exactly you are looking for.
Intel i3-N300 looks promising with its 7W TDP while being really performant. The N100 and N200 are also great for similar use cases.
However, I needed it ASAP and, due to chronic lack of time, I wanted something that would run out of the box.
I couldn’t find anything with N300 or N100/N200 with a reasonable price and delivery dates so…

Recycled old Zotac

Why Zotac again? Pure coincidence.
It’s about effectively using available resources, not wasting them for fun. So instead of buying a brand new fancy piece of hardware, I decided to reuse one that I bought in early 2016. They had these ready-to-use, good-looking products, where I didn’t have to worry about finding a proper chassis to fit components in without risking inadequate heat dissipation. It served me well running 24/7 for most of the time, so it’s definitely a good candidate.
Back then, I paid 130EUR for the barebone. Originally, it came with 4GB RAM and 128GB SSD, which I upgraded for the purpose of running hived.

Meet the nano

It’s Zotac ZBOX CI323 nano
It’s very small: 127mm x 127mm x 57mm
And handsome:

Nano Hive

You have to admit, the chassis design is perfect for Hive, even though I got it even before the genesis block of the legacy chain was produced.

CPU

Equipped with an Intel(R) Celeron(R) CPU N3150 @ 1.60GHz

To put it into perspective, according to Passmark, one of the most popular CPUs these days, a 5-year-old AMD Ryzen 5 3600 has a CPU Mark of 17779, while Intel Celeron N3150 has a CPU Mark of 1199 (yes, almost 15x less performant).

Memory

Unfortunately, it can handle a maximum of 8GB RAM. So I just installed that.
I would rather go for a setup that could support 16GB, as it would be much easier to manage (like with the N100/N200/N300)
Ideally, 24-32GB would be better, but even N300 wouldn’t suffice for that. It is what it is. We can make do with 8GB.

Storage

Samsung SSD 870 EVO 1TB - I chose this simply because it was available for testing. It’s popular, affordable, and big enough for backup purposes.

Connectivity

It has two Gigabit Ethernet ports and is connected to two different network providers, with 0.2-0.6 ms latency to edge routers.

It has a lot of other fancy features, but for our purposes, those are irrelevant, so we won’t spend time on them. If you are curious, just use the links to the detailed specs provided by the menufaturers.

Software

OS

No, it’s not Ubuntu 22.04 LTS.
I use Debian 12 instead.
Why?
No particular reason.

”Your mama’s so old, she's in Debian Stable.”

Well, maybe I’m just old.

I installed it from a USB, and the whole process took less than 20 minutes.

Prerequisites

I haven’t configured it for development, so while it’s unable to build hived, it’s ready to bootstrap it from a “starter pack” available on my https://gtg.openhive.network

Or so I thought.

Starter pack

To start quickly, I needed a block_log and block_log.artifacts (the latter is optional, but having it reduces the time needed for startup, as downloading is much faster than generating it on this low-performance hardware).

Getting a snapshot and uncompressing it on the fly was an unexpectedly long process (as expected ;-) ).
Simply put, this machine isn’t fast enough to cope with the amount of heavily compressed data coming from a fast network connection.

Of course, I also needed a hived binary. There’s no point wasting time and building it from scratch. The CPU is slow, but it’s still x86_64, and a binary from the starter pack, despite being built on and for Ubuntu 22.04 LTS, runs on Debian 12 without issues.

Getting all the required data, thanks to the fast connection, took less than 2 hours.

Hived Configuration

I want to run a consensus node but with account_by_key and transaction_status plugins for convenience, so it’s mostly based on the exchange-example-config.ini, with the account_history_rocksdb plugin and settings commented out.

Loading from snapshot

When you already have the starter pack in place:

.hived
 blockchain
    block_log
    block_log.artifacts
 config.ini
 snapshot
     latest

You can simply start ~/bin/hived-v1.27.4 --load-snapshot latest

…and wait for 3 hours for it to fail due to running out of memory.

That’s likely because loading the snapshot is configured by default to use a lot of resources, which is not suitable for low-end machines.

Running with copied state

All I had to do was “transplant” an existing state stored in shared_meory.bin from one of my other nodes. Of course, I needed to ensure that the block_log matched. Downloading takes about 5 minutes.

With the new directory structure looking like this:

.hived
 blockchain
    block_log
    block_log.artifacts
    shared_memory.bin
 config.ini

I simply started it with ~/bin/hived-v1.27.4, and within a minute it was up to the head block and has been keeping up ever since.

Block stats looks like this:

{"num":80829589,"bp":"deathwing","txs":26,"size":8073,"offset":-254133,"exec":{"offset":-318320,"pre":837,"work":63350,"post":1213,"all":65400}}
{"num":80829590,"bp":"good-karma","txs":63,"size":38989,"offset":-209402,"exec":{"offset":-262837,"pre":1157,"work":52278,"post":4951,"all":58386}}
{"num":80829591,"bp":"engrave","txs":109,"size":33431,"offset":-193473,"exec":{"offset":-249851,"pre":3324,"work":53054,"post":6334,"all":62712}}
{"num":80829592,"bp":"themarkymark","txs":88,"size":52161,"offset":-197929,"exec":{"offset":-261370,"pre":3135,"work":60306,"post":5032,"all":68473}}
{"num":80829593,"bp":"roelandp","txs":128,"size":31096,"offset":-229059,"exec":{"offset":-271217,"pre":2247,"work":39911,"post":3351,"all":45509}}
{"num":80829594,"bp":"yabapmatt","txs":93,"size":29071,"offset":-235377,"exec":{"offset":-264357,"pre":2094,"work":26886,"post":5870,"all":34850}}
{"num":80829595,"bp":"quochuy","txs":151,"size":64217,"offset":-234209,"exec":{"offset":-281692,"pre":2835,"work":44648,"post":1632,"all":49115}}
{"num":80829596,"bp":"guiltyparties","txs":88,"size":25814,"offset":-243246,"exec":{"offset":-272498,"pre":1755,"work":27497,"post":4227,"all":33479}}
{"num":80829597,"bp":"abit","txs":174,"size":36404,"offset":-161127,"exec":{"offset":-235618,"pre":3439,"work":71052,"post":7639,"all":82130}}
{"num":80829598,"bp":"stoodkev","txs":148,"size":37167,"offset":-184325,"exec":{"offset":-221677,"pre":3163,"work":34189,"post":5399,"all":42751}}
{"num":80829599,"bp":"ocd-witness","txs":94,"size":31547,"offset":-249496,"exec":{"offset":-292343,"pre":2078,"work":40769,"post":1476,"all":44323}}
{"num":80829600,"bp":"emrebeyler","txs":146,"size":46342,"offset":-215147,"exec":{"offset":-260921,"pre":2987,"work":42787,"post":6332,"all":52106}}
{"num":80829601,"bp":"arcange","txs":132,"size":31830,"offset":-264145,"exec":{"offset":-303826,"pre":2637,"work":37044,"post":2898,"all":42579}}
{"num":80829602,"bp":"smooth.witness","txs":103,"size":28005,"offset":-38917,"exec":{"offset":-82887,"pre":2268,"work":41702,"post":9402,"all":53372}}
{"num":80829603,"bp":"ausbitbank","txs":129,"size":27922,"offset":-236931,"exec":{"offset":-278227,"pre":1819,"work":39477,"post":1615,"all":42911}}
{"num":80829604,"bp":"blocktrades","txs":200,"size":54257,"offset":-84679,"exec":{"offset":-139029,"pre":3185,"work":51165,"post":8174,"all":62524}}
{"num":80829605,"bp":"brofund","txs":157,"size":34013,"offset":-143719,"exec":{"offset":-185494,"pre":4184,"work":37591,"post":4755,"all":46530}}
{"num":80829606,"bp":"therealwolf","txs":101,"size":26220,"offset":-268139,"exec":{"offset":-301179,"pre":2133,"work":30907,"post":2866,"all":35906}}
{"num":80829607,"bp":"steempeak","txs":65,"size":15196,"offset":-238585,"exec":{"offset":-273225,"pre":1681,"work":32959,"post":1526,"all":36166}}
{"num":80829608,"bp":"threespeak","txs":133,"size":28875,"offset":-200882,"exec":{"offset":-247846,"pre":2878,"work":44086,"post":3558,"all":50522}}
{"num":80829609,"bp":"gtg","txs":100,"size":31987,"offset":-235297,"exec":{"offset":-264000,"pre":1871,"work":26832,"post":1649,"all":30352}}

Not great, not terrible. ;-)

As you can see, it can easily keep up with the current traffic.

Temperature

It’s passively cooled, meaning there are no moving elements, such as fans, that would generate noise.

Output of sensors:

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +26.8°C  (crit = +95.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +34.0°C  (high = +90.0°C, crit = +90.0°C)
Core 1:       +34.0°C  (high = +90.0°C, crit = +90.0°C)
Core 2:       +42.0°C  (high = +90.0°C, crit = +90.0°C)
Core 3:       +42.0°C  (high = +90.0°C, crit = +90.0°C)

Power consumption

At peak it never reached 12W (actually, 11.5W) and that was during a massive sync.
When hived is at the head block (which is its usual condition after the initial setup) it consumes 6-7W.

Power to the Hive

The last 24-hour average was 6.3W.

Energy and Power

Trivia (A Light Bulb, a Coffee Machine, and a Tesla)

A Light Bulb

At a conference this year, @detlev and @arcange discussed how a Hive node’s power consumption could be compared to that of a single light bulb.
This comparison is not only accurate but also an understatement in the case of our setup. Our little Hive node consumes about as much power as a single LED light bulb.

Coffee Machine

Interestingly, a standard coffee machine running for an hour consumes significantly more energy than our Hive node does in an entire day.

Tesla Model 3

A fully charged Tesla Model 3 battery has enough energy to run our Hive node for over a year.

H2
H3
H4
3 columns
2 columns
1 column
42 Comments
Ecency