# \[Tech Preview\] Hashstore backend for storage nodes

**URL:** <https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724>\
**Category:** STORJLINGS\
**Tags:** hashstore\
**Created:** [December 5, 2024, 3:24pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724 "2024-12-05T15:24:20Z")\
**Posts on this page:** 20\
**Page:** 27

<div class="post-metadata">

**Author:** ![seanr22a](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/seanr22a/32/68_2.png) [@seanr22a](https://forum.storj.io/u/seanr22a)\
**Post date:** [August 19, 2025, 11:03am UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/527 "2025-08-19T11:03:40Z")

</div>

I’ve been running hashstore on all my nodes(24) since it was released. I do not have a piece node to compare with but what I can see from monthly payment (going up a little every month) and the incoming data is about the same so no alarming changes here. I’m in northern europe and asia.

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [August 19, 2025, 11:04am UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/528 "2025-08-19T11:04:10Z")

</div>

4tb hashstore with 1 tb free have 4.7Gb MFT files, and 4tb piecestore with 1tb free have 22,5GB of MFT files

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [August 19, 2025, 11:08am UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/529 "2025-08-19T11:08:49Z")

</div>

I have only 1 server with 15 hashstore nodes, all other is piecestore. same here, i monitoring it, even storage on same ammount(as lot of old file deletes) Egress is rising from month to month, so payouts are rising.

---

<div class="post-metadata">

**Author:** ![Julio](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/julio/32/1132_2.png) [@Julio](https://forum.storj.io/u/Julio)\
**Post date:** [August 19, 2025, 11:21am UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/530 "2025-08-19T11:21:46Z")

</div>

I like piecestore and I do not use badger… I would rather never even have heard the concept that they’re even thinking -in any way- about ‘rolling it out to all nodes’

2 cents,

Julio

---

<div class="post-metadata">

**Author:** ![EasyRhino](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/easyrhino/32/1133_2.png) [@EasyRhino](https://forum.storj.io/u/EasyRhino)\
**Post date:** [August 19, 2025, 3:22pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/531 "2025-08-19T15:22:39Z")

</div>

> [@Roxor](#):
>
> But it would be nice to know a bit about how recovery works? Right now disk/filesystem errors can result in a handful of .sj1 files being nuked: which is survivable. If the key hashstore tables get damaged can they be rebuilt (even if it means reading all the data/log files)? Or is the node “just gone”?

Yes good thought as someone who is trying to copy files off two failing hard drives currently, the saving grace of millions of tiny files is that losing a few isn’t a big deal.

I haven’t been paying attention, but is the hash file size adjustable? For recovery and also file fragmentation it might be useful to keep them smallish. like 1GB or 100MB even.

---

<div class="post-metadata">

**Author:** ![arrogantrabbit](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/arrogantrabbit/32/11200_2.png) [@arrogantrabbit](https://forum.storj.io/u/arrogantrabbit)\
**Post date:** [August 19, 2025, 4:01pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/532 "2025-08-19T16:01:00Z")

</div>

+1. I too prefer piecestore.

> [@elek](#):
>
> On the other hand, hashstore requires only the scanning of 2x 4-16GB files, which is way easier, and cache friendly. And performance can further be improved with SSD or more memory, if required.

I absolutely don’t want the periodic compaction process, that will murder performance of my server for the duration: it cannot be offloaded and will send io to disks. My server is not a dedicated storj machine, it serves other purposes, and I vastly prefer consistent workload to bursty.

Filewalker is not a problem as it only touches SSDs. Compaction will have to send ID to disks.

What shall I add to config files to stay on piecestore indefinitely? It works, not broken — don’t fix.

---

<div class="post-metadata">

**Author:** ![elek](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/elek/32/9189_2.png) [@elek](https://forum.storj.io/u/elek)\
**Post date:** [August 19, 2025, 4:05pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/533 "2025-08-19T16:05:12Z")

</div>

> [@Roxor](#):
>
> If the key hashstore tables get damaged can they be rebuilt (even if it means reading all the data/log files)? Or is the node “just gone”?

Yeah, it’s possible. Here is the utility to do that one:

[https://review.dev.storj.tools/c/storj/storj/+/17475](https://review.dev.storj.tools/c/storj/storj/+/17475)

(TLDR; each “entry” in the log file contains metadata right after the raw bytes. If you read log files from the end to the beginning, and skip data bytes, you can recover the metadata)

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [August 19, 2025, 4:13pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/534 "2025-08-19T16:13:34Z")

</div>

is this tool somehow automated, when node discover corruption, or you need run it manually?

---

<div class="post-metadata">

**Author:** ![elek](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/elek/32/9189_2.png) [@elek](https://forum.storj.io/u/elek)\
**Post date:** [August 19, 2025, 4:15pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/535 "2025-08-19T16:15:06Z")

</div>

> [@arrogantrabbit](#):
>
> I absolutely don’t want the periodic compaction process, that will murder performance of my server for the duration: it cannot be offloaded and will send io to disks. My server is not a dedicated storj machine, it serves other purposes, and I vastly prefer consistent workload to bursty.
> 
> Filewalker is not a problem as it only touches SSDs. Compaction will have to send ID to disks.

Compaction is way cheaper than the file walker. If you have no problem with file walker, compaction shouldn’t be a problem either.

Especially if you have SSD: you can move the hashtable to SSD. Compaction can be a few minutes per day… (depends on the node size / number of deleted records / etc…)

Today we have a configuration option to opt-out from the migration (see the patch [https://review.dev.storj.tools/c/storj/storj/+/17819](https://review.dev.storj.tools/c/storj/storj/+/17819) Note: don’t use it today, it will be part of the next release.)

But the very long term plan is removing the piecestore code all together, **IF** hashstore is proven to be the best option on public network, too.

There is no point to maintain two different storage layer, if the one is superior. (but we are ready to fix problems, if something is still painful for the public network)

---

<div class="post-metadata">

**Author:** ![elek](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/elek/32/9189_2.png) [@elek](https://forum.storj.io/u/elek)\
**Post date:** [August 19, 2025, 4:16pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/536 "2025-08-19T16:16:26Z")

</div>

> [@Vadim](#):
>
> is this tool somehow automated, when node discover corruption, or you need run it manually?

Today, it’s manual. It supposed to be very rare when SN looses the metadata. And even if it happens, it’s better to have human it the loop to double check if it’s not just a configuration / mounting error.

---

<div class="post-metadata">

**Author:** ![Roxor](https://storj.bcdn.literatehosting.com/letter_avatar/roxor/32/6_449c533f586939b6e5f246632a46421f.png) [@Roxor](https://forum.storj.io/u/Roxor)\
**Post date:** [August 19, 2025, 4:40pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/537 "2025-08-19T16:40:11Z")

</div>

> [@arrogantrabbit](#):
>
> I absolutely don’t want the periodic compaction process, that will murder performance of my server for the duration

Aren’t they trying to replace the consistent streams of random IO (.sj1 files all over the place), with sequential writes to the 1GB log files? It’s not bursty-vs-consistent that’s the problem - as systems are typically very good at handling sequential transfers. It’s the random tiny IO that murders the performance of your server.

---

<div class="post-metadata">

**Author:** ![arrogantrabbit](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/arrogantrabbit/32/11200_2.png) [@arrogantrabbit](https://forum.storj.io/u/arrogantrabbit)\
**Post date:** [August 19, 2025, 4:49pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/538 "2025-08-19T16:49:55Z")

</div>

> [@elek](#):
>
> Compaction is way cheaper than the file walker. If you have no problem with file walker, compaction shouldn’t be a problem either.

This is not necessarily true. Example: zfs pool with special device.

Metadata resides on an SSD, data on HDD. The IOPS budget of HDD is severely limited (200-300iops), while on SSD it’s unlimited for all intents and purposes. (I have a very beefy intel P3600, filewalker saturates CPU way before P3600 feels anything). Therefore I don’t worry about metadata IO, but do worry about data IO.

With piecestore we have a lot of IO on SSD, and don’t have compaction: zero IO to HDDs.

With hashstore we have fewer IO to SSD (it wasn’t a problem to begin with): and some IO to HDD

Therefore, from my perspective, hashstore is a regression: Not only it adds an “expensive” HDD IO that did not exist before, but also does it in bursty manner.

Since the system is designed (number and size of data vdevs) to support the required consistent IO pressure, there may not be enough room to absorb node’s compaction generated HDD IO without affecting other tasks.

TLDR – piecestore IO is “free”, compaction IO is very expensive.

> [@elek](#):
>
> Compaction can be a few minutes per day… (depends on the node size / number of deleted records / etc…)

Amount of work needed for compaction will somewhat correlate with the amount of TTL data on the node, and can be significant in the worst case.  
Even if that amount is small – the bursty nature of this new IO workload may still present a problem on tuned systems.

> [@elek](#):
>
> There is no point to maintain two different storage layer, if the one is superior. (but we are ready to fix problems, if something is still painful for the public network)

Totally agree.

May I suggest the following then:

- Allow to define blackout time periods when compaction is forbidden from running
- Allow to specify max IOPS compaction is allowed to consume (can be indirectly – e.g. process no more than N logs in M seconds)

---

<div class="post-metadata">

**Author:** ![arrogantrabbit](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/arrogantrabbit/32/11200_2.png) [@arrogantrabbit](https://forum.storj.io/u/arrogantrabbit)\
**Post date:** [August 19, 2025, 5:03pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/540 "2025-08-19T17:03:36Z")

</div>

> [@Roxor](#):
>
> Aren’t they trying to replace the consistent streams of random IO (.sj1 files all over the place), with sequential writes to the 1GB log files?

Reads are still random. Writes are already serialized by zfs (in a transaction group). So nothing really changes here.

However, hashstore does hide the truth about files inside opaque blobs so filesystem cannot optimize access anymore. This is counteracted with more optimized usage pattern – essentially, it’s hiding some data inside mini-filesystems, and trading optimizations by big filesystem for inherent efficiency of purpose-build data layout. For TTL heavy nodes on dedicated hardware this evidently proved to be a winning strategy. I just don’t belive it is the case for the intended storagenode hosting usecase, where node is not a primary consumer of resources, but rather a guest.

> [@Roxor](#):
>
> It’s the random tiny IO that murders the performance of your server.

Not all random IO is the same: random IO to SSD is free. Random IO to HDD is very expensive. Swapping piecestore with hashstore reduces amount of free random IO and increases amount of expensive random IO. Even if reduction of free IO is massive and increase of expensive IO small – it’s still very bad – because net result is just additional expensive IO, however small it is claimed to be.

To your point, writing a piecestore file is less expensive than writing to the end of a log file: you don’t have a seek to the end operation. So it’s worse on all fronts, _provided_ metadata access is free. Which it is, on well configured servers.

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [August 19, 2025, 5:25pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/541 "2025-08-19T17:25:24Z")

</div>

I think 90% of node operators dont use any ZFS with SSD cache

---

<div class="post-metadata">

**Author:** ![elek](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/elek/32/9189_2.png) [@elek](https://forum.storj.io/u/elek)\
**Post date:** [August 19, 2025, 5:26pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/542 "2025-08-19T17:26:40Z")

</div>

> [@arrogantrabbit](#):
>
> With piecestore we have a lot of IO on SSD, and don’t have compaction: zero IO to HDDs.
> 
> With hashstore we have fewer IO to SSD (it wasn’t a problem to begin with): and some IO to HDD

I am not fully sure about this. Assuming you write and read files, it’s not zero IO.

Maybe you talk about walker vs compaction (but Badger cache is just a cache, it stores the data what should be read at least once).

Still write/read needs IO, which is way more painful with ext4 + millions of sj1 file.

Compaction can use sequential read / write, which is easier.

I have seen monitoring data of hundred of nodes. We tried badger cache / hashstore / hashstore + ssd for hashstore metadata / hashstore + memtbl / …. We closely followed the IO pressure on the machines. Hashstore was way better, all the time. Just try it out, and collect Prometheus data.

We also test hashstore with the worst scenario (huge number of TTL data). And it works well.

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [August 19, 2025, 5:29pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/543 "2025-08-19T17:29:27Z")

</div>

did you made any NTFS tests?

---

<div class="post-metadata">

**Author:** ![EasyRhino](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/easyrhino/32/1133_2.png) [@EasyRhino](https://forum.storj.io/u/EasyRhino)\
**Post date:** [August 19, 2025, 5:32pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/544 "2025-08-19T17:32:56Z")

</div>

> [@arrogantrabbit](#):
>
> Not all random IO is the same: random IO to SSD is free. Random IO to HDD is very expensive.

Remember, though, you have an optimized ZFS setup with metadata on SSD. The average potato node, or even a high end node that just isn’t using ZFS, may not have this setup. And if all of the data is on the disk then that random i/o like metadata updates, filewalkers and file deletion is slow.

Also, tangent, but isn’t the ZFS ARC based on blocks, not files? So it might be able to cache _part_ of a hash file? My memory may not be right.

---

<div class="post-metadata">

**Author:** ![arrogantrabbit](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/arrogantrabbit/32/11200_2.png) [@arrogantrabbit](https://forum.storj.io/u/arrogantrabbit)\
**Post date:** [August 19, 2025, 6:29pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/545 "2025-08-19T18:29:57Z")

</div>

> [@elek](#):
>
> Assuming you write and read files, it’s not zero IO.

Right, but that is the minimum necessary baseline that needs to happen in either case. Then with piecestoreo you also have tons of metadata free IO, and with hashstore – additional albeit small amount of HDD io – seeks inside log files and copies.

> [@elek](#):
>
> Still write/read needs IO, which is way more painful with ext4 + millions of sj1 file.

I think this is the crux of the issue. I feel ext4 is an ancient filesystem not suitable for modern workloads. It sucks at many small files. It wasn’t designed for it. So, why are we optimizing for it?

Which brings me to Vadim’s and Easy Rhino points:

> [@Vadim](#):
>
> I think 90% of node operators dont use any ZFS with SSD cache

> [@EasyRhino](#):
>
> The average potato node, or even a high end node that just isn’t using ZFS, may not have this setup

_I_ think 90% of people use ZFS. Those that don’t – should. The remaining 10% – btrfs, they haven’t migrated to zfs yet, because Synology won’t let them.

On the serious node – do we know _actual_ distribution? Is the filesystem type part of telemetry?

Is the majority of nodes seriously running on raspberry pies and various windows? Nothing wrong with it from the network performance and data durability standpoint – but where is “use what use have” and “share already online” capacity? I’d expect already online capacity to be mostly on zfs arrays, not ext, let alone ntfs. Bringing raspberry pi and old windows gaming rig online to run nodes directly contradicts to the spirit of the project.

> [@elek](#):
>
> Compaction can use sequential read / write, which is easier.

How can it be sequential? By nature it’s read one log while writing filtered copy into the second, no? (_zfs_ would batch writes, but not other filesystems, that seems to be the goal here)

> [@elek](#):
>
> I have seen monitoring data of hundred of nodes. We tried badger cache / hashstore / hashstore + ssd for hashstore metadata / hashstore + memtbl / …. We closely followed the IO pressure on the machines. Hashstore was way better, all the time. Just try it out, and collect Prometheus data.

I don’t disagree that node performs better. My concern was with:

- if it’s already great, better than great is still great
- what is the impact of making it greater on other services (additional io from compaction)

> [@elek](#):
>
> Just try it out, and collect Prometheus data.

Ok, I will, on a few nodes.

To summarize, I agree with:

> [@Roxor](#):
>
> If Storj thinks it’s the way forward, I’ll follow.

I’m sure it’s going to be fine either way.

> [@EasyRhino](#):
>
> Remember, though, you have an optimized ZFS setup with metadata on SSD.

MMm.. It’s a cheap home server from unwanted parts. I’m not running an AI datacenter at home :).

> [@EasyRhino](#):
>
> And if all of the data is on the disk then that random i/o like metadata updates, filewalkers and file deletion is slow.

> [@EasyRhino](#):
>
> So it might be able to cache _part_ of a hash file? My memory may not be right.

Caching is worse than metadata access being fast in the first place. My server has about 600GB of metadata. Having 600+GB of ram, let alone available for ARC is not practical. And even if it was, first access will be still slow…

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [August 19, 2025, 6:43pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/546 "2025-08-19T18:43:53Z")

</div>

for me and for lot of other people, windows and NTFS work and will work better than systems that i do not know how to cook.

---

<div class="post-metadata">

**Author:** ![RecklessD](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/recklessd/32/1130_2.png) [@RecklessD](https://forum.storj.io/u/RecklessD)\
**Post date:** [August 19, 2025, 10:18pm UTC](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724/547 "2025-08-19T22:18:04Z")

</div>

> [@arrogantrabbit](#):
>
> May I suggest the following then:
> 
> - Allow to define blackout time periods when compaction is forbidden from running
> - Allow to specify max IOPS compaction is allowed to consume (can be indirectly – e.g. process no more than N logs in M seconds)

+1 For this, and for any other periodic house keeping processes.

> [@elek](#):
>

ZFS filesystem with multiple vdevs shouldn’t be overally impacted.

It’s the low memory, single drive system that would likely suffer, but with less files - metadata, filesystems like NTFS and ext3 will perform bettern than on piecestore.

[Previous page](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724.md?page=26)

[Next page](https://forum.storj.io/t/tech-preview-hashstore-backend-for-storage-nodes/28724.md?page=28)
