System getting slow after some time - restart fixes it. 25.04.0

Hey there,

I set up my Truenas System about half a year ago and for a long time it ran without issues. The last 2 Months the system has gotten almost unusably slow after a few hours after a restart. The UI gets really slow (the apps screen loads fpr up to 3 minutes), the shares get quite unresponsive and the apps dont perform decently. The issue also occured in a 24.xx.x Version, but i dont remember which version exactly it was.

Im using the following apps: HomeAssistant, Faster Whisper, Eclipse Mosquito, olllama, piper and a staisfactory server. Having them all running doesnt even come close to using all of the RAM/CPU.

The system specs are:

Ryzen 3700x
32gb DDR4 RAM
3x 2gb Seagate Barracudas in Raid Z1 (20% used)
Truenas-Version: 25.04.0

Thanks in advance and please let me know if you need any additional Information

Some additionaly helpful information might be:

Home Assistant: Saving Automations and seeing them takes unusually long (from instant to 10+sec) with home Assistant installed on ix-applications

Shares take up to 30 sec to load a folder which has almost no files in it

This command fixed it for me:

echo n | sudo tee /sys/kernel/mm/lru_gen/enabled
sudo sysctl vm.swappiness=1

Your most likely problem will be your disks. Your Seagate Baracuda drives are SMR which is known to cause slowness, system instability and in more severe cases data loss.
It’s also recommended to run apps from a deditacted ssd pool not a hdd based one.

1 Like

As in my comment, setting the vm-swappiness to 1 fixed it. I can write to the NAS sustained with 1Gbit/s. Although data loss is quite the severe issue. Im planning to upgrade to 3x20tb (propably a seagate exxos or similar) and that will propably fix the issue.

Generelly the OS runs on a 128GB SSD, would it be possible to move the apps on that drive or is that generally a bad idea?

You can’t use the os disk for anything else. You need dedicated ssds for an apps pool.

Do you even have swap partitions on your drives?

If, as you say, you set your system up half a year ago, TrueNAS had stopped creating swap partitions.

Thank you, that makes sense. Should i rather buy 1x 256gb or 2x 128 and run the latter in Raid?

Depends on how many apps you want to run, or if you also plan to maybe run a small vm (which also should run from ssds not hdds).
Since normal sata ssds suffice for basic app and vm use, i’d get a pair fo 240-512gb ssd and use a mirror for redundancy.

I dont think so:

free -h

           total        used        free      shared  buff/cache   available

Mem: 31Gi 23Gi 7.4Gi 264Mi 909Mi 7.6Gi
Swap: 0B 0B 0B

Are they something i should have or ist that a good thing?

Swap was disabled for a reason, so no, you should not try to enable it yourself.

I am just pointing out why I don’t think those two commands you ran earlier actually changed anything.

You are not using any swap.Your issue is related to something else.

That makes sense. But the main issues i had actually went away. Usually after 12h of uptime the apps screen loads for at least 10sec, now its instant. But do you have any idea where i can start looking for alternative Problems?

Only a few ideas.

You say that running your apps doesn’t use all your RAM, but I see some potentially memory hungry apps on your list.

What does the RAM situation look like when it’s been 12 hours and the system has become slow?

Btw, those Barracudas are likely SMR, so if anything ever attempts long writes on those you have a high risk of running into the SMR bottleneck, potentially faulting the drives/pool.


Thats the RAM-Usage over time.

Uptime is about 18h atm

Also looked at the Serial-Numbers of the Drives and yes, they are SMR. So needless to say im making a Backup of all important files.

What do you define as long writes/how worried should i be in general? A write of about 500gb didnt cause any issues)

That looks okay, no warning signs at least.

Typically it comes up when people are in a faulted state already and need to resilver. That extended activity definitely has the potential of running into the SMR limits. I don’t know enough about the issue to say if a 500GB write is likely to run into any problem.

1 Like

Yeah, currently there are no issues.

Ive looked into the components needed for a sensible Upgrade, if its okay for you id like your opinion on them and whats most important:

3x 20tb Seagate Exxos X20 or X24 800-1000€

32GB additional ECC RAM 2x Kingston 16GB DDR4-2666 CL19 (KTD-PE426E/16G) - The Mainboard doesnt support ECC, but i bought those modules some time ago and want to match them

2TB M.2 SSD for lvl 1 arc https://geizhals.de/lexar-nm620-2tb-lnm620x002t-rnnn-a2661656.html

i know not having ECC is quite problematic, but retrofitting it would require a new Motherboard and a new case given i cant really find any ECC-Motherboards that are micro ATX with 244x210mm

Without knowing your usecase i’m 99% certain that you do not need a 2TB ssd for l2arc.

Video Streamin is propably the heaviest workload. i Thought the general recommendation was 40gb/TB, so roughly 2,4TB

L2arc won’t help you with that usecase (only if you would stream the same movies/sieries over and over again).
After some time using your nas drop to shell or an ssh session and check with arc_summary how your arc_hit_ratio is like. If it’s above 90% you do not need an l2arc.

Edit:
My usecase is very similar to yours. Mostly media streaming and i run arouond 30 apps. My arc hit rate is 99.99%. In the very beginning i tried adding an l2arc, but it literally did nothing for my usecase.

1 Like