Thursday, November 12, 2009

Reducing Your Lag!!!

Here are the contents of a notecard I received in Second Life on how to reduce lag. Credit goes to Dave Carmichael for collectingt his information!


Find yourself jittering around when you walk? Or walking through walls and finding yourself in a whole other place, only to snap back where you were before? It's frustrating, very common, and we all hate it.


Could be any number of things. People sometimes complain of lag in bigger stores like Damage, and the biggest reason for it is the number of textures we have to use to show all the great products. We keep scripts minimal here, with few of the features known to take a great burden on the servers (a big cause of a laggy experience). All our textures are 512 pixels or less, and we are constantly looking for ways to reduce the burden on you (for example the walls of the entire store are completely untextured.)


Actually more than you think. One obvious reason for lag is having your draw distance too high. Most of the stuff I'm going to talk about has to do with your graphics settings which you'll find under "preferences" after you click the "custom" checkbox. Let's start there. To make it easy I'll number the things you can do under this graphics tab, assuming you've clicked "custom" for more options.

1. BUMP MAPPING AND SHINY: I have not found much difference with this being set either way.
2. BASIC SHADERS: This CAN cause slower response because it adds features like being able to see things "glow". Still, I would leave this on.
3. ATMOSPHERIC SHADERS: I haven't seen a lot of difference with this, and it has to do with the way light affects your SL experience. I would turn this off only as a last resort.
4. WATER REFLECTIONS: A beautiful effect, but if you can live without it, turn it off. It is a bit of a burden on your graphics card.
5. AVATAR IMPOSTORS: This is actually a lag reliever. It causes avatars to draw more simply when there are a lot of them and they are at a distance. Turn this ON.
6. DRAW DISTANCE: I know it's cool to see things that are farther away, but having this too high IS THE SINGLE BIGGEST CAUSE OF LAG. Turn it way down. I have mine at 64m.
7. MAX. PARTICLE COUNT: Again, particles are a huge part of the SL experience, but if you want a big speed boost, turn this way down, or right off if you can bear not seeing poofers and flames and things. (Make sure you go down under our dock and see the cool fish before you do this though ;)
8. POST PROCESS QUALITY: I have mine on high without much detriment to my experience. Experiment with this one, I honestly don't really have a good grip on how it affects things.
9: MESH DETAIL - This is a set of six different sliders that change how detailed things are in SL. Make them all as low as you can stand. Adjust them and look around then decide how low you can stand it without hurting your experience.
10: LIGHTING DETAIL: I can't stand having this one set to sun and moon only, but if you can, click it. I don't notice much difference myself.

There are other options on this screen but mine are grayed out, like hardware skinning and avatar cloth. Chances are if you can see these options you have a better processor or graphics card than me.

11. HARDWARE OPTIONS: This is a button most people don't notice. Click it and it brings up a new window. Here's what I have mine set at:
*Anisotropic Filtering: off
*Antialiasing: Turn it off, but if you want to take awesome photos, try turning it on only then. (it makes edges less jaggy)
*Gamma: Doesn't matter and mine's greyed out anyway.
*Enable VBO (vertex buffer objects): I leave mine on without any apparent performance hit, but try it off and see what happens. Could be that makes it worse depending on your graphics card.
*Texture Memory -** a big one**. If you have this set too high it is going to slow your experience down BIG time. I have mine set at 96.
*Fog distance ratio: Doesn't matter.

Okay hit OK and let's move on to "NETWORK"

The network tab is just two above the Graphics Tab where we've been doing all this. Click it and we'll mess with these settings.

MAXIMUM BANDWIDTH: From what I understand this tells how big the chunks of data can be that your computer is asking for from the server. The instinct is to have this maxed out. Right? Wrong. Put it below 500 and you'll see a huge performace boost.

DISK CACHE SIZE: I would set this at 500 MB, and just clear it evey once in a while. This is what I do now and i think it's the right choice. A huge Cache just seems to slow things down.

OK let's move to the AUDIO and VIDEO tab.

None of these settings matter except the "play streaming media". Click this off and your machine won't always be trying to play movies when you enter a sim. If you're like me, however, you'll want to keep "play streaming music" on. I like the toonz.

NEXT: let's hit the INPUT AND CAMERA tab.

Not much here, but there are a couple things that bring me a snappier experience. "Camera Transition Time" and "Camera Smoothing". If you have this at anything other than zero, your viewer will put a cinematic damper on your view as you pan around. This is just adding more burden on the system, and I just have it off, even though it can look cool. Put em at zero.

The only other thing to change is under the VOICE CHAT tab. Unless you actually do any chatting in voice, turn this off. It loads a whole other program that takes up both system resources and internet bandwidth.

Next let's talk about a few things you can do with your avatar.


If you want to do not only yourself a favour, but all others around you, remove anything that has a script from your avatar. The reason I say this is there are quite a few scripts that have special instructions to pull information from the server. Everytime a function like this is called it lags the whole sim, not just you. Like what?

RADAR: this is a big cause of lag. Take it off or just sleep it.
BLING: If you are wearing jewelery, make sure it's no-bling. Shoes also. Why? Two reasons. The particles it uses to make the bling use up resources, AND most bling scripts have a voice command to turn them on and off. This is called a "Listen" command, and it is a huge burden on the servers. Take off the bling.
FLEXI: Do you love flexi? Me too. However it causes lag. If you are wearing a big ol 1000 prim flexi hairdo, with a robe and flowing wings with particles, please reconsider your wardrobe. It lags not just you but the whole sim. If you're curious about how much your avatar is a burden on the system go to the Advanced menu (CTRL-ALT-D to make it show up) and go to ADVANCED--> INFO DISPLAYS --> AVATAR RENDERING COST. You will then see a little number above your head. Note its color. A green color is good. The redder it is the more of a terrible citizen you are ;). For example just try taking off your hair and see how that affects this number.
GESTURES: Every time you do a gesture with a sound, it forces everybody around you to download your sounds and animations whether they can hear it or not. Do everybody a favour and go easy on the gestures.

I hope these changes improve your experience in Second Life and that you enjoy your shop at Damage.

Very sincerely,
Dave Carmichael
Creator of Damage

In addition to the above, there's two additional things you can do in the advanced menu:
* Advanced->Rendering->Run Multiple Threads, which yeilds better performance on multicore systems
* Advanced->Rendering->Fast Alpha, which reduces the transparency of distant alpha textures from 256 levels of transparency to 2 levels of transparency, which can yield a noticeable performance increase on older systems. One of my friends got lagged whenever she tried to type out a message. Enabling this option removed that lag.


  1. So... as a merchant, what can I do in my store design and layout to reduce lag for my customers?

  2. Try a few things es0:

    Have your vendor textures no bigger than 256x256 at 72dpi. Anything bigger/higher resolution just takes longer to load.

    Avoid wide-open spaces, instead having separate rooms and niches that don't have to all load at once. Also use minimal (if any) alpha textures, and a few small resolution textures for your walls and floors (I use a 64x64 tiling stucco pattern for walls).

    Enable multiple landing points, so you don't have every avatar teleporting into the same crowded spot all at once.

    More can be found here:

  3. Another good idea is setting up your store on a sky platform or a skybox. Above roughly 1000m, the ground and water are no longer visible, so the viewer won't spend time processing them. This can dramatically reduce lag for a lot of people.