Server's vision (and stability)

Started 23 Jun 2018
by Thragnaf
in Ask the Team
Hey there,

I've heard about this server from a friend, and I am curious.

I've played classic DAoC until ToA released and recently I've also played Uthgard with some old mates, mainly when it relaunched and had a healthy population.

Speaking of which, I do have one important question for the Dev team:

- How comfortable are you with your server being able to handle a lot of players at the same time? (1000, 2000) I am asking this because the DOL code, the standard one, is very inefficient and cannot handle more than 700 players playing the game at the same time without unplayable lags. That's what caused the first Origins server to fail, because it was pretty popular (1k+ players online) but it only had the standard DOL code and thus couldn't perform well enough. That's also the reason Uthgard could handle 3,5k+ players at the same time, because they've modified their code over years and optimized it. So, how is Phoenix doing in this regard?

Greetings
Sat 23 Jun 2018 6:10 AM by gruenesschaf
The code base is extensively modified, especially all the lower level stuff / high frequency parts like networking in general and position updates or radius / range checks specifically.

Aside from the networking stuff or radius checks, a big performance bottleneck was the database access, stock dol / genesis even has instances where normal combat could cause database access, for example poison / charge usage or cooldown handling. Here almost no player action causes any database io, the only exceptions are some housing or guild commands as well as character creation, everything else is handled in the save interval that extensively uses batching.
Comparison for the save interval: stock dol / genesis took roughly 0.5 - 1 second per client plus about 5 second general overhead, the new save interval usually takes less than 500ms with 3000 simulated clients (saving the position for all of them, obviously actual players would also cause item changes but I'd be rather surprised if it ever went over 3 seconds).
Creating an entirely new schema and moving over to postgresql as well as ripping out and replacing the entire database access code was basically the first thing I did back in November, together with Eridau it took us until early December for it to even compile again and we have been working on restoring most features until about march (and in some cases we're still on it).
The new schema obviously also required new tooling which is also where a massive amount of effort went into, we now have a single cohesive web based backend that allows us to pretty much do everything, including mob placement - unlike stock dol, nobody is touching the db directly, everything is done via the tooling.

Server startup time was also massively improved, the last beta of genesis took anywhere from 5 - 10 minutes to restart and due to all the database optimizations that was reduced down to 30ish seconds from launching it to being able to connect (some stuff still loaded in the background) and just in the last 2 weeks it was reduced down to now 5 - 6 seconds from launching to being able to connect (still some stuff is loaded in the background). These improved startup times are despite literally loading the entire database (well, except for trade / loot / kill logs and other historic data) into memory on startup which is what allows us to not have any db io outside the save interval.

Anyways, the first days of the beta (and probably launch) will most likely be rather rough though exactly because it's so extensively modified and hence not really tested under real world conditions compared to the very much slower but actually tested dol base code, I'd be surprised if we didn't have any major issues on launch day.

Some indicators though:
Rather early on I wrote a super simplistic player simulator that allows us to connect as many clients as we want, these clients receive all the normal packets (mob movement, other player actions etc.) but they only send their position updates and don't really do anything else.
When I started optimizing the code base it basically died with 1000 simulated players online at the same time or more than 200 - 300 within visibility range of each other, whichever happened first.
After some optimizations I made the simulator send some use skill packets and changed all simulated players to paladins -> all logged in things now happily chant every 5 seconds also adding some pressure to the effect system.
Now the visibility range is a lot higher (3600 -> 5600) and 3000 simulated clients at the same time is fine, having 800ish in visibility range of each other, even twice, is also fine.

Again though, this is via local connections and hence basically no network delay but at the time it's also running in debug mode and with a debugger attached. Anyways, it is very possible (and rather likely actually) that there are still some packets sent synchronously which should be sent asynchronously which might cause some issues with actual traffic.
Sat 23 Jun 2018 6:26 AM by Thragnaf
being an IT guy myself, I really appreciate this technical answer! Sounds good indeed, especially the DB stuff.

How many players do you expect to be playing here? Given the server already gains some popularity among DAoC fans.
Sat 23 Jun 2018 10:53 PM by Isavyr
While I understood maybe 80% of what was written, it sounds promising as hell. Good work! I am curious why the previous version had to check db for every spell, but not now. Where is this information buffered, or stored, that makes for quicker retrieval?

For example, if I want to cast Spell of Godly Power, doesn't it need to retrieve the power cost, the cast time, the damage coefficient? How does it do this without db input?
This topic is locked and you can't reply.

Return to Ask the Team or the latest topics