12 October 2009

lag hoodoo episode V: the network strikes back

Moving on from graphics settings, it's time to take a look at what the network information means, and what can be done about it. In the Lag Meter (Help->Lag Meter) the second item displayed is labeled Network. In the Statistics Bar (Ctrl-Shift-1, or View->Statistics Bar), there are three items, 'Bandwidth', 'Packet Loss', and 'Ping Sim'. There are more network details under the 'Advanced' section of the Bar, but we will not go into them in this series.

Bandwidth means the total amount of information than can be transferred in a given period of time, while ping time is a measure of latency, that is, how long it takes to transfer individual packets of information. A high bandwidth connection with with large latency (a satellite internet connection, for instance) will likely feel jerky, even though all the information is being transferred rapidly. Likewise, a low bandwidth connection (such as dial-up, ISDN, or slower DSL) will feel like moving through treacle or molasses, even if the latency is very low.

Network-related items that can be controlled within the viewer are found in the Preferences window (Ctrl-P, or Edit->Preferences...), and include 'Maximum Bandwidth' and 'Disk Cache Size'. The default setting for bandwidth is almost certainly too low, but the correct setting will depend upon the specifics of your ISP (Internet Service Provider), local network, and computer hardware. The quick way to find the appropriate setting is to move the slider to the right until you start to see Packet Loss in the Statistics Bar, and then slide it back to the left until the loss is 0.0%.

Disk Cache Size specifies how much room to use for caching downloaded texture and other information, and should always be set to the maximum value, unless you are very restricted on local disk space. The slider will go to 1000 MB, and should be set there. In fact, there is a way to go even higher through debug settings, but at some point you reach diminishing returns. You should not press the 'Clear Cache' button except to try to resolve a rendering or crashing problem, or you will rob yourself of much of the benefit of caching.

The Second Life Snowglobe viewer has introduced a new texture downloading technique than can, in some cases, greatly improve texture downloading and caching. This improvement has also been included into some other viewers, including Emerald and Kirsten's

Outside of the viewer, there are some additional things that will affect network performance. Everybody knows that cable internet connections are always faster than DSL. Of course, everybody is often wrong, and the truth is much more complex. DSL is often available in a range of speeds, and an upgrade can often provide significantly better performance. DSL also is a switched system, meaning that a neighbour's downloading does not impact your performance as directly as it does with cable. On the other hand, DSL speeds degrade rapidly depending on your distance from the local switching office. Other ISP systems, such as wireless broadband, have their own issues.

On your local network, using a wireless connection can sometimes have a very large impact. If network performance continues to be poor, try a direct wired connection to see if that is the issue. If it is, the solution may be as simple as moving the wireless router a small distance, or to another room closer to where you use the computer, or may require upgrading to a faster wireless specification, or even giving up using it all together.

Ping Sim, or latency, is a function of the distance from the server to the viewer, and is not normally something you can control, short of moving physically closer to the servers. There can be situations caused by bad routing that make this distance needlessly long. Likewise, lots of Packet Loss even with a very low Maximum Bandwidth setting can indicated a hardware issue somewhere in the path from the server to your computer, or a misconfiguration of a router or firewall. Diagnosing general network performance problems is beyond the scope of this article, though it's amazing how often simply replacing a cable can make a difference.

No comments: