Using the H9 Plotter for Spacemesh

TickTockBent
5 min readJul 8, 2024

--

So, you’ve decided to join the Spacemesh network and contribute some storage space. Let’s walk through using the H9 plotter to create that space with a single GPU setup.

Important Disclaimer

The H9 plotter isn’t an official Spacemesh resource. Using third-party software comes with risks — risks you’re accepting by choosing this plotter. Exercise caution, do your homework, and proceed with eyes wide open.

That said, many users report significant speed improvements with the H9 plotter (especially the CUDA version) compared to the official postcli tool. This performance boost is why some folks roll the dice on unofficial software.

What You’ll Need

  • A computer with a GPU (NVIDIA for best CUDA performance)
  • The latest H9 plotter software (version 4.0.0–4 as of writing)
  • Plenty of storage space (more on that in a bit)

Download the H9 Plotter

Grab the latest version from the H9 plotter GitHub releases page: https://github.com/h9-dev/spacemesh-miner/releases

Pick the right version for your system (Windows or Linux) and download away.

H9 Plotter Quirks

Before we start, let’s talk quirks:

  1. The plotter demands at least 32 Storage Units (SU). Each SU is 64GiB, so you’re looking at a minimum of 2199GB free space. This is the bare minimum, you’ll absolutely want at least a little more than this to handle the extra config files.
  2. If this condition isn’t met, the plotter won’t complain — it’ll just fail silently without an error(not helpful, I know, and I’ve already provided feedback to the H9 technical team about this).
  3. By default, it tries to fill all available space. Use the reservedSize config option to keep some breathing room.

Step-by-Step Guide

1. Extract the Plotter

After downloading, unpack the H9 plotter wherever you like.

2. Config File Tweaks

Find the config.yaml file in the extracted folder and open it in a text editor. Here's a starting point that cuts out the fluff, use something like this if you only want this to do plotting:

path:
- "S:/PostData"
log:
lv: info
path: ./log/
name: miner.log
extraParams:
disableInitPost: true
disablePoST: true
disablePlot: false
device: ""
maxFileSize: 4
numUnits: 32
# Reserved disk space size, unit GiB
reservedSize: 4
# Skip uninitialized directories to speed things up
skipUninitialized: false
# Concurrent plotting instances (each uses ~3G VRAM)
plotInstance: 1
serverPort: 10088

Adjust the path to your desired Spacemesh storage location. You might also want to tweak numUnits and reservedSize based on your storage situation.

There are a lot of other settings in the default config that we’re not interested in right now, but I’ll go over them in future articles.

3. Fire It Up

  • Windows users:
  • For standard version: Run h9-miner-spacemesh-console.exe
  • For CUDA-enabled GPUs: Run h9-miner-spacemesh-console-cuda.exe (Much faster on supported cards—most modern NVIDIA GPUs with CUDA cores should work)
  • Linux folks: Execute h9-miner-spacemesh-linux-amd64 or h9-miner-spacemesh-linux-cuda-amd64 as appropriate.

By default it should pick up the local config.yaml and start.

To bypass the responsibility waiver prompt, add -license yes to the end of your command. This accepts the waiver immediately without requiring you to type 'yes'. For example:

h9-miner-spacemesh-console-cuda.exe -license yes

4. Watch It Go

The plotter will start churning out your Spacemesh storage. This could take a while, depending on your GPU and storage speed. But thanks to CUDA optimization (if you’re using the CUDA version), you should see the progress bar moving faster than with postcli.

Here’s an example of what you might see in the output:

***************************************************
**** Miner:H9-Miner-SpaceMesh
**** Version:v4.0.0 4
**** BuildTime:2024-07-04-16:10:20 GMT
**** MinerName:*
**** ApiKey:
**** Path count:1
***************************************************

time="2024-07-08 06:27 40" level=info msg="Start plot" Path=1 PlotInstance=1 SkipUninitialized=false
time="2024-07-08 06:27 40" level=info msg="Disk usage" free="28.44 TiB" path="S:/PostData" used="28.44 TiB"
ID 0 Name [GPU] NVIDIA GeForce RTX 3080 8.6 128 136 8912896 device_id: 0 Type GPU

[2024-07-08 06:28:07] Speed:[5.57 MiB/s] Progress:[2.34%] File:[0/7264] Wait:[0] Path:[S:\PostData/post_0d26f94a4e285b2f0857fd356d4568df5a2b6be5861b1190be0de5f3dfd28e87]
DeviceID:[0] Speed:[7.17 MiB/s] Commitment:[34f0bca526a8e582268b3d8465b1cb49f926aaf50b34dae10aed4d304d54f198]

This output shows the plotter version, GPU information, and progress updates. You’ll see the speed, progress percentage, and file information updating regularly.

Performance Optimization

Want to squeeze every ounce of performance out of your setup? Here are some tips:

  1. Use the CUDA version if you have a supported NVIDIA GPU. It’s like strapping a rocket to your plotter. Seriously, I saw huge speed gains over the standard edition.
  2. Experiment with the plotInstance value in your config. Starting with 1 is safe, but you might see better performance with 2 or 3 on high-end GPUs. Just remember, each instance gobbles up about 3GB of VRAM.
  3. If you’re plotting to multiple drives, list them all under the path section in your config. The plotter will distribute the workload across them.
  4. Keep your GPU drivers up-to-date.
  5. Monitor your GPU temperatures. If they’re getting toasty, consider improving your cooling setup. A cool GPU is a happy (and efficient) GPU.

Monitoring Your Progress

Keeping an eye on your plotting progress is important. Here’s what to look out for:

  1. Speed: This is how fast you’re generating plot data. Higher is better, obviously.
  2. Progress: This percentage tells you how close you are to finishing the current file.
  3. File: Shows which file (out of how many) is currently being worked on.
  4. Wait: Ideally, this should be 0. If it’s consistently higher, your storage might be bottlenecking your GPU.

If you see the speed dropping significantly or the ‘Wait’ value climbing, it might be time to do some troubleshooting.

Frequently Asked Questions

Q: How long will plotting take? A: It depends on your GPU, storage speed, and how much you’re plotting. Could be hours, could be days. Grab a coffee (or ten) and settle in for the long haul.

Q: Can I use my computer while plotting? A: Sure, but any extra load you place on the GPU will extend the plotting time. Expect some slowdown in GPU-intensive tasks.

Q: What if the plotter crashes? A: First, don’t panic. Check your config, make sure you have enough free space, and give it another go. If it keeps happening, the Spacemesh community forums are your new best friend. If you need to stop the plotter for any reason, go for it. It will resume right where it left off next time you run it.

Q: Can I move my plotted files to another machine? A: Absolutely! Just make sure to stop your old node first and move the files over to the new location before running the new node.

My upcoming article will cover multi-GPU plotting using multiple machines. Stay tuned, keep plotting, and stay curious.

--

--

TickTockBent

I write a few unofficial articles to help understand Spacemesh but I am not affiliated with the team in any way.