Advertisement

Lag - What Is It?

People use the term a great deal, but usually without really understanding what it means, what causes it or how to deal with it. Some of the things suggested to reduce lag have little or no effect.

First of, “lag” is a catch-all word that actually covers 3 very different things, and it is important to distinguish between them. Most lag reduction methods only deal with one of these 3 aspects.

You can use the lag meter to help determine which of these three is affecting you the most. More detailed information is available in the Statistics Bar, which may be accessed by pressing Shift-Ctrl-1.

Network Lag

This is when you have connectivity issues. There are problems somewhere in the network between your computer and the LL servers. This usually can be noticed when you start to experience packet loss. Press Shift-Ctrl-1 (or View → Statistics Bar) and look at the top, packet loss; ideally this should be 0%; if it isn't you have a connectivity issue and are losing data, Also, check Ping SIM. Ideally, this should be under 200.

Symptoms of a poor connection include (but are not limited to):

  • failure of your avatar or textures to rez.
  • object information not display in hover tips when you mouse over them
  • Teleport failure
  • random crashes

You can try to mitigate network lag by playing with your bandwidth. Too high, or too low, a value will result in network lag. For information on how to determine your optimal bandwidth, refer to this page if using Phoenix, or this page for Firestorm.

Aside from the network issues mentioned above, some programs may inhibit or interfere with a good connection. Some firewall software and anti virus programs are known to do this. You may want to temporarily disable them and see if the situation improves.

Client Side

Everything you see has to be drawn by your graphics card. When there is too much to draw, when your computer cannot keep up, you experience client-side lag. Avatar Render Weight (formerly known as ARC - Avatar Rendering Cost) is part of client-side lag, as the name itself says.

Symptoms of client side lag include jerky or sluggish movement.

There are many things you can do to reduce this, without having to ask people to adapt to you:

  • reduce your draw distance (do you really need to see 512m away?);
  • turn on avatar impostors (this makes drawing of distant avatars much faster);
  • disable atmospheric shaders (which serves to drastically reduce how much your computer has to render, as the sky alone is very graphics-intensive);
  • if need be, inhibit the rendering of other avatars: using Phoenix: Advanced → Rendering → Types → Character; using Firestorm: Advanced → Rendering Types → Avatar - or derender them.

Client side lag is local to you. It is a direct result of how powerful your computer is. It is no one else's fault if your computer cannot handle a specific situation. So if you're in a high-lag setting, adapt temporarily as described above.

It must also be pointed out that client side lag does NOT affect things like scripts, at all. It has next to zero impact on a SIMs performance.

Particles

Contrary to popular belief, particles do not “lag a SIM'. Their effect on a SIM, on the servers, is in fact close to zero. Particles are almost entirely client-side. They are rendered on your computer, by your graphics card, and in fact, do NOT require a script to keep them going. They need a script to initiate the effect, yes, but afterward the script may be removed and the particle effect will keep going forever - until another script is dropped in to turn them off, or the object is taken or deleted.

If you find that particles are “lagging you”, it is wrong to ask that the effect be stopped. Instead, stop it yourself, on your own computer. That way others, who are less affected, may continue to enjoy them.

You can disable particles in a number of ways:

  • Phoenix:
    • View → Hide Particles
    • Advanced → Rendering → Types → Particles
    • Preferences → Graphics → Custom → Particle count - set to 0
  • Firestorm:
    • Advanced → Rendering Types → Particles
    • Preferences → Graphics → Max. particle count - set to 0

Doing any of these things will stop particles “lagging you”. There is no need to ask others to degrade their SL experience on your behalf. Also, again, particles do NOT cause server-side or script lag. Even if the scripts are not removed, a single one uses 0.02ms script time.

Owners of venues that have a “no particles” policy may mean well, but are unfortunately misinformed. Again, particles do not lag a SIM, and are very easily dealt with client-side as described previously. Those venue owners are aiming at the wrong target in trying to reduce lag: particles aren't it, scripts are - as are moving avatars (see below). You can't remove the avatars of course but you can request that they not show up with heavily scripted attachments.

(Having said that, every little bit helps when it comes to reducing script lag, so if you have a particle effect that does not require the script to be in it at all times, remove it.)

Server Side

Server side lag is caused by several things, independently. There are two major causes; all others are secondary and negligible. They are, in order of impact on a SIM:

  • Avatars. People, even wearing nothing at all, with an Avatar Render Weight of 1, and no scripts, will lag a SIM. The SIM needs to keep track of where each avatar is, to prevent them walking through one another, floors, walls, etc. Avatar movement is VERY high when it comes to server side lag. Sitting down reduces this lag significantly. Your avatar, in fact, becomes linked to the prim you're sitting on.
  • Scripts. This is common knowledge. But many do not realize how heavily scripted they are and how badly this affects a SIM. If you know you're going to a busy event, then remove all scripted attachments. An AO in an of itself is negligible when compared to hair that is resize-scripted. Keep the AO, and instead ensure that your hair, shoes and other attachments have no resize scripts in them. (There is no good reason whatsoever for anyone to be carrying around more than 200 scripts on a human avatar, even when in full RP attire, with combat HUDs.)

Contrary to popular belief, prims do not lag a SIM - or more precisely, their effect on lag is miniscule compared to the two things mentioned above. Scripted prims cause lag; unscripted ones do not - relatively speaking of course.

So, if you're going to an event, before you leave for it, check your attachments (hair, shoes, etc) to ensure that they are unscripted. To those running events, it is strongly suggested that you ask attendees to do these things; a badly lagged SIM affects everyone at the event.

It must be stated that the above is a simplification; the true situation is far more complex but the intent was to be brief, simple, yet sufficiently correct.

The "Mono Freeze" Bug

That isn't the official name of it, but it is descriptive.

In brief, any time a mono-compiled scripted is rezzed into a SIM, the SIM suffers a small “hit”. (“Rezzed into”, means not only objects rezzed in-world, but also avatars teleporting into a SIM - as well as leaving.)

This effect is cumulative; every time a mono script is rezzed, the negative effect sums to the previous ones. For any single script, the effect is tiny, but it adds up. And eventually it becomes noticeable: the SIM begins to freeze. Everything in the SIM stops, you can't move, you can't rez, and all scripts stop completely. As it gets worse, the freeze effect lasts longer and longer. It becomes easy to predict when someone has arrived or left a SIM simply because suddenly you can't move.

The only solution to this, at this time, is to restart the SIM. That clears the effect, but it just starts building once again, eventually requiring yet another restart. Anyone who manages a SIM will be well aware of this, especially if the SIM is very busy. But they may not be aware of the cause.

The cause is mono complied scripts - or to be more precise, the way the SIM servers initialize them. And so we come to yet another reason why people should remove all resizers from their hair, shoes and other clothing attachments. If you don't, be aware that every time you enter or leave a SIM, you are having a serious negative impact on it. This can range from vendors failing to deliver products, to, yes, rabbits that suddenly stop eating.

This bug is amply documented here:

In an effort to mitigate the effects of this problem, LL introduced “threaded teleports”. This does in fact reduce the “freeze” effect. On the other hand, it results in a far greater incidence of getting logged out altogether when you attempt to TP.


For further information on lag, please consult the following:

lag.txt · Last modified: 2012/01/26 06:00 by miro.collas
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki