_rpc_dtablesize: decrease to fix excessive memory usage
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Changes in v1 from the cover letter
Clean up the existing code in user
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | _rpc_dtablesize: Decrease the value of size.src/ | +1 | 0 replies | |
| 2/2 | _rpc_dtablesize: Cleaning up the existing codesrc/ src/ | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/2] _rpc_dtablesize: decrease to fix excessive memory usage
In the client code, the function _rpc_dtablesize() is used to determine the memory allocation for the __svc_xports array.
However, some operating systems (including the recent Manjaro OS) can have _SC_OPEN_MAX values as high as 1073741816, which can cause the __svc_xports array to become too large. This results in the process being killed.
There is a limit to the maximum number of files. To avoid this problem, a possible solution is to set the size to the lesser of 1024 and this value to ensure that the array space for open files is not too large, thus preventing the process from terminating.
Also discovered that some users have taken action on the issue. It is necessary to address this for all users. Ultimately, we determined that adjusting the size value of _rpc_dtablesize() and streamlining the existing user code would be the most effective solution.
---
Changes in v1:
Clean up the existing code in user
---
Links:
RFC:https://lore.kernel.org/linux-nfs/[email protected]/T/#u
Zhuohao Bai (2):
_rpc_dtablesize: Decrease the value of size.
_rpc_dtablesize: Cleaning up the existing code
src/rpc_dtablesize.c | 2 ++ src/svc.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1