Author Topic: Lag  (Read 703 times)

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
Lag
« on: September 12, 2010, 02:27:04 pm »


               I am curious as to why some servers seem to have horrendous lag.

In my particular situation I play servers that do not require CEP or any custom overrides so at least that part of the equation can be discounted.  Besides that, it doesn't seem to matter how many players are engaged or the time of day/night... if the server is laggy now, it is always laggy.

 Is this something related to some custom scripting that runs in the background?

Yet, many/most of them seem to operate smooth as silk.  I am under the impression, perhaps mistakenly, that all the servers originate from the same "control" area, which would lead me to believe that all servers are subject to the same "level playing field", but since I am clueless as to the actual dynamics of setting up a server, I would appreciate some education or explanation of how this works.  BTW, I always use Gamespy to connect.

As usual, thanks, in advance, for your participation folks!

Hip
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Lag
« Reply #1 on: September 12, 2010, 02:51:01 pm »


               Which server have horrendous lags? Can you list them? I played some action servers and they surely have not this issue, only after some time but there are many players too.

The only server I saw the lag issue used NWN bioware database heavily and IMO that was the problem. Also, it may be hardware-based, if there is bad/full HDD, it may cause lags when NWN tries to save/create character file. Also net connection, if the server is hosted from home... Thats just not ideal.

EDIT: crafting systems may increase lags too, as they create many items, destroys them and create new. For example CNR can create in 10crafting peoples about 100object in minute. After some time...

Overstocked stores are issue too, they will lag server.

also CEP(1) has big issue with heartbeat script for lightsource placeables, anyone using CEP(1) should delete zep_torch_* scripts from CEP haks.

btw. from opposite I know and sometimes play server which handle to run smoothly even two days. No crafting, mysql database, linux server, not much players ':bandit:'
               
               

               


                     Modifié par ShaDoOoW, 12 septembre 2010 - 01:55 .
                     
                  


            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
Lag
« Reply #2 on: September 12, 2010, 04:46:19 pm »


               

ShaDoOoW wrote...
Which server have horrendous lags? Can you list them? I played some action servers and they surely have not this issue, only after some time but there are many players too.

Well... not really, ShaDoOoW... except for the last few of recent memory.  Typically, when lagging I will try to rejoin a few times after dropping my connection and then re-establishing it, pinging like madman before I reconnect to any game.  (I always suspect my connection first in situations like this.) I do a lot of server hopping though, not intentionally but once the lag becomes an issue, I have no choice.  Keep in mind that I am using plain dial-up so if there are any connectivity issues, it is likely to be amplified with a slower connection, and I can accept that.  It just seems strange that I can hop to another server WITHOUT dropping my connection and play without the lag issues.

The last few were the MadDog servers (IIRC that is the name of them).  But there have been others beyond current memory.  Not many, mind you.  Just a few.  

I will try to identify others as they occur.  They are likely listed in History but seeing as I haven't taken explicit notes to correlate the bumpy ones vs. the smooth ones, it's just a massive list.  

My nephews have indicated that when they set up a LAN with their friends, they have no such issue on this machine either.  So I am baffled as to the source of the discrepancy. 

EDIT:  Hmmm... that point about the custom items may have nailed it.  I can't be positive (because I have never availed myself to trying those kinds of items) but I do recall some of the players commenting about custom stores on some servers.  There could be a correlation. I'll need to pay more attention to that aspect if it is the source of the lag culprit. 
               
               

               


                     Modifié par HipMaestro, 12 septembre 2010 - 03:58 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Lag
« Reply #3 on: September 12, 2010, 06:05:35 pm »


               You may want to test how your connectivity is working at the time of your lag.  It could just be a problem with your ISP.  The first link below will let you test your connection speed to different places around the world.  The second link might give some information on where the server you are connectiing to is located.
http://www.speedtest.net/
http://www.iscandar.ch/
               
               

               
            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
Lag
« Reply #4 on: September 12, 2010, 06:11:44 pm »


               

Lightfoot8 wrote...

You may want to test how your connectivity is working at the time of your lag.  It could just be a problem with your ISP.  The first link below will let you test your connection speed to different places around the world.  The second link might give some information on where the server you are connectiing to is located.
http://www.speedtest.net/
http://www.iscandar.ch/


Super!  Thanks for the links, Lightfoot.  Very handy.  Does the second one provide a traceroute function?
               
               

               
            

Legacy_avado

  • Full Member
  • ***
  • Posts: 249
  • Karma: +0/-0
Lag
« Reply #5 on: September 12, 2010, 07:08:01 pm »


               The pw that had the most lag (and this is going back 7 years, and i didnt take notes, so take this for what its worth!  LOL) had a custom crafting system.  The guy that owned the server told us that items left after kills lagged the server as well, so he gave us an item that would destroy items that we didnt want to sell (which was magnificient for those long campaigns where you find that much needed torch). This goes back to 2003 2004 so take it for that aswell.  I am sure alot of things hardware wise has changed too so maybe not so much an issue today.
               
               

               
            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
Lag
« Reply #6 on: September 12, 2010, 07:39:16 pm »


               LAG is also induced by poor scripting, and that is a broad topic so will be left to detail perhaps, in another thread. We have slain the lag moster (and the corpse has not twitched in some time). Although we have an excellent crafting system and literally hundreds of other custom scripts running, we optimize ever script we add, and optimized all the ones from packages we used, long ago. Our systems are rigged to have NOTHING in any area until a PC enters, which conserves massive amounts of system resources. Basically nothing we use is stock vault script, tho many ideas were borrowed from vault scripted systems.



We run from a rented server in a secure datacenter, multiple FAT internet connections and power supplies are nice, as is the LINUX os on which we run ONLY nwn. 180megabyte module files, 1100+ areas, guilds, crafting, custom spells, many special systems.



If anyone out there can find lag on my server, please do report it, we slay the lagmonsters whenever/wherever they rear their ugly, pustuly faces.



66.232.100.90  cep2.1 or better

               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Lag
« Reply #7 on: September 14, 2010, 01:08:36 am »


               To be fair to all servers, there are a lot of different variables that stack up to equal lag.

1) Your connection speed matters, so if you try to play NWN on say 56k your going to be overwhelmed with data, and that will cause a lot of lag for you alone.  even if you have a 1 MB Connection, that doesn't guarantee you won't experience lag, if say, the Server is a T1 or has 1.5 MB / Second or greater and it's feeding you data faster than your Ethernet Adapter can read.

2) Your video card could be bottle necking in areas with high 3-D Graphics, cause you to be lagged out, in fact I once seen a DM Spawn in a bunch of simple VFXs and the lag became horrendous.  Furthermore, some models are poorly rendered, therefore causing huge spikes in video lag.

3) The # of players on a server "Can" effect lag, as the more players, the more lag, therefore you would want to measure lag by the # of players on, for even if a server has a T1 or 1.5 MB/Second connection, if 20-60 players are on doing different things in different areas, there is going to be lag, and there is nothing anyone can do about it.

4) Poor Coding as E_K suggest is also another serious cause of lag, and of course the use of some scripts, like the use of On-Hit Cast Spells for weapons are a horrendous cause of lag, then you have the issue of multiple heartbeat scripts firing on NPCs, placeables, or even the module itself, or combat AI which could be badly coded and cause significant lag for all.  It could be cause by a wide array of things, a combination of things, or one thing in particular, it's tough to give you a straight answer without experiencing & looking at a module in the NWN Tool-Set and examining it closely.  How you set up Monster's Factions can have a horrendous effect on lag due to scripting as well.

5) Then there is the actual area design of a module, you will notice on some modules that have large areas, lots of NPCs & Place-able objects in an area which you can interract with, and lots of doors, like you may find in a town area can cause some lag, how much though may be another debate altogether.

I remember one module I entered, in a town area, where the map was 15 X 15, there must have been 50 NPCs walking around, and there were placeable objects everwhere, the lag was so bad, I kept side-stepping.  This was played on a 3.2 GHz DUal Core CPU with a good video card, so it wasn't the computer, but the module's design that effected gameplay significantly.

I hope this has answered your question some more, though there is really no one definite answer to the question, and we would all be speculating to try to answer your broad question, because many things can account for lag.
               
               

               


                     Modifié par Genisys, 14 septembre 2010 - 12:08 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Lag
« Reply #8 on: September 14, 2010, 02:54:34 am »


               

Genisys wrote...

3) The # of players on a server "Can" effect lag, as the more players, the more lag, therefore you would want to measure lag by the # of players on, for even if a server has a T1 or 1.5 MB/Second connection, if 20-60 players are on doing different things in different areas, there is going to be lag, and there is nothing anyone can do about it.

Nope, if they are all in different areas its good. Problem is if there is more than 10 players in one area. The more players in one area the worse, if you got 60players in module Genisys, try as DM to teleport them all at one place (there is DM button for it) - I wouldn't wonder if it would crash a server...
               
               

               
            

Legacy_FR Mulm

  • Newbie
  • *
  • Posts: 48
  • Karma: +0/-0
Lag
« Reply #9 on: September 14, 2010, 03:36:34 am »


               

ShaDoOoW wrote...

Genisys wrote...

3) The # of players on a server "Can" effect lag, as the more players, the more lag, therefore you would want to measure lag by the # of players on, for even if a server has a T1 or 1.5 MB/Second connection, if 20-60 players are on doing different things in different areas, there is going to be lag, and there is nothing anyone can do about it.

Nope, if they are all in different areas its good. Problem is if there is more than 10 players in one area. The more players in one area the worse, if you got 60players in module Genisys, try as DM to teleport them all at one place (there is DM button for it) - I wouldn't wonder if it would crash a server...


It will crash the server with doing it with 30 people so I am sure 60 would break it as well.

20 people crafting causes lag. 20 people in 20 different spots not so much. 20 people milling about in the start room...lag monster rears her head.

Over rides are another huge lag inducer and some of the worse things to have as they can cause both client side lag and worse server side lag. Some can even crash servers and PWs.
               
               

               
            

Legacy_Sharona Curves

  • Full Member
  • ***
  • Posts: 115
  • Karma: +0/-0
Lag
« Reply #10 on: September 15, 2010, 01:03:11 am »


               I have heard that lag can be reduced by "direct connect" to the server instead of connecting through genre selection of the gamespy interface?  I've not noticed any difference, so is there any truth to this.
               
               

               
            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
Lag
« Reply #11 on: September 15, 2010, 01:39:02 am »


               

Genisys wrote...

To be fair to all servers, there are a lot of different variables that stack up to equal lag.

...clip..  several illuminating issues  ...clip...

I hope this has answered your question some more, though there is really no one definite answer to the question, and we would all be speculating to try to answer your broad question, because many things can account for lag.

Absolutely!  Yes, several of the points I was aware of but there were others you've documented that can have an equally significant effect on the lag.

I suppose the main issue is for me:  There seems to be no way to know what customizations have been implemented on any random server.  I can only guess what may be the cause by process of elimination of some of the factors.  Small parties and stock graphic renderings should imply minimum latency but then  the "hidden" customizations could very well be placing demands, connectivity- or hardware-related ones, on the "digestion".

I had always felt that without the special override and hak requirements, any module should play smoothly.  But it is becoming obvious now, that those other "hidden" alterations can have just as significant effect as the overrides could.  The relative location of the server could present a routing issue that a closer server with similar customizations may not.

Now if each server compiled a list of their custom modifications into a readme of sorts, one could possibly forecast whether that server had the potential to put strain on the game play on the local machine trying to run it.  They never do that, and I'm quite certain it just isn't practical to do so, regardless.

Nonetheless, thanks for expanding my perspective on this issue, Genisys and others. '<img'>
               
               

               


                     Modifié par HipMaestro, 15 septembre 2010 - 12:45 .
                     
                  


            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
Lag
« Reply #12 on: September 15, 2010, 02:45:30 am »


               Note, two lists for two different servers could be very similar in this case and you could still have one lag like mad and the other not. The trick is in the code. Compare ArgentumRegio (my server) to any other, feature rich, lag free.



               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Lag
« Reply #13 on: September 15, 2010, 03:04:57 am »


               

HipMaestro wrote...

Now if each server compiled a list of their custom modifications into a readme of sorts, one could possibly forecast whether that server had the potential to put strain on the game play on the local machine trying to run it.  They never do that, and I'm quite certain it just isn't practical to do so, regardless.


hehe...I don't even remember all the modifications I've made for my PW, and I'm the only person that's done the code/content work. '<img'>

I'd say the biggest way to fight lag is constant script optimization.  Going back and revisiting your code 6-12 months later helps, since a really fresh look at code can help you figure out places/mothods to streamline.
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Lag
« Reply #14 on: September 15, 2010, 06:39:40 pm »


               I noticed C.R.A.P. in CEP 2.2 and CEP 2.3 was causing some lag in my module(s), I think it had to do with the "default" script that fires on players every 6 seconds, so I disabled it, and the lag went away!  I could be wrong about that, but I definitely noticed a difference in my module while playing offline after disabling it.  I couldn't imagine what it would do to a server module.

As far as the moving 20 - 60 players to one area, yes that's a horrendous lag issue, though I've never had it crash my server, ever.  I can attest to the multiple people in one area moving around causing lag, but many servers jump all their players to one area at start, and if there are scripts firing at start, watch out for the lag monsters..

(Ever noticed on a Server restart how it's hard to come into a server that just rebooted?)
               
               

               


                     Modifié par Genisys, 15 septembre 2010 - 05:40 .