Jump to content
Stan

[Preview]: Massive Stability Update COMING SOON (real soon)

Recommended Posts

Stan    8
Posted (edited)

Hey guys,

As you might have noticed, the server has extreme difficulties handling a relatively large number of players (100+). Now the biggest bottleneck in the server is the way our SQL system is written (thanks, Nick...😑). SQL is basically where we keep data that is shared by the game-server and the website. 

In-depth explanation (for those interested):

Basically, all communication between the GameServer and the SQL server is handled on the main game thread. Meaning that after every request sent, the server must wait for a response from the database before continuing processing other stuff, like your combat session. SQL is slow... and the RuneScape engine aims to re-iterates every 600 ms (1000ms is 1 second). The absolute max duration of a cycle should be around 400-500ms in order to maintain a stable game.

This is a little before and after my changes, this is a local version of the game with 500 artificial players:

OLD SQL

(updated 500 players their high-scores, took 18 seconds to complete, that's 18000-600 = 17400 ms of lag!):

NEW SQL

(updated 500 players their high-scores, took 5 ms to complete, that's 600-5 = 595 ms left to do other processing!):

 

 

Edited by Stan
  • Like 8

Share this post


Link to post
Share on other sites
Rare    32

Arguably the first update that could actually significantly improve shit. Good job.

 

Select username, password, pin

from accounts

order by 1

limit 400

 

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

×