x


Optimizing Headless Servers

I have dynamically load balanced Unity headless servers for my game running on a "small" Windows Amazon EC2 instance (1.7GB of ram). Whenever I launch more than 20 or so servers, things start crashing with "out of memory" errors.

The servers are extremely simple - there are no graphics or cameras, minimal logic, and they are run headless.

I know that Unity iPhone Pro includes Build Stripping - is there anything like this for the desktop version? What techniques should I use to optimize the memory footprint of my Unity servers? How many should I be able to run?

I would be glad to share the Unity project folder for my server if anyone would find it useful.

more ▼

asked Feb 07 '10 at 05:34 PM

Aubrey Falconer gravatar image

Aubrey Falconer
657 45 53 68

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

you can seporate different games in different network groups and send messages between them easily. each game would be in one group and groups should not intersect with each other. you should create the mechanism yourself.

more ▼

answered Mar 07 '10 at 08:40 PM

Ashkan_gc gravatar image

Ashkan_gc
9k 33 56 117

(comments are locked)
10|3000 characters needed characters left

Maybe you could implement coroutines inside your server process that let each instance handle more than one game, thereby reducing the overall footprint.

How did you make unity run headless? That's always been mysterious to me.

more ▼

answered Feb 07 '10 at 07:08 PM

Russ Menapace gravatar image

Russ Menapace
46 3 3 3

-batchmode command line parameter during startup. That finally works on Windows as well (has been on Mac for a while).

Feb 07 '10 at 11:27 PM jashan

I would love to do this, but I am not aware that it is possible since I am currently using Unity's builtin networking which can only open one connection at a time. Coroutines couldn't circumvent this limitation, could they?

Feb 08 '10 at 03:53 AM Aubrey Falconer
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5049
x697
x470
x413
x5

asked: Feb 07 '10 at 05:34 PM

Seen: 3026 times

Last Updated: Feb 07 '10 at 05:34 PM