04 March 2007

about lag

==============
Kex Godel's Lag Guide
==============

v1.2: added FPS examples, ATI video note
v1.1: Added ATI tips to video, some variou stouching up
v1.0: Initial draft

Introduction

There are a few different types of Lag in Second Life. SL is a very cutting edge application which will manage to push the limits on much of your computer hardware. Your video card, CPU, and your network will all be far from idle while you explore and enjoy Second Life.

Video:

The graphics card is obviously kept quite busy, especially with such a dynamic environment it is constantly loading new textures. Due to the dynamic nature of the SL world, some very fast algorithms (ie BSP trees) can't be used in SL that can be used in 3d games which get to use "static" evironments for their world maps. This means you will get a lower Frames-Per-Second rate here than you will with most of your 3d games.

Please Note: It is quite typical to get only 10-20 Frames Per Second even in quiet areas of the world, with a fairly new graphics card. DRAW DISTANCE can have one of the biggest effects on your frame rate, and is always the first thing I ask people who tell me they are lagged.

CPU:

The CPU does a lot of work in SL compared to other applications. Everything that moves in the world has to be updated, and SL is a very dynamic world. SL will almost certianly run your CPU at full 100% utilization the entire time you have the program running.

Network:

Your internet connection will also be used heavily, especially as you're flying around the world. Expect your bandwidth to idle at around 20-50 kilobits per second, and peak in the hundreds of kilobits per second while doing large updates.


These are the three major sources of lag. CPU, Video, and Network. Often, when one is lagged, the others can appear to have lagged down as well. Here, I will try to give some advice on how to speed up each. Once you have eliminated all sources of lag, then you should go back and re-enable the options you are willing to compromise speed for.

================
VIDEO OPTIMIZATION TIPS
================

Video:

For those who own an nVidia brand video card:

Under Preferences / Display tab:
- All checkboxes listed next to "Performance Options" are UNchecked.
- Avatar Rendering is "Normal"
- Terrain Detail to "None"

Under Preferences / Options tab:
- Check ON AGP Graphics Acceleration
- Texture Cache Size is set to Large (I have 1GB of memory)
- Set your video card memory size. (Some people have remarked that setting it one notch lower than your actual video card memory size can improve performance)
- Object, Tree, and Avatar Detail sliders are all the way to the left
- Checked ON Avatar Vertex Program
- Draw Distance to 64
- Bumpiness Draw Distance is 10
- Max Particle Count to 256 (the default is 4096, you can also disable particles with < Alt Shift + >)
- Outfit Composite Limit to 5 (no idea what this does, I think 5 is the default)


For those who own an ATI brand video card, I recommend the following differences from the nVidia owners:

Under Preferences / Options tab:
- UN check AGP Graphics Acceleration (always do this for stability)
- Set your Video Card Memory to 32MB (but only if you're getting corrupted/strange/black textures)
- UN check Avatar Vertext Program (if your avatar is folded up in strange ways)


Network:

Bandwidth:
In the corner of your window, you should see two small vertical indcators. The one on the left is your PACKET LOSS, the one on the right is your CURRENT BANDWIDTH. These indicators can be green, yellow, or red, depending on the percentage.

Bandwidth is not as important of an indicator of lag as much as packet loss. If you see ANY indication of packet loss (even if it's just a small green amount), that's not good. If you see it every once in a while, or in very busy areas with a lot of people, that is normal. But, if you're getting any significant amount of packet loss in quiet areas or while flying around, you need to adjust your Bandwidth under your Preferences / Network tab.

- Start with 300 kbps as your default.
- If you're not experiencing any packet loss, but feel like the world is loading too slowly and your bandwidth indicator is often yellow or red, then raise your bandwidth to 400 or even 500.
- If you are experiencing packet loss, reduce your bandwidth down until it stops.
- The "Custom" bandwidth setting is typically not used. I would recommend against adjusting any of these numbers until you've been in SL for a while and are familiar with all the details.

Disk Cache Size:
- If you can afford the disk space, set your Disk Cache Size to 1000 MB, otherwise set it as high as you can afford. This will save you bandwidth in places where you've recently already visited.


CPU/Memory/etc:

- Close as many background programs as you can while running SL
- Press Ctrl+Alt+Del and look for any tasks you're familiar with which can be closed
- I've been told that SL works optimally with 1 GB of RAM (that's 1024 MB).
- Rebooting your computer before starting SL can help it have more readily available access to your memory pool
- Defragment your hard drive occasionally, especially after you've been playing SL for a day or two (after each installation) so that the cache gets defragmented.

Tip: If you need to run background applications while running Second Life, you may want to try lowering the Task Priority for newview.exe just a little bit to give those programs a chance to run a little more smoothly. Don't do this unless you absolutely have to, because it will slow down the SL client. I do this often when I'm browsing the web while running SL, as SL tends to eat up all of my CPU and makes my web browser very slow.


Additional Information:

- To view your video and network status, press Alt+1
- Typical framerates are between 10-20 FPS in non-busy areas
- Typical network traffic is between 20-50 kbps in non-busy areas

Lag occurs most when:
- Your Draw Distance is too high
- There are many physical (physics-enabled) objects nearby
- There is a large group people nearby
- You are moving (and therefore loading new geometry, textures, and sounds)
- When many objects are moving nearby
- You have "fancy" graphics features enabled (Local Lighting, Object Bump, Ripple Water, Shadows, etc)


Example Frame Rates with various configurations:
- 20 fps with nVidia Ti4400, Athlon XP 2100+, 1GB memory

2 comments: