Jump to content

How can the Unraid host be slower than its own VM?


Go to solution Solved by endeavour,

Recommended Posts

Hey there, i'm running docker through a Ubuntu server VM in my Unraid, i started a apache container on the VM, and runned a wrk benchmark and get something about 7400 RPS, when i tried to run the same container in the host it gives something like 6100 RPS, there's some reason for that? How can the host be slower than the VM inside of it? Thank you all in advance.


192.168.1.12 --> VM --> 4 cores 8GB
192.168.1.3 --> HOST -> 48 cores 32GB


image.png.20c14918560d3f45072ae5d2a6be6a0a.png

Link to comment

I conducted the same tests again, this time taking advice from a friend. I ensured that both Docker Engines were on the same version: 20.10.21. However, the results remained unchanged. I believe it is crucial to determine whether this issue is related to my environment or if it is a genuine problem. The performance difference compared to a virtual machine (VM) is significant, which emphasizes the importance of resolving this matter. If anyone could assist me by performing a test, it would be greatly appreciated.

 

The VM image I am using is Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-148-generic x86_64) with 4GB of RAM and 4 cores.

 

The command I used is: "docker run --name=performance_test -v $(pwd):/var/www/html --workdir=/var/www/html -p 9802:80 php:8.1-apache".

To conduct the test within my local area network (LAN), I employed wrk on an Ubuntu machine at my home.

 

In the image the above result is from my host server, while the results below are from the VM inside of it.

 

Best regards.

 

image.png.b9e0b263452a1183d61f75562bd5957f.png

Link to comment
  • Solution

Dear everyone,

I wanted to share some exciting news with you all. A friend from Discord was able to solve the problem I was facing. The solution was quite simple: I changed the volume from "mnt/user" to "mnt/cache". Surprisingly, this small adjustment caused the host Docker container to outperform the old volume place container by eight times! It's an essential tip for those of you seeking better performance. Depending on where your Docker volume is mounted, it can significantly impact your performance compared to a VM environment.

Thank you all for your support.

Best regards,

image.png

Link to comment
5 hours ago, endeavour said:

Dear everyone,

I wanted to share some exciting news with you all. A friend from Discord was able to solve the problem I was facing. The solution was quite simple: I changed the volume from "mnt/user" to "mnt/cache". Surprisingly, this small adjustment caused the host Docker container to outperform the old volume place container by eight times! It's an essential tip for those of you seeking better performance. Depending on where your Docker volume is mounted, it can significantly impact your performance compared to a VM environment.

Thank you all for your support.

Best regards,

image.png

 

It has been known for some time that going through the fuse system used to support User Shares imposes an overhead that can limit maximum performance.    The 6.12 release has an optimisation for what are currently known as "Cache Only" User Shares that by-passes the fuse system if a share only exists on a pool thus achieving the equivalent to the above without the user having to actually change their settings.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...