Quote:
Posted by Rusix
(Post 798917)
Mind explaining how extremely low data consuming bugs somehow lag the server then?
|
Because data has nothing to do with it? That's like saying "oh, my Pentium 3 computer can run GTA5 fine because I have a 1TB hard drive!" Data != processing power. While bandwidth(how much data is being sent/received) is always a concern when it comes to online that's not a major problem for Graal.
Concerns come in the form of processing power. Each bug has a script, a script that tells it what to do. The NPC-Server needs to parse/interpret this script, which means it has to convert the gscript to the lower level code that Graal runs in(c++). So while most games are already running natively in c++(or some other low-level language), Graal needs to perform an extra step of converting the entirety of most of the server into c++. Interpretive languages take a lot of processing power by themselves. Then you have the script itself. Each bug, running its own script telling it how to move. These run in something called loops, basically where an event is called, actions are done(in this case moving) and then they start over repeating the actions again and again. Otherwise the bugs would take one step and never move again. Loops are very intensive because it means the script has to run constantly, over and over. Every time this is done, the CPU needs to process this information and make calculations.
Right now there are ~4000 players on. Nearly 850 are in houses, meaning over 800 house levels are currently in memory and actively running scripts:
https://i.imgur.com/4uZAEdk.png
Let's assume half the players have bugs in their houses, after all it's free to catch bugs and it was free to release them into their houses before. They were practically free furniture. Let's assume they have 10-20 bugs in their houses. That's 4000-8000 bugs running their looping code to move around at the same time. Now they don't always run on the same tick, some only move every second or so but it was a problem because they were
free. Don't believe me? One of the biggest mistakes that was made in the past was selling pets on Oasis for 25 gralats. I wasn't around for it, but now there are some houses with
hundreds of pets moving around constantly. Because it was really cheap to do so. Their prices have since been changed and pets now move less frequently.
I can't 'mathematically show you why' because we have limited information when it comes to server cpu usage. All we can see are the top 10 NPCs(individual) that are consuming CPU, and if a furniture piece shows up in that list it's
bad because it can easily snowball out of control since that can easily multiply out by hundreds depending on how many are in active houses.
TL:DR? Scripts matter as far as CPU usage goes on the serverside, not how large their image file is.