OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
6.24k stars 922 forks source link

5.12.33 Elasticsearch Performance: CPU utiliczation 100% #6851

Open lesley-tw opened 5 months ago

lesley-tw commented 5 months ago

Prerequisites

Description

We recently upgraded from version 5.3.17 to 5.12.33 and have encountered a performance issue with the new version. For instance, when accessing the same campaign attack pattern page in the knowledge tab, the number of queries sent to Elasticsearch increases dramatically, despite using the same GraphQL query as before. Specifically, the new version triggers about 5,800 queries to Elasticsearch, causing the CPU usage to spike to 100% for just one page. In contrast, the old version only generated about 45 queries for the same page. We suspect that other pages might have similar issues, as even a reduced number of users is leading to the same CPU overload.

Environment

  1. OS (where OpenCTI server runs): AWS EKS, 4 pods to serve this service, each pod 6 core cpu & 16 G memory
  2. OpenCTI version: 5.12.33
  3. OpenCTI client: frontend or python
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Visit the same campaign, in knowledge tab, click attack pattern in the right menu. image

In 5.3.17

In 5.12.33


Additional Information

In 5.3.17:

In 5.12.33:

richard-julien commented 5 months ago

Seems related, this screen need to be improve with a specific api to load the matrix.

vncloudsco commented 5 months ago

We also had the same situation where we ran out of cpu resources for Elasticsearch

trend-tanya-wang commented 5 months ago

Hi @SamuelHassine, may I follow up this issue? Will OpenCTI fix this issue or any suggestions? Thank you.

richard-julien commented 5 months ago

Yes, will be handled by https://github.com/OpenCTI-Platform/opencti/issues/6662

lesley-tw commented 5 months ago

Hi @SamuelHassine We are unsure if other pages have the same issue. Could you help check them? Sometimes just reading a campaign with many relationships or listing reports might also cause elasticsearch CPU issues too.

richard-julien commented 5 months ago

if you have issue when other screen please create a specific ticket describing it. Thanks