question

Ufuk Coban avatar image
Ufuk Coban asked

High CPU Usage

I have a test game. I used Unity and Mirror to implement it. It just tests connections. I use multiple servers per machine. I test my build on Standard_D2as_v4 (2 cores). When I set 30 servers per machine I notice high cpu and RAM usage. My exe uses 43MB RAM. Is there any server limit for Standard_D2as_v4?

30-tm.png (44.9 KiB)
30-details.png (52.1 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

We do not limit the number of instances of your server executable you can run on a single VM. It's up to you to determine how many make sense to run on the VM model you choose, as no two builds from different games are going to be exactly the same. The three factors you need to review are CPU, memory, and disk used. In general, it's best to test with one server on a VM to start, then try increasing that to see how the usage scales as you add instances. It's also strongly recommended that you aim for well below 100% average consumption on any one of those three factors, so that any "spikes" in usage by your servers doesn't cause issues for the other instances on the VM.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ufuk Coban avatar image Ufuk Coban commented ·

As I see, My MultiplayerTest.exe files do not affect total CPU and memory usage too much. What causes %100 CPU and 8GB RAM usage? Docker system?

How can I increase "Servers per machine" without creating a new build?

0 Likes 0 ·
30-exe.png (85.2 KiB)
brendan avatar image brendan Ufuk Coban commented ·

No, the whole point of Docker is that it allows you to run multiple instances of your server in Containers, so that each doesn't have to separately load all the system resources. Put another way, Docker is a way to use less memory with multiple instances loaded. Again, we can't tell you what your build is doing, since it's your own custom code, Your best bet is to test this incrementally. Run with one instance and check everything on the server to see what is being consumed. Then run two instances and check again, etc.

0 Likes 0 ·
Ufuk Coban avatar image Ufuk Coban brendan commented ·

How can I increase "Servers per machine" without creating a new build?

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.