Jump to content
  • 0

Question

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

2 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.