How to optimise unity dedicated server build?

Hope you are doing great.

I am writing this to get more detail on Unity’s Dedicated Server Build target.

If you have tried it, and can help me on my doubts, would be really appreciated. I used a dedicated server build target with linux platform in one of the multiplayer game. It’s contains the server specific logic without any assets. I deployed the generated server build on AWS server in linux machine. I am launching the server build from an external app in the same machine with -batch mode.

But, it’s taking around 12% of memory of the AWS t3-large instance after launching. Here my concern is with the memory it’s takes.

  • Is it normal or I’m missing something here?
  • I need to run multiple server build instances in parallel in the AWS, As many as possible. I can run 6.

Kindly give your inputs on how to run max number of instances in parallel in the AWS.

I’m late to the party but , isn’t that instance have 8gb ram? In your case does it mean you using 1.3 gb per instance ? That’s quite a lot ..
So far the dedicated sever build that I’m doing for a game goes like 100mb per process altho the build is not final , many other this to add , but still

By default , without any assets , Unity takes 70mb or memory no matter what. It seems like a dedicated sever build can’t go lower than that .

Use memory profiler and see what’s taking up so much memory . You could be having lots of referenced things into scripts ( sounds , meshes , client stuff ). Use per platform defines/symbols to cut out unnecessary references .

1 Like

Did you also look at the dedicated server package which allows you to turn off all manner of crap including things like audio etc