Help! Why does my Docker container, configured with 4 CPUs and 8GB of memory, only use up to 35% CPU (1.4) and 43.79% memory (3587)?

Description

<Help! Why does my Docker container, configured with 4 CPUs and 8GB of memory, only use up to 35% CPU (1.4) and 43.79% memory (3587)?!-- Please include as many details as possible about your issue →

Server Setup Information

  • Weaviate Server Version:1.25
  • Deployment Method: docker
  • Multi Node? Number of Running Nodes: 1
  • Client Language and Version:
  • Multitenancy?:

Any additional Information

That’s actually normal, the 4 CPUs and 8 GB you gave the container are just the max it can use, not what it will always use. In docker stats, CPU% is per core, so 35% total means it’s really using about 1.4 of your 4 cores. Weaviate will only push higher if you throw a lot of concurrent or heavy queries at it. Same with memory — 3.5 GB just means your current dataset and queries don’t need more right now. If you run bigger imports or stress it with parallel queries, you should see both CPU and RAM usage go up.

1 Like

hi @Chaitanya_Kulthe and @hzy12138 !!

Welcome to our community :hugs:

That’s right. You can defined some guardrails as environment variables so you can have more control both on allocation and usage of those resources.

For example, if you do a lot of delete operations, you may want to tune the tombstone cleanup cycle (TOMBSTONE_*), or tune some memory and cpu variables.

I have created a Weaviate Resource Calculator for memory, based on this documentation

You can check it online here: https://weaviate-resource-calculator.streamlit.app/

Let me know if this helps!

1 Like

Thanks for jumping in @DudaNogueira That Resource Calculator looks super helpful - exactly what people need for proper capacity planning.

1 Like

All right, I’ll try it first. Thank you very much

By the way, I’d like to ask: Is it normal for a query to take more than one second on 100,000 data points with 3,495 dimensions? (4 GPUs, 8G Memory)

Hi!

Are you doing the a nearVector query or nearText?

When using NearText, Weaviate will first vectorize the query, and an api call to the inference model that will account for most of the latency.

When performing a nearVector, you already provide the vector query, and the latency can now be accounted by networking into to Weaviate and the search itself.

Let me know if this helps!

OK,I get it, thanks a lot