[Fleet] Split bulk delete into chunks to avoid high memory consumption #188208
Closed
Labels
8.16 candidate
Feature:Prebuilt Detection Rules
Security Solution Prebuilt Detection Rules
Team:Detection Rule Management
Security Detection Rule Management Team
Team:Detections and Resp
Security Detection Response Team
Team:Fleet
Team label for Observability Data Collection Fleet team
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
technical debt
Improvement of the software architecture and operational architecture
Related to: #187969
Summary
For packages with a large number of assets, when performing reinstall or upgrade, we need to limit bulk delete requests to a fixed number of saved objects.
Currently, the bulk delete method is called with all package assets:
This means that significant request and response objects will be created and stored in memory at the same time before being garbage collected. Splitting that work into smaller chunks can reduce memory pressure:
This way, completed bulk delete requests with smaller payloads and responses can be garbage collected along the package removal process, leading to smaller overall memory consumption.
The text was updated successfully, but these errors were encountered: