[SoftCSA] Restore original recording buffer size to reduce LowMem pre… - #4377
Merged
Merged
Conversation
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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)