BUILD YOUR OWN WORLD Like what you see? Become the Master of your own Universe!

Remove these ads. Join the Worldbuilders Guild

Lag

Yes, lag is one of our systems I'm afraid.
  So, lag is bad, but lag is also mysterious and poorly understood. Lag is like the Force in some ways. To understand lag, we need to understand The Game.
  The Game
  Essentially two computers are involved in The Game - your computer (the client), and the server (uh... the server). The server doesn't draw anything, but it computes where everything is in the world and what it's doing, and then sends that to the client. The client does the colouring in (all the graphics and realtime stuff) and sends your movements to the server.
  Both computers can get laggy, but client lag and server lag have different causes. Let's start with server lag.
  The Server
  The server is doing a lot of stuff. It has a database of all the things in the world. The more things, the bigger the database and the more it has to keep track of. It loads that database into memory and runs the world with it. Our database is about 180 MB, and the server when busy uses about 22 GB of RAM - the database is just the core stuff it has to remember between restarts, there's a lot more going on when its running, and that is all in memory.
  It keeps track of things like buildings and building pieces. The number of buildings is probably more important than the number of building pieces - every building is represented as the first piece, and every other piece is relative to that first one. So when it's doing things that look up buildings, the amount of those is important.
  The single player game doesn't bother keeping things in memory that the player can't see (so sp doesn't need 22 GB of RAM, it uses about 4-6 GB), but dedicated servers keep everything a player has ever seen in memory, just in case they go back to it, or another player does - as people see more and more of the map, the memory usage goes up.
  So we restart the server once a day, so it can forget. I mean free up memory, but I've seen some of your erp, it probably wants to forget.
  Modern processors have a lot of cores to run stuff on, but Conan is six years old and build on an old engine (Unreal Engine 4), so it really only uses one properly. CPU speed is more important than CPU cores.
  What's it doing on that CPU? It's working out the next position of everything in the world and what it's doing, to send to all the clients. This is what server FPS means - it's how many updates to the world the server has managed to compute, per second. All the player movements (which the clients send it, and it sends to anyone that can see them), and all the NPC and monster movements.
  How NPCs and monster move is known as their AI. Not really artificial intelligence, just little loops they go into when players can see them or get into their aggro range. So if 20 players are on, and they can see 5 NPCs or monsters each (on average), then the server is computing the AI for 100 NPCs/Monsters, updating all the player positions, adding stuff when people build, sending all kinds of data to the clients (like the list of tings the client needs to display). And yes, mods make this worse, more types, more different and smarter AI loops (which are harder to compute).
  Conan seems to have a hard limit of 2-3 fps, it just gives up and sends what it's worked out so far at that point. If it doesn't complete the AI calculations, the monster just sits still or does whatever it was doing last frame - which is why dungeons are much easier when the server it very loaded. At 3 FPS, bosses are super derpy and easy to kill.
  Sooo.... what does that mean? The primary reason for server lag is the number of players, and how many NPCs/Monsters they are interacting with, and how fast the servers CPU is.
  The bad news is, that we can't do all that much about this. We can affect it by:
 
    • Limiting the amount of buildings
    • Purging inactive players and their buildings and thralls
    • Limiting the amount of followers and thralls
    • Limiting the amount of things with inventories (especially ones that auto-fill, like pens)
    • Reducing the aggro range of the NPCs and monsters.

  The good news is that server lags mainly just makes monsters dumb and easy to kill, it doesn't affect gameplay all that much compared to client lag.
  The Client - what is it doing?
  The server sends it data telling it what's in the world around it, and what's going on. It loads that from the game files on your PC's disk into memory, and renders the scene on the graphics card (GPU). So the server might only be running at 3 fps, but the client can still run at 60 fps, it's just kinda doing it on dead reckoning for 20 frames before getting a server update that says where the monster is now and what it's doing.
  A lot of physics stuff (hair, cloth, water) is also computed on the GPU. When you're running conan, the GPU should be about 80-100% busy. You, a human, run at about 60 frames per second (fps), internally. Your eyes run at about 30 to 60 fps, so ideally, the computer should keep up with the human and render at 60 fps - in practice anything over 30 fps is usually OK, just a bit less smooth. Under 30 fps it starts to go to shit.
  Anything that makes the GPU work harder than it needs to, can affect your fps. Flickering lights or many lights (light and shadow calculations are hard work, moving shadows are worse). High resolutions are worse (more pixels to computer in the same time). Loads of building pieces in view. Long render distances.
  How can you make your client (game) faster:
 
    • Faster GPU / Graphics card - RTX 1650 is probably the minimum, RTX2000/3000/4000 series are better. I have an RTX2080S and it's fine. I mean. Fine.
    • Turn shadow quality down in video settings - this one change is probably the most impactful
    • Lower the resolution - if you're playing in 4K, you're gonna have a bad time unless you have a very expensive computer.
    • Windowed borderless seems to be better than full screen, for some reason. Don't know why.
    • Limiting the amount of building pieces in view
    • Avoiding lights that are known to be high lag, and anything that makes flickering shadows
    • Set Windows to run Conan in Game Mode
    • Use fast storage, the game loads all the meshes and textures from whatever device your steam library is on, so that affect game speed and loading times. Hard disks - bad. SSDs - OK, NVMe drives - good, current generation NVMe drives - really good. If you have an SSD or NVMe drive, use Steam to move the game to that drive.
    • Don't run out of memory, 16 GB is probably fine, 8 GB might struggle, with 32 GB you can run client and a dedicated server with our DB on the same machine (that's how we test things).

  So, hopefully that helps and explains some of our rules.
  We don't limit building pieces much, as you're only lagging people who visit your base, not the server. We may, in future limit the amount of buildings per person, as that will contribute to server lag.
  Basically, you're all grown ups and you all hate lag - build a base with 10k pieces and loads of flickering lights and nobody will visit you and you'll have a horrible experience at home (I know, I tried it), even if it looks pretty when you stand still. Have a lot of followers and you'll get lag (and will lag the server, we may limit those at some point). Build an elegant little base and you'll do much better. [02:41]Myra: If you can afford to upgrade your computer, and you're not on an NVMe drive, that will be your biggest bang for the buck - GPUs are expensive. If it's laggy, drop the shadow quality and screen resolution until you can live with it. If you're buying a new computer, get the best GPU you can afford AND NVMe drives.
  Ooh. I just remembered. Benches and storage. Every time you go near a bench or crate with storage slots, the server will go to the database and look up what's in it. This takes a looong time, and it lags the server. When the server looks things up in the databse, that's generally slow. If a bench or crate is empty, it doesn't go looking in the database. So.. the more storage slots you have filled, the more you'll cause lag spikes whenever a player comes near. Leaving one or two things in many benches is like the worst case.
  Keeping just what you need, in large stacks, keeping benches empty and using your recyclers will help with server lag. Try to be a good citizen, set your slaves tasks to tidy up your storage and benches.
  There will be more tips to reduce lag. I found all this by a lot of research in the admin discords trying to get our lag down, and found a metric ton of rumour and misinformation. I also found out more about how it works mucking about with the database trying to get our restart time more sensible, but we are lucky enough to have a few very experienced players and server admins in our community that come up with new ideas to keep lag manageable.

Remove these ads. Join the Worldbuilders Guild

Comments

Please Login in order to comment!