Suggestion to Improve Tick Times (Timeout Reduction - 500 CPU Limit Change)
-
Currently the game allows us to go past our max CPU by a maximum of 500. This can also happen when players have errors in the code and there is a timeout.
So here is an example. A node with 20 users on it:
Lets say that those 20 users have a total GCL of 200. Ok so they all get 20 because of Subscription.
20 * 20 = 400 cpu.
10 * 20 players * 10 gcl = 2000 cpu
That is just the base number 2400 cpu or 2.4 seconds for this tick.
Now on this node 50 % of these players dip into bucket. And 1 has an error in his code that causes him to hit CPULimit.
Ok so those players exceed bucket by an average of 10-20 cpu each.
10 * 20 = 200 cpu
Then the resets:
that one player does not have his script killed until 500 cpu past his limit!
so in this tick player scripts cost 3100 cpu or 3100 ms.
Now this is without the game doing any updates to the 40-50 thousand energy sources, 30 thousand mineral spawns, checking portals, creating portals and power bank and more every tick.
The game tick rate is as held up by the slowest node of the server cluster so I am suggesting the 500 cpu rule be reduced to 200 cpu per tick. That way poor scripts would cut out faster freeing slow nodes more quickly and improving tick times.
-
no
-
You are assuming everyone stays on a single node, but that's not how it works. People stay on one cluster of four nodes. Those four nodes basically pull a user out of the queue to run them. If a single user blocks a node the rest of the users don't wait for that node to free up, they get picked up by one of the other three nodes. So your worst case scenario numbers won't happen in that way.
This does open a potential method for increasing tick times- add more nodes to each cluster (assuming hardware is scaled accordingly as well). The more workers pulling from the queue the faster the queue get processed.
Garbage collection along can sometimes be as high as 180cpu. While rare, this does happen, and with a hard limit of 200 you'd not be able to get much more than memory parsing done.
-
Even for a middle sized player (GCL 13), I often need far more than 200CPU, when long paths are recomputed or a particularly interesting combat situation needs analysing.
I think such a reduction would be incredibly harmful to medium and larger players as a result.
-
Except that that CPU comes out of their bucket and if the error dosent correct itself, then they become one of the least CPU intensive players until they read their email
-
pfifo, as long as people use slighly less than their CPU limit *on average* they will always have a mostly full bucket. Being able to burst above that limit is important though.