Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] /upgrade/_perform performance improvements #199101

Open
Tracked by #179907
xcrzx opened this issue Nov 6, 2024 · 3 comments
Open
Tracked by #179907

[Security Solution] /upgrade/_perform performance improvements #199101

xcrzx opened this issue Nov 6, 2024 · 3 comments
Labels
Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area performance Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@xcrzx
Copy link
Contributor

xcrzx commented Nov 6, 2024

Summary

Performance testing results for /upgrade/_perform indicate that the rule upgrade operation is highly I/O-dependent, as rules are upgraded one-by-one. Upgrading 1,000 rules takes around 60 seconds and scales linearly. While this isn't a blocker for the initial rule customization release, we could improve performance with some optimizations.

  1. Batch Rule Updates: Replace sequential rule updates with batch updates using the rulesClient.bulkEdit method. This may require refactoring the bulk edit method since it currently supports only params, not full rule attributes. However, the potential performance gains make this worth exploring.
  2. Optimize createPrebuiltRuleAssetsPayload: This CPU-intensive method can block the main thread for up to 700ms when upgrading around 1,000 rules. Splitting it up could improve performance.
@xcrzx xcrzx added 8.18 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area performance Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team labels Nov 6, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area performance Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

No branches or pull requests

2 participants