It will happen automatically on the next compaction.
Does that include all data required for memtables, or will they slowly inflate as more and more compactions happen? ![]()
There are 2 hashtables per satellite and they will switch one by one when they get compacted. Should take about 2 days for all of them to get compacted once.
Ahh, that’s cool. I’m continuing to see RAM consumption rise over the last few days, with memtables now supporting ~100TB of nodes. Very interesting! ![]()
edited for clarification on consumption
I have 32GB RAM in the Ubuntu Server rig, running 2 nodes. The drives are 22+24TB. I don’t know if they will ever get filled, but if they do and the memtable runs out of memory, what happens?
Second, what happens when the system shuts down with UPS? Are the memtables saved on disk and reloaded at the next restart? Or they are deleted and recreated on each restart?
Third, what happens when the system shuts down without UPS?
And the most important question:
Is there a real advantage, backed up by real numbers, for winning races and store more data?
HDD utilisation can be 100% for what I care; I care only about the payout at the begining of each month.
Memtbl stores changes in another log file, so when you restart, it’s loaded and continues to work. If this file is corrupted, it should trigger a fsck on restart to rebuild missing memtbl.
Your system will use a swap file/drive.
Ou, so after it fills the RAM, starts using the OS SSD (if there is one). Good to know.
It would be nice to be able to allocate how much RAM it can use, not to fill it and make the system laggy.
(thanks for those pointers; I know this was discussed in the past, but couln’t find where.)
I don’t think that there is any. However, you may specify a memory limit for the docker container. It will kill the container, if the usage would be more than allowed.
You don’t want that. The process will be killed without any chance to clean up files, so you will restart with an fsck. And likely if the node reached the memory limit once, it will reach it again and again, leading to even more fscks.
Thanks for the hint with memtbl, I activated it on all of my nodes a few days ago and the IO pressure reduced a lot.
For roughly 150TB used space my nodes are using 100GB memory now.
Moving the hash tables to SSD removed about 50 IOPs per node from a disk array at today’s load. This is about 50% of the IO each node generates. Not bad.
85% of those offloaded IOPs were writes.
Measured with dtrace on freeBSD by counting each io operation sent to node datasets.
Handy dandy scripts:
#!/usr/sbin/dtrace -qs
fbt::vdev_queue_io:entry
{
this->z = (zio_t *)arg0;
@n[this->z->io_bookmark.zb_objset, /* dataset objset id, see below */
this->z->io_vd->vdev_top->vdev_id, /* 0,2,4 = raidz HDD; 3 = special SSD on my array, check yourss*/
this->z->io_type] = count(); /* 1 = read, 2 = write */
}
tick-1s /++secs >= $1/ { exit(0); } /* argument to a script is how many seconds to watch for */
Then use
zfs get -r -H -p -o name,value objsetid pool1
to dump names and ids of datasets to reconcile with the above.
To get indexes of your vdevs use `zdb -C and look at top level children
That’s very respectable gains.
I’ve moved all of mine to memtable, and see similar results. It does eat ~70GB of memory, which the ARC now has less of. I have plenty plenty of space left on the special meta device, so I am contemplating creating a dataset with record size matching special_small_blocks to force it onto that.
On one hand, this seems wasteful (at current ram prices!). On the other hand – this workload does not benefit from more arc space, so if you have ram – might as well use it; not using it would be wasteful. (at current ram prices!
)
I added back another 64GB of ram for a week to a total of 128 and these were the effects:
- the ghost cache hits reduced from about 10% to 2% (see
kstat.zfs.misc.arcstats.mru_ghost_hitsandkstat.zfs.misc.arcstats.mfu_ghost_hitscounters) - Memory speed reduced from 2400MT/s to 2133 MT/s – what I assume is processor/layout/physics driven requirement; it can be forced back to 2400 but I’m not going to risk angering signal integrity deities. And for NAS this is wholly irrelevant. It just bothersome for the mind
- Additional memory consumes additional 4W-ish, as reported by PCM. Not much but not nothing.
The former does not make up for the latter two.
Dataset forcing data to special device makes the most sense. Cheap (compared to ram) and fast (compared to disks). I’ve set record size to 4k on it.
BTW TrueNAS middleware will show a big fat red “WARNING: Based on the pool topology, 32K is the minimum recommended record size. Choosing a smaller size can reduce system performance.” which can be ignored, because it checks widest vdev for the recommendation, and none of the data here will go to hard drives.
an aside
On the trueness front: I decided to not move to vanilla freebsd 15 just yet. Instead, I asked robot friend to port any meaningfully affecting me security advisories and rebuild the kernel. I’ve also created a local mirror of 13.3 packages, so I’ll continue using TrueNAS Core until I HAVE to move.
That will likely be when storagenodes out of the things updates go to the version that requires newer kernel support. This already happened once (in the user space, forcing me to upgrade jails to 13.4 from 13.3, but fortunately, only user space was affected, and while newer than kernel user space is not ideal, it’s better than alternatives), and will eventually happen again. At which point I would need to either maintain my own storage node build with the older compiler, or abandon truenas and rewrite all my scripting around middleware.
Since neither this nor that will be actually done by me, I don’t care either way. But to prepare, Ive setup a service that checks the released on GitHub storage node daily, and stop every storagenode_updater service on every node if it notices the soon-to-be-deployed binary is no longer compatible. This gives me a few thing to contemplate my life choices.
– Why don’t you move to Scale already?
– Scale? On Linux?! No.
another aside
Some accuse me of using AI for writing, because of em-dashes. I’ve been using em-dashes since before it was cool, (and then uncool). So now I moved to en-dash. It’s Option+- on a Mac. Not a big deal, just as easy to type as --
Zen 4 cpu in my workstation has the same. I deliberately chose to get only 64 GB to avoid memory slowing down.
![]()
I want to change away from memtable to hashtable on SSD. Anything I need to keep in mind, when going that way? ![]()
It will migrate on the next compaction.