[GH-ISSUE #5519] [Engine] Strata is treating ZFS ARC Cache as unreclaimable memory, limits its own ram allocation with usable memory to spare #5488

Open
opened 2026-11-08 02:47:48 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @tannisroot on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5519

Specs:
GPU: RTX 5060 Ti 16GB
CPU: Ryzen 5950X
RAM: 128GB DDR4
OS: TrueNAS CE 25.10.8
Strata: 0.2.12, official docker cuda13 image
Model: UD-Q4_K_XL

On a typical Linux system with openzfs, the ZFS filesystem will use almost all available RAM for ARC cache, which if another program needs it, will get evicted. On my system, ARC cache can grow to 100 GB.
When Strata is doing its calculation for how much memory it can allocate for the model in system ram, it treats ARC cache as memory that cannot be reclaimed and reduces its system memory footprint to account for that, which leads to heavy SSD usage and degraded performance.
In strata monitor, memory shows up as almost entirely filled, even though most of it is just ARC cache.
For Strata to actually use all the memory it needs and avoid reading heavily from the SSD, I have to run echo 3 > /proc/sys/vm/drop_caches as a root user to drop ZFS cache from RAM.
For information, this is what my /proc/meminfo looks like with ARC is filled up to around 60GB:

MemFree:        48303912 kB
MemAvailable:   52598280 kB
Buffers:             884 kB
Cached:          5299252 kB
SwapCached:            0 kB
Active:         16325048 kB
Inactive:         260820 kB
Active(anon):   11832632 kB
Inactive(anon):        0 kB
Active(file):    4492416 kB
Inactive(file):   260820 kB
Unevictable:           8 kB
Mlocked:               8 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Zswap:                 0 kB
Zswapped:              0 kB
Dirty:               116 kB
Writeback:             0 kB
AnonPages:      11095852 kB
Mapped:          1704944 kB
Shmem:            547016 kB
KReclaimable:     788440 kB
Slab:            2077260 kB
SReclaimable:     788440 kB
SUnreclaim:      1288820 kB
KernelStack:       54640 kB
PageTables:       112328 kB
SecPageTables:      3236 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    65907032 kB
Committed_AS:   36785044 kB
VmallocTotal:   34359738367 kB
VmallocUsed:     3583680 kB
VmallocChunk:          0 kB
Percpu:            37632 kB
HardwareCorrupted:     0 kB
AnonHugePages:   4495360 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
CmaTotal:         262144 kB
CmaFree:          228680 kB
Unaccepted:            0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:     1089964 kB
DirectMap2M:    17692672 kB
DirectMap1G:    115343360 kB

And this is memory usage from TrueNAS dashboard:

Image

From my understanding there is no way for Strata to know those 60GBs are reclaimable from /proc/meminfo, so if this issue is to be fixed, some other metric will need to be used for systems with ZFS, like one from ZFS - /proc/spl/kstat/zfs/arcstats, which is available within a docker container as well.

Originally created by @tannisroot on GitHub (Nov 7, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5519 Specs: GPU: RTX 5060 Ti 16GB CPU: Ryzen 5950X RAM: 128GB DDR4 OS: TrueNAS CE 25.10.8 Strata: 0.2.12, official docker cuda13 image Model: UD-Q4_K_XL On a typical Linux system with openzfs, the ZFS filesystem will use almost all available RAM for ARC cache, which if another program needs it, will get evicted. On my system, ARC cache can grow to 100 GB. When Strata is doing its calculation for how much memory it can allocate for the model in system ram, it treats ARC cache as memory that cannot be reclaimed and reduces its system memory footprint to account for that, which leads to heavy SSD usage and degraded performance. In strata monitor, memory shows up as almost entirely filled, even though most of it is just ARC cache. For Strata to actually use all the memory it needs and avoid reading heavily from the SSD, I have to run `echo 3 > /proc/sys/vm/drop_caches` as a root user to drop ZFS cache from RAM. For information, this is what my `/proc/meminfo` looks like with ARC is filled up to around 60GB: ```MemTotal: 131814068 kB MemFree: 48303912 kB MemAvailable: 52598280 kB Buffers: 884 kB Cached: 5299252 kB SwapCached: 0 kB Active: 16325048 kB Inactive: 260820 kB Active(anon): 11832632 kB Inactive(anon): 0 kB Active(file): 4492416 kB Inactive(file): 260820 kB Unevictable: 8 kB Mlocked: 8 kB SwapTotal: 0 kB SwapFree: 0 kB Zswap: 0 kB Zswapped: 0 kB Dirty: 116 kB Writeback: 0 kB AnonPages: 11095852 kB Mapped: 1704944 kB Shmem: 547016 kB KReclaimable: 788440 kB Slab: 2077260 kB SReclaimable: 788440 kB SUnreclaim: 1288820 kB KernelStack: 54640 kB PageTables: 112328 kB SecPageTables: 3236 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 65907032 kB Committed_AS: 36785044 kB VmallocTotal: 34359738367 kB VmallocUsed: 3583680 kB VmallocChunk: 0 kB Percpu: 37632 kB HardwareCorrupted: 0 kB AnonHugePages: 4495360 kB ShmemHugePages: 0 kB ShmemPmdMapped: 0 kB FileHugePages: 0 kB FilePmdMapped: 0 kB CmaTotal: 262144 kB CmaFree: 228680 kB Unaccepted: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB Hugetlb: 0 kB DirectMap4k: 1089964 kB DirectMap2M: 17692672 kB DirectMap1G: 115343360 kB ``` And this is memory usage from TrueNAS dashboard: <img width="973" height="740" alt="Image" src="https://github.com/user-attachments/assets/fb1f6fa6-9f04-40b4-b1e9-66e3bd258961" /> From my understanding there is no way for Strata to know those 60GBs are reclaimable from `/proc/meminfo`, so if this issue is to be fixed, some other metric will need to be used for systems with ZFS, like one from ZFS - `/proc/spl/kstat/zfs/arcstats`, which is available within a docker container as well.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 7, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6711891115 --> @github-actions[bot] commented on GitHub (Nov 7, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 7, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6711896773 --> @github-actions[bot] commented on GitHub (Nov 7, 2026): Thanks, this follows the format now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5488
No description provided.