Difference between revisions of "Lag"

From Second Life Wiki
Jump to navigation Jump to search
(Bandwidth indicators may not be shown by default. Newview.exe was renamed to SecondLife.exe in client v1.6.)
m
 
(19 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Help|BugFixes=*|Viewer=*|Glossary=*|OldInfo=*}}The condition of running slowly. This can be caused by the server, your internet connection, or the objects, scripts and activities of the players around you.
{{Help|BugFixes=*|Viewer=*|Glossary=*}}<div style="float:right;">{{GettingStartedNav|float=none}}{{TOC}}</div>


There are a few different types of Lag in [[Second Life]] (SL)SL is a very cutting edge application which will manage to push the limits on much of your computer hardwareYour video card, CPU, memory, and your network will all be far from idle while you explore and enjoy Second Life.
Lag is the colloquial name for slow reaction time when using Second Life.  It is a symptom with a variety of causesThis article discusses the sources of lag, and what you can do to deal with it.


== Video ==
When you are logged in, there are a number of components which have to all work smoothly to minimize lag.  These are your computer, the Internet connection, and the Linden Lab servers and internal network and databases.  They will be discussed in order starting with your screen and working outward.


Your graphics card will be constantly busy, things will almost always be moving around, disappearing, reappearing, and you will always be loading textures as you move around. 
== Your Computer ==


Due to the dynamic nature of the SL world, some very fast algorithms (ie BSP trees) can't be used here which are used in most 3d games which get to use a "static" precompiled map for their 3d environmentThis means you will get a lower Frames-Per-Second (FPS) rate here than you will get with most of your 3d games.  
Second Life is both graphics-intensive, and uses a lot of bandwidth to communicate with the Linden Lab servers.  Therefore your computer must be capable enough in order to run the Viewer program with minimal problemsSee the [http://secondlife.com/support/system-requirements/?lang=en-US System Requirements page] for basic information.


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 recommend lowering if someone is getting a severely low frame rate.
=== Graphics Hardware ===


You can do so in Edit > Preferences (or {{KeyCombo|ctrl=*|P}}) in the ''Graphics'' tab. Check the ''Custom'' checkbox and lower the ''Draw Distance'' slider.
Your monitor and graphics card or chip are what together produce the images you see on the screen.  Graphics chips vary a great deal in speed. The slowest are "integrated graphics" which use part of the motherboard chipset and some of the main computer memory to do the graphics calculations.  Much faster are discrete graphics cards which have their own memory.


Your video drivers can have a big impact on your performance as well. Video card manufacturers are always finding faster ways to do the same thing, and they incorporate them into newer driversIf your drivers are more than a few versions behind, it is highly suggested that you upgrade them. See
The [[Typical Frame Rate Performance by Graphics Card/GPU|Graphics Card Chart]] gives a relative range of performance for Second Life, though your frame rate will vary depending on settings and where you are in the 3D world.
A more up to date relative ranking of cards can be found at [http://www.tomshardware.com/reviews/best-graphics-card,2387-7.html Tom's Hardware Guide]The lowest few groups on that list will not be able to run Second Life adequately.


*[[Graphics Cards]]
The Second Life world is both large and "live" (constantly changing). So some very fast algorithms (ie BSP trees and pre-compiled maps) used in other 3D games can't be used here. Instead the data to create the view has to be downloaded and then transformed into the 3D view in real time. This means you will get a lower Frames-Per-Second (FPS) rate than you will get with most other games.
*[[How to identify your graphics card]]
*[[Updating drivers]]


== CPU ==
Not many people use Second Life for "fast twitch" combat-type activities, so somewhat lower frame rates are acceptable. To see what you are getting for frame rates, open the [[Statistics Bar Guide|Statistics]] floating window using the top menu '''View > Statistics Bar''' item.


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 certainly run your CPU at full 100% utilization the entire time you have the program running.  Due to the dynamic nature of SL, a CPU can often have more of an effect on improving your performance than a new video card.
More information on graphics cards and issues can be found here:


== Network ==
* '''[[Graphics Cards]]''' - Information on selecting a card
* '''[[How to identify your graphics card]]'''
* '''[[Updating drivers]]''' - Having the latest drivers can improve performance a bit


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 moving around or in a crowded area.
=== Cache Settings ===


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.
The cache settings are found in the [[Preferences Window Guide|Preferences]] floating window, via top menu '''Edit > Preferences > Advanced''' tab.
Reducing the cache size to a minimum (64 MB) can help reducing viewer-side lag on computers with slow hard-disk-drives.
Also it can help to move the cache-directory to a different (physical) hard-drive.
Be aware that lowering your cache-size possibly will boost your Second Life bandwidth usage, though.


== Tips on Reducing Lag ==
=== Graphics Settings ===


=== Video ===
The main controls for your graphics settings are found in the [[Preferences Window Guide|Preferences]] floating window, via top menu '''Edit > Preferences > Graphics''' tab.
Use the main "Quality and Performance "slider to change multiple settings for faster or more detailed 3D view. Check the "Custom" box to see more detailed controls.


Here are the settings I recommend for those who are running minimal hardware or who are having trouble with crashes:
If you have a lower performance video card, the following settings will increase speed at the expense of quality.  If you are getting good frame rates, you can set some of these higher:


Open the Preferences window ({{KeyCombo|ctrl=*|P}})
'''Run Second Life in a window''' - Uncheck and select a lower resolution


Under Preferences / Display tab:
'''Draw Distance''' - The single most important control that affects lag is how far from you the 3D world is visible.  When this distance doubles, the amount of data that must be downloaded and displayed goes up 4-8 times (area or volume).  So lowering this slider can make a big difference.


* All checkboxes listed next to "Performance Options" should be UNchecked.
'''Shaders, Reflection Detail, Avatar Rendering:''' - All these checkboxes should be UNchecked.
* Avatar Rendering to "Normal"
* Terrain Detail to "None"
* Uncheck Run in a window
* Use a low resolution, such as 800x600 or 1024x768


'''Lighting Detail, Terrain Detail:''' - Set to Sun and Moon only, and Low, respectively.


Under Preferences / Options tab:
'''Max Particle Count:''' - to 256


* Check ON AGP Graphics Acceleration if you have the option
'''Mesh Detail:''' sliders all the way to the left
* Texture Cache Size should be set to small if you have 512MB of memory or less, or large if you have more.
* Set your video card memory size as low as possible (though you may want to turn it back up if everything seems too blurry to you)
* Move Object, Tree, and Avatar Detail sliders all the way to the left
* Check ON Avatar Vertex Program (turn this back off if you keep seeing avatars folded up into themselves)
* Set Draw Distance to 64 (very important, this is the biggest factor in video speed)
* Fog Distance doesn't appear to have much of an effect, set it to your preference.
* Drop Draw Distance - set to 0, if you have draw distance set to 64, this won't matter anyway.
* Bumpiness Draw Distance - set to 0 (it won't matter if Object Bump is off anyway)
* Max Particle Count to 256 (the default is 4096, you can also disable particles temporarily with Alt+Shift+=)
* Outfit Composite Limit to 5 (no idea what this does, I think 5 is the default, and I don't see any differences in performance when changing it)


Additionally, it can help a lot to make sure you have the newest video drivers installed.  If your drivers are more than a year old, chances are you will probably get some noticable improvement by upgrading them.
'''Hardware Options Button''' - Opens another window with more settings:


=== Network ===
: '''''Filtering:''''' - Leave unchecked
: '''''Antialiasing:''''' - Disabled
: '''''Enable VBO and FBO: - On
: '''''Texture Memory (MB):''''' - Normally set to same as your graphics card memory size
: '''''Fog Distance:''''' -This option is enabled only when the "Basic Shaders" option on the previous dialog was checked. If the Basic Shaders option is unchecked, this Fog Distance will be determined by top menu '''World > Environment Settings > Environment Editor > Advanced Sky button > Distance Multiplier'''.
: '''''Texture Compression''''' (also called 'lossy compression' in other viewers) - switching this setting can drastically change the graphical performance of the viewer. On slower graphics cards it can give a huge performance boost, as texture compression reduces the amount of video memory used by the graphics card. It can also reduce the performance on computers with some faster graphics cards, because the computer needs to do some extra calculations to compress the textures.


==== Bandwidth ====
=== CPU and Memory ===
In the upper right corner of your window, you should see two small vertical indicators.  (If there aren't, hide search textbox from Edit menu > Preference > Genetal tab > Show search panel in overlay bar.)  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 lossIf you see ANY indication of packet loss, 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 may need to adjust your Bandwidth under your Preferences / Network tabThe exception to this is that some packet loss seems to occur regularly at busy hours.
The Second Life Viewer program tends to use a lot of your computer resourcesOn a windows system, typing '''Ctrl-Alt-Del''' will open the "Windows Task Manager", whose performance tab can show you the current percentage utilization of your CPU.  If you find out it is stuck at 100%, one option is to shut down any other programs you may have runningAnother is to reduce the settings within the Viewer, or try an alternate viewer with lower requirements.


# Start with 300 kbps as your default.   
The program also uses several hundred MB of main memory.  Once the real physical memory has been used up, most computers will swap data out to the hard drive temporarily.  This is much slower.  If you see the "Commit Charge" (actual memory used) is more than the amount of physical RAM installed in your computer, you have two options: shut down other programs and reduce settings in the SL Viewer, or add more memory to your computer.
# 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 higher.
# If you are experiencing packet loss, reduce your bandwidth down until it stops.


==== Disk Cache Size ====
As a guide, 512MB would be barely usable, 768MB is usable on the lowest settings, 1 GB is adequate, and more than that is good, especially if you want to run other programs at the same time.
* Pathfinder Linden suggests a reasonable setting around 200MB.  If you set it too low, then you're always downloading things over and over again.  200 seems like a reasonable compromise in size and performance.


Also, you may want to disable streaming audio (Preferences / Audio tab) if you do not have enough bandwidth or want to save some CPU cycles.
== Internet Connection ==


=== CPU/Memory ===
Second Life requires constant communication with the Linden Lab servers.  Data speed is highest when you first arrive at a new location, are moving around quickly, or in an area where lots of people are coming and going.  All of these require sending you new data so you can see it all.  A connection speed of at least 500 kilobits per seconds (kbps) is needed to run Second Life adequately.


* Rebooting your computer before starting SL can help get better performance.
If you are on a wireless router, or entirely wireless connection you may not be getting these speeds. Dialup is definitely too slow for using Second LifeOnce your surroundings have downloaded, your bandwidth will stabilize at anywhere from 4 to 50 kilobits per second.
* Close as many background programs as you can while running SL, especially P2P programs (Kazaa, Gnutella, Shareaza, etc)
* Defragment your hard drive occasionally.
* SL works optimally with 1 GB of RAM (that's 1024 MB)More is better, but the payoff is much less beyond 1GB.


Tip: If you need to run background applications while running Second Life, you may want to try lowering the Task Priority for SecondLife.exe just a little bit to give those programs a chance to run a little more smoothlyDon'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.
Paradoxically, a connection speed that is too high can cause problems.  Your computer has to do something with the new data as it comes in.  If it is too busy, it can miss data packets, which then get re-sent.  This makes the problem worse.  The "Statistics Bar" shows packet loss as a percentage.  If it anything above 0% on a steady basis, go to top menu '''Edit > Preferences > Network > Maximum Bandwidth''' and try lowering the value to reduce packet lossOn the other hand, if you have a fast connection and can handle it, you can increase the bandwidth to download data faster.


== Additional Information ==
On the same tab, '''Disk Cache Size:''' controls how much data sent from the servers is saved on your hard drive. This includes textures, animations, inventory list, sound clips, and other items.  A higher setting will keep from having to repeat downloading items again when you see them.


* To view your video and network status, press Alt+1
Streaming audio and video media, and voice chat, all increase bandwidth required. Use the top menu '''Edit > Preferences > Audio & Video > Streaming Preferences:''' to turn off streaming.  Use '''Edit > Preferences > Voice Chat > Enable voice chat''' to turn it off.  Voice chat also uses an accessory program from Vivox to run, and turning it off will also lower CPU use.
* 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 ===
== Server Side Lag ==
* Your Draw Distance is too high
* There are many physical (physics-enabled) objects nearby
* There is a large group of people nearby
* You are moving (and therefore loading new geometry, textures, and sounds)
* You or other people are playing sounds or animations
* When many objects are moving around nearby
* You have "fancy" graphics features enabled (Local Lighting, Object Bump, Ripple Water, Shadows, etc)


The Linden Lab servers have to both keep track of everything happening in a map region, and send that information to all the users who can see the region.  If they have too much to do, they will slow down the simulator frame rate so as to not lose data.  If too much communication is required to fetch data about objects and send them to all the users, it can become backlogged.  Since lag can have multiple causes, the [[Statistics_Bar_Guide#.27Simulator.27_Panel|Statistics ]] floating window can tell you when it is server-side lag that is the cause.
Things that make the server busier include:
* There are many physical (physics-enabled) objects in the region
* More users in or can see the region, since it has to send data to everyone who is
* More object-embedded software scripts running in the region
* Lots of changing textures


[[Category:Text from In-world Notecards|Lag]]
[[Category:Text from In-world Notecards|Lag]]
Line 108: Line 97:
==See Also==
==See Also==
* [http://en.wikipedia.org/wiki/Lag Wikipedia: Lag]
* [http://en.wikipedia.org/wiki/Lag Wikipedia: Lag]
* [http://analutetia.com/blog/anatomy-of-lag/ Anatomy of Lag Article]
* [[Packet Loss]]
* [[Packet Loss]]
* related [[Knowledge Base]] articles:
* related [[Old Knowledge Base]] articles:
**{{slkb|4207|I have a lot of lag. How can I improve performance?}}
**[[I have a lot of lag.  How can I improve performance|I have a lot of lag. How can I improve performance?]]
**{{slkb|4237|How do I check for packet loss (network lag)?}}
**[[How do I check for packet loss (network lag)|How do I check for packet loss (network lag)?]]
**{{slkb|4426|How many avatars can I have on my region at once without causing serious problems with lag?}}
**[[How many avatars can I have on my region at once without causing serious problems with lag|How many avatars can I have on my region at once without causing serious problems with lag?]]
**{{slkb|4782|Typical Frame Rate Performance by Graphics Card/GPU}}
**[[Typical Frame Rate Performance by Graphics Card/GPU|Typical Frame Rate Performance by Graphics Card/GPU]]

Latest revision as of 20:00, 14 June 2013

Lag is the colloquial name for slow reaction time when using Second Life. It is a symptom with a variety of causes. This article discusses the sources of lag, and what you can do to deal with it.

When you are logged in, there are a number of components which have to all work smoothly to minimize lag. These are your computer, the Internet connection, and the Linden Lab servers and internal network and databases. They will be discussed in order starting with your screen and working outward.

Your Computer

Second Life is both graphics-intensive, and uses a lot of bandwidth to communicate with the Linden Lab servers. Therefore your computer must be capable enough in order to run the Viewer program with minimal problems. See the System Requirements page for basic information.

Graphics Hardware

Your monitor and graphics card or chip are what together produce the images you see on the screen. Graphics chips vary a great deal in speed. The slowest are "integrated graphics" which use part of the motherboard chipset and some of the main computer memory to do the graphics calculations. Much faster are discrete graphics cards which have their own memory.

The Graphics Card Chart gives a relative range of performance for Second Life, though your frame rate will vary depending on settings and where you are in the 3D world. A more up to date relative ranking of cards can be found at Tom's Hardware Guide. The lowest few groups on that list will not be able to run Second Life adequately.

The Second Life world is both large and "live" (constantly changing). So some very fast algorithms (ie BSP trees and pre-compiled maps) used in other 3D games can't be used here. Instead the data to create the view has to be downloaded and then transformed into the 3D view in real time. This means you will get a lower Frames-Per-Second (FPS) rate than you will get with most other games.

Not many people use Second Life for "fast twitch" combat-type activities, so somewhat lower frame rates are acceptable. To see what you are getting for frame rates, open the Statistics floating window using the top menu View > Statistics Bar item.

More information on graphics cards and issues can be found here:

Cache Settings

The cache settings are found in the Preferences floating window, via top menu Edit > Preferences > Advanced tab. Reducing the cache size to a minimum (64 MB) can help reducing viewer-side lag on computers with slow hard-disk-drives. Also it can help to move the cache-directory to a different (physical) hard-drive. Be aware that lowering your cache-size possibly will boost your Second Life bandwidth usage, though.

Graphics Settings

The main controls for your graphics settings are found in the Preferences floating window, via top menu Edit > Preferences > Graphics tab. Use the main "Quality and Performance "slider to change multiple settings for faster or more detailed 3D view. Check the "Custom" box to see more detailed controls.

If you have a lower performance video card, the following settings will increase speed at the expense of quality. If you are getting good frame rates, you can set some of these higher:

Run Second Life in a window - Uncheck and select a lower resolution

Draw Distance - The single most important control that affects lag is how far from you the 3D world is visible. When this distance doubles, the amount of data that must be downloaded and displayed goes up 4-8 times (area or volume). So lowering this slider can make a big difference.

Shaders, Reflection Detail, Avatar Rendering: - All these checkboxes should be UNchecked.

Lighting Detail, Terrain Detail: - Set to Sun and Moon only, and Low, respectively.

Max Particle Count: - to 256

Mesh Detail: sliders all the way to the left

Hardware Options Button - Opens another window with more settings:

Filtering: - Leave unchecked
Antialiasing: - Disabled
Enable VBO and FBO: - On
Texture Memory (MB): - Normally set to same as your graphics card memory size
Fog Distance: -This option is enabled only when the "Basic Shaders" option on the previous dialog was checked. If the Basic Shaders option is unchecked, this Fog Distance will be determined by top menu World > Environment Settings > Environment Editor > Advanced Sky button > Distance Multiplier.
Texture Compression (also called 'lossy compression' in other viewers) - switching this setting can drastically change the graphical performance of the viewer. On slower graphics cards it can give a huge performance boost, as texture compression reduces the amount of video memory used by the graphics card. It can also reduce the performance on computers with some faster graphics cards, because the computer needs to do some extra calculations to compress the textures.

CPU and Memory

The Second Life Viewer program tends to use a lot of your computer resources. On a windows system, typing Ctrl-Alt-Del will open the "Windows Task Manager", whose performance tab can show you the current percentage utilization of your CPU. If you find out it is stuck at 100%, one option is to shut down any other programs you may have running. Another is to reduce the settings within the Viewer, or try an alternate viewer with lower requirements.

The program also uses several hundred MB of main memory. Once the real physical memory has been used up, most computers will swap data out to the hard drive temporarily. This is much slower. If you see the "Commit Charge" (actual memory used) is more than the amount of physical RAM installed in your computer, you have two options: shut down other programs and reduce settings in the SL Viewer, or add more memory to your computer.

As a guide, 512MB would be barely usable, 768MB is usable on the lowest settings, 1 GB is adequate, and more than that is good, especially if you want to run other programs at the same time.

Internet Connection

Second Life requires constant communication with the Linden Lab servers. Data speed is highest when you first arrive at a new location, are moving around quickly, or in an area where lots of people are coming and going. All of these require sending you new data so you can see it all. A connection speed of at least 500 kilobits per seconds (kbps) is needed to run Second Life adequately.

If you are on a wireless router, or entirely wireless connection you may not be getting these speeds. Dialup is definitely too slow for using Second Life. Once your surroundings have downloaded, your bandwidth will stabilize at anywhere from 4 to 50 kilobits per second.

Paradoxically, a connection speed that is too high can cause problems. Your computer has to do something with the new data as it comes in. If it is too busy, it can miss data packets, which then get re-sent. This makes the problem worse. The "Statistics Bar" shows packet loss as a percentage. If it anything above 0% on a steady basis, go to top menu Edit > Preferences > Network > Maximum Bandwidth and try lowering the value to reduce packet loss. On the other hand, if you have a fast connection and can handle it, you can increase the bandwidth to download data faster.

On the same tab, Disk Cache Size: controls how much data sent from the servers is saved on your hard drive. This includes textures, animations, inventory list, sound clips, and other items. A higher setting will keep from having to repeat downloading items again when you see them.

Streaming audio and video media, and voice chat, all increase bandwidth required. Use the top menu Edit > Preferences > Audio & Video > Streaming Preferences: to turn off streaming. Use Edit > Preferences > Voice Chat > Enable voice chat to turn it off. Voice chat also uses an accessory program from Vivox to run, and turning it off will also lower CPU use.

Server Side Lag

The Linden Lab servers have to both keep track of everything happening in a map region, and send that information to all the users who can see the region. If they have too much to do, they will slow down the simulator frame rate so as to not lose data. If too much communication is required to fetch data about objects and send them to all the users, it can become backlogged. Since lag can have multiple causes, the Statistics floating window can tell you when it is server-side lag that is the cause.

Things that make the server busier include:

  • There are many physical (physics-enabled) objects in the region
  • More users in or can see the region, since it has to send data to everyone who is
  • More object-embedded software scripts running in the region
  • Lots of changing textures

See Also