greenieken 0 Posted September 6, 2017 Hello. Can someone tell me the KNOWN scripts that makes the server lag? I just upgraded my host but it seems not to solve my problem, and im considering that the lag is being caused by a script. thanks Quote Share this post Link to post Share on other sites
0 meko 170 Posted September 6, 2017 The more operation you do the longer the thread blocks. Look out for long loops or scripts going through lots of labels or doing expensive computations (such as hashing). If you want to hunt down the culprits then search for those commands: freeloop, sleep, md5. parsing regular expressions can also be quite costly if the pattern is complex. As for network lag, keep in mind that the farther away you are from the server the longer it takes for packets to reach you. Even if the networks between you and the server were entirely fiber-optics from end to end (unlikely) you would still experience lag since light travels at a finite speed and the more nodes the traffic goes through the longer it takes. Once it reaches your local network the router has to decide to which device to send the packets, and once it reaches your pc it, too, needs to decide to which software to send it. There is some processing involved in every step and this is not instantaneous. Your users will also experience more lag if they use wireless or satellite connections and even more if their PC is slow. No matter what you do there will always be lag, but you can make it more bearable by having multiple servers spread accross the world, like having an American server, an European server and an Asian server. Lifewire has a great article about this: https://www.lifewire.com/lag-on-computer-networks-and-online-817370 Quote Share this post Link to post Share on other sites
0 4144 366 Posted September 7, 2017 Most slowest script can be scripts, what run difrect sql access. Next by slowness scripts with big loops or very short timers. Another things, error in script may spawn too many timers, errors about it you can see in map server console. This timers slowdown server too. But anyway need profiling server with prof or gprof. Quote Share this post Link to post Share on other sites
Hello. Can someone tell me the KNOWN scripts that makes the server lag? I just upgraded my host but it seems not to solve my problem, and im considering that the lag is being caused by a script. thanks
Share this post
Link to post
Share on other sites