Skip to content

milvus not running on one CPU #621

@vuvova

Description

@vuvova

when I run various DB, I can see in top that they take 99%-100% CPU. Which is correct, ann-benchmarks (w/o batch) is one-CPU benchmarks and passes a CPU number to the containerd.

Milvus starts three further containers on its own, they aren't limited to that initial CPU and it routinely takes 350%-400% CPU in top. This is of course unfair and invalidates its results.

I've used this patch to benchmark milvus:

--- a/ann_benchmarks/algorithms/milvus/Dockerfile
+++ b/ann_benchmarks/algorithms/milvus/Dockerfile
@@ -16,9 +16,11 @@ RUN echo \
 RUN apt-get update 
 RUN apt-get install -y wget docker-ce-cli docker-compose-plugin
 
+RUN pip3 install setuptools==80.6.0  marshmallow==3.26.2
 RUN pip3 install pymilvus==2.4.1
 RUN python3 -c "from pymilvus import Collection"
 
 # Install milvus standalone by docker-compose.yml
 RUN wget https://github.com/milvus-io/milvus/releases/download/v2.4.1/milvus-standalone-docker-compose.yml -O docker-compose.yml
 RUN sed -i 's|${DOCKER_VOLUME_DIRECTORY:-.}|/tmp|g' docker-compose.yml
+RUN sed -i 's|^    image:.*|&\n    cpus: 1|g' docker-compose.yml

the first change gets modules that work, latest versions don't. The second limits milvus container to 1 CPU. Two other containers (with etcd and minio) don't do much, so I didn't bother trying to bind them all three to the same CPU.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions