Set max open file limit for sm service
The sm process initializes with the default limit for the maximum number of open files. If somehow this default value is set to a high value, performance degradation can occur. For instance, the sm_service_action_run method from sm_service_action.c contains a for loop that closes file descriptors up to this limit. To avoid performance degradation, this change sets the limit for the maximum open files to 1024 using the systemd property LimitNOFILE. TEST PLAN: PASS: Confirm that 1024 is the max open file limit in /proc/<sm_pid>/limits. Story: 2010087 Task: 47102 Signed-off-by: Alyson Deives Pereira <alyson.deivespereira@windriver.com> Change-Id: Iff848da7461a8b644057e9f58c69fa2d78499226
This commit is contained in:
parent
cf4015918c
commit
25ddaa31f9
@ -13,6 +13,7 @@ PIDFile=/var/run/sm.pid
|
||||
KillMode=process
|
||||
RestartSec=10
|
||||
Restart=on-failure
|
||||
LimitNOFILE=1024
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
Reference in New Issue
Block a user