Elasticsearch Performance Issues on CapCut Resource Website

Hi everyone,

I’m running a website focused on CapCut tutorials and resources, and I’ve implemented Elasticsearch for powering the search functionality. However, I’m experiencing significant performance issues:

  1. Slow Search Queries: Some search queries, especially those involving multiple filters (e.g., tutorial type, video duration, and keywords like "CapCut tutorial" or "editing tips"), are taking several seconds to return results.
  2. High Resource Usage: My Elasticsearch node frequently spikes in CPU and memory usage, even with a relatively small dataset (around 50,000 documents).
  3. Relevance Issues: The search results often don’t rank the most relevant tutorials or resources at the top, despite fine-tuning the query using boost and match settings.

Here’s my setup:

  • Elasticsearch version: 8.10
  • Hosting environment: AWS EC2 with 4 vCPUs and 16GB RAM
  • Index size: ~50MB
  • Query structure: Combines match and term queries with aggregations for filtering.

I’ve tried optimizing the index by reducing unnecessary fields and increasing the refresh_interval, but the performance hasn’t improved much. If you’re exploring tools or resources for CapCut pro, click here to find an excellent option for downloading the app and its modified features. Has anyone faced similar issues with Elasticsearch on a moderately sized website? Any advice on query optimization, hardware scaling, or alternative approaches for improving relevance would be greatly appreciated!
Thanks in advance!

Hi @joeroot,

Welcome back! For the slow queries have you ran them through the Search Profiler to see what's going on?

On the CPU side are you seeing any errors/ warnings in the logs? Can you also ahre the output of the usage steps documented here?

Is this by any chance a t3.xlarge or similar instance that uses CPU credits? If this is the case it is possible that the cluster can get starved of resources after bursts of activity, which could manifest in the type of issues that you describe. In this scenario it may make sense to try and correlate CPU credits with performance issues and see if there is a connection.

Is Elasticsearch the only component running on the host(s) or are the resources shared? It is generally recommended to run Elasticsearch on dedicated hardware but given the size of your data set I would understand if this is not practical/desired. Elasticsearch relies on the operating system page cache in addition to the heap and this can be affected by other applications running on the same host. As your index is very small I would expect it to easily fit in the page cache, but it would be good to make sure there is enough RAM to go around.