Jump to content
coconut

[Release] Tools for overload management

Recommended Posts

Ever wanted to make a mission with AIs everywhere, and also support large numbers of players on your server?

 

Well, you can't have both at the same time, but you can have both in the same mission. What I mean is that you can have AIs that get removed when the server reaches the load limit. The principle is pretty simple: a tool monitors the SPS value of the server, and when it falls below 49.0, it triggers a specific MCU_TR_ServerInput node. What you do then is up to you, but basically you can e.g. use it to simply deactivate AIs (planes, AAA, vehicles...).

 

Here is the monitoring tool. Run it with incorrect arguments from the command line (e.g. "TickDelayMonitoring.exe /?") and it will yell at you its usage.

 

TickDelayMonitoring.zip

 

But then, which AIs should be deactivated?

 

I recently posted a group implementing one link in a priority chain. Plug the server input node mentioned above to the kill request node of the first item of the chain, and the chain will try to find one item to remove, depending on its priority. The priority here is a dynamic property of a link, where the priority can be None (don't deactivate), Low (deactivate), Medium (deactivate if no Low was found), High (deactivate if no Low or Med was found). The problem is that manually injecting these rather complex groups and linking them together quickly becomes a nightmare. This is why I wrote a program that does that for you:

 

InjectPrio.Cli.zip

 

To use it, simply a number of timers (delay does not matter, 0 typically does it) to the activating/deactivation logic of each AI group:

  • Mandatory: A timer that deactivates/kill the group. The program will link TO this timer
  • Optional: A timer (or any trigger node, really) that is triggered when the group is not to be deactivated. The program will link FROM this timer.
  • Optional: A timer for each priority level (Low, Med, High) that is triggered when that group gets a new priority. The program will link FROM this timer.

To clarify the role of the optional timers, imagine a flight of bombers that spawn 1hour after mission start:

  • Initially, this group has priority None. There is nothing to gain by deactiving a group that isn't active yet.
  • After 60min, the group is activated. It gets a high priority. We'd rather not deactivate before it got a chance to do its job.
  • After releasing its bombs, it gets a low priority. It is no longer playing any major role. We'll let it fly back and land only if the resources allow it.
  • On the way back, whenever an enemy plane gets close to it, its priority is bumped to medium, and decreased back to low when the enemy goes away or dies. We want to avoid the situation when an enemy sees the bomber group popping out of existence.

Important note: This tool is not meant to modify existing files. What it does is create a new mission file (and associated language files). Do not use the input file as the output file

 

Source code available at https://bitbucket.org/johdex/tickdelaymonitoring

 

I hope this will be useful to someone, enjoy!

Edited by coconut
  • Upvote 6

Share this post


Link to post
Share on other sites

Thats awesome!!

 

Im not hosting anything serious yet, but who knows... Maybe in the future.

 

Also, you can essentially play solo with AI until someone joins and its still fun.

 

I feel like Jupp could use this in his latest server test he did.

Share this post


Link to post
Share on other sites

Nice work Coconut! This should be very useful for complex mission builders.

Share this post


Link to post
Share on other sites

~S~ Coconut,

Bo_S_Bob_Ross.jpg

 

Magnifique!

 

!S - Jupp- :salute: 

  • Upvote 3

Share this post


Link to post
Share on other sites

Updated first post with links to source code.

The mission currently running on my server "Coconuts custom EXPERT" uses this.

  • Upvote 1

Share this post


Link to post
Share on other sites

Rebuilt TickDelayMonitoring. It was missing a dll. First post updated.

  • Upvote 2

Share this post


Link to post
Share on other sites

Wow this is timely.....so are there any rules of thumb for oveload management without a software fix?  

 

I am a lazy mission builder and took someone elses mission and added a number of AI aircraft that only appear when a complex trigger is triggered.  I started with about ten to twelve AI and it went okay, but bumped that up closer to twenty four and we started getting  error messages ( multiplayer objects error, contact server administrator).  

 

We had 8 to 10 people flying and maybe a max  of 12 to 14 AI that would spawn.  I am careful to deactivate complex triggers once they have been used

 

 

Any advice on when you hit overload?  Can I fix my mission by deleting tanks and non flying entities?

 

 

post-1351-0-56838600-1458186031_thumb.jpg

Share this post


Link to post
Share on other sites

You get the "server overload" message when it takes more than 20ms in real time for the server to simulate 20ms of simulated time.

 

I think you can afford about 16 fighters, depending on what they are doing. I don't know the exact numbers, and they can change from a version of the game to the next.

 

It's precisely because I don't know about the exact limits that I went this way with monitoring and deactivating/deleting in a dynamic manner.

Edited by coconut

Share this post


Link to post
Share on other sites

Hey Coconut, I am new to this game so I am still learning the ins and outs of it's dedicated server setup and mission editor. I am trying to run TickDelayMonitoring and it is giving me Auth response: STATUS=6 and the an Unhandled Exception and a crash. Any idea what my issue is here?

 

Thanks, 

Share this post


Link to post
Share on other sites

Hi Derty, I think that would be a failed authentication. Wrong username or password.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×