Skip to content

[SoftCSA] Restore original recording buffer size to reduce LowMem pre… - #4377

Merged
WanWizard merged 1 commit into
OpenPLi:scarthgapfrom
kueken:Lowmem
Sep 6, 2026
Merged

WanWizard merged 1 commit into
OpenPLi:scarthgapfrom
kueken:Lowmem

Conversation

@kueken

@kueken kueken commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

…ssure

The ScrambledThread used a fixed buffer of 256188 (47 KB) per slot, while the original FileThread default was packetsize1024 (188 KB). This 4x reduction caused ~4x more write() syscalls, increasing kernel-side allocations (NFS RPC structs, socket buffers, slab objects) in the DMA/LowMem zone. On heavy recording setups (4+ simultaneous NFS recordings), this contributed to LowMem exhaustion and OOM kills.

Passing -1 restores the default buffer calculation. The descrambling code is unaffected as it iterates 188-byte packets regardless of buffer size.

(cherry picked from commit c9c058fef495eb472b3077ef4035ca02bb47740a) (cherry picked from commit e369fc0c64fa33e9dae334bea3e7253eafa0aedd)

…ssure

The ScrambledThread used a fixed buffer of 256*188 (47 KB) per slot,
while the original FileThread default was packetsize*1024 (188 KB).
This 4x reduction caused ~4x more write() syscalls, increasing
kernel-side allocations (NFS RPC structs, socket buffers, slab objects)
in the DMA/LowMem zone. On heavy recording setups (4+ simultaneous
NFS recordings), this contributed to LowMem exhaustion and OOM kills.

Passing -1 restores the default buffer calculation. The descrambling
code is unaffected as it iterates 188-byte packets regardless of
buffer size.

(cherry picked from commit c9c058fef495eb472b3077ef4035ca02bb47740a)
(cherry picked from commit e369fc0c64fa33e9dae334bea3e7253eafa0aedd)
@WanWizard
WanWizard merged commit 221e3f9 into OpenPLi:scarthgap Sep 6, 2026
1 check passed
@kueken
kueken deleted the Lowmem branch September 6, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants