question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

Custom game server CPU credit

I'm trying to debug why my custom game servers are suddenly lagging significantly, without any significant changes in server code (just a few debug logs added). Last night/earlier this morning, games were running smoothly without lag, and now about half of the games are unplayable due to lag.

I looked up CPU Bursting from Amazon (https://stackoverflow.com/questions/28984106/what-is-cpu-credit-balance-in-ec2) and I'm wondering if this applies to PlayFab's t2-medium instances. If so, perhaps it is possible that I am experiencing this.

Edit: also this link:

https://serverfault.com/questions/690656/why-sometimes-aws-ec2-works-really-slow

Custom Game Servers
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

Which EC2 server type is best for your game is going to vary pretty widely, depending on the needs of your game. The default server model is a t2.medium, which is good for general-purpose tasks akin to most webservices - and they're especially good for while you're in development, as they'll keep your EC2 bill lower than otherwise.

But yes, if your game server logic requires something more like a hard-core realtime shooter game's logic, I'd usually recommend something in the C (compute optimized) class of servers, since that style of game server usually has more CPU load than memory or disk load.

It's definitely a topic worthy of a whitepaper (something like "choosing the right server type for your game") - I'll file a backlog item for that. Meanwhile, your title's servers have been updated to the model you requested in the other thread.

2 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.

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Exactly the type of response I was looking for! Thanks for the context and recommendation. Our game definitely is high CPU (up to ~1,200 units on a single instance, 5x instances per server, each unit has lots of state - buffs, abilities, autocast behaviors, etc.). I think C class makes the most sense.

Thanks for the quick turnaround. Fingers crossed that this addresses in-game lag issues that started coming up today.

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) Brent Batas (Lisk) commented ·

As an update to anyone following this, upgrading the servers to a C4-large instance completely fixed all in-game lag issues. Hopefully they stay fixed.

0 Likes 0 ·

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.