Understanding the Maximum Bandwidth Option in the Second Life™ Viewer
This post provides a bit more detail to explain one point from my earlier post 12 Ways To Make Second Life™ Run Faster On Your Low Performance Computer. Some debate arose over the “real meaning” of the maximum bandwidth option on the Network Settings dialog, so I figured I’d go research this and try to find the facts.
A quick caveat: Even though this post is fairly long, I have purposefully left out a bit of detail in order to avoid overwhelming folks who are not fluent with network engineering and programming. If you are fluent in these areas, I’m sure you’ll see things that will make you say “but you left out…” Don’t panic. This doesn’t mean that I don’t understand the mechanics, it’s just that I’m trying be sure this is accessible to people who need to understand it. Thanks for your understanding!
Why All This Detail? It’s Just One Slider!
I know… this seems like a lot, but it is broken down in to easy chunks. The reason I’ve included this background is that the Maximum Bandwidth Option only controls some of the traffic that goes back and forth between the viewer and the server(s) at the data centers. If you understand a little bit about what’s going on “under the hood” and which types of traffic it does and does not control, you’ll be in a much better position to decide on the best setting for Maximum Bandwidth as you use Second Life.
Second Life is a Client-Server System
Second Life™ is at its core a client-server system—one where your client, known as the viewer, talks to a number of servers at the Linden Lab data centers.
As this post is written, most of the communication from your client goes directly to a single server—the region where your avatar is currently standing. Almost all traffic from the viewer goes directly from your client (the viewer) to the server that hosts that region, even if it is bound for other servers on the back end of the system.
The version 2 beta viewer is set to change that paradigm, by allowing the viewer to contact the asset store directly to download textures, however that architectural nit does not change the basic throughput issues discussed in this post.
In a client-server system, the client (the viewer) typically makes a series of requests of a server, and receives responses back in reply. The viewer manages many types of traffic in order to “create the world” of Second Life™, but not all of these are controlled by the Maximum Bandwidth option. There is a very good reason for this, but I’ll hold off on explaining that until we take a look at the traffic types that are managed by the Maximum Bandwidth Option.
Traffic Types Controlled by the Maximum Bandwidth Option
The viewer to do its job. Three major traffic types are controlled by the Maximum Bandwidth option; Geometry, Texture and Control traffic.
What Is Geometry Data About?
Geometry data describes the shapes of prims and avatars. The image to the right is a scene with only geometry data. If geometry traffic were the only traffic requested by the viewer, you would only see scenes like this, with triangles, lines connecting them, and shapes “implied” by the shape of the mesh on screen.
With only geometry data, the scene is recognizable, but not very interesting. There are no colors, because the geometry data only defines the shapes of things in the scene.
Your graphics card creates the 3D rendering of a scene from this geometry data (3D coordinates of the corners of triangles in the mesh) and turns it into this sort of view. This is one part of why graphics cards determine performance in a 3D virtual world. Some graphics cards are much faster at turning geometry data into shapes than others. They are often measured in terms of how many vertices (corners) per second they can render.
What is Texture Data About?
Another job of your graphics card is to add textures (images) to the scene, and to figure out how to “wrap them” around the geometry data (many times a second as you move, or move your camera or as lighting changes…!) This is another performance area for graphics cards—how fast they can deal with texture data and transform the images so that they look wrapped around the geometry.
This is the exact same scene with texture data loaded.
It looks pretty different, right? You can, however, see how it has all the same shapes seen above, with the addition of images that cover the shapes.
What is Control Data About?
Control data is information sent back and forth between the viewer and the servers to indicate the position and movement of avatars, objects, lights and your camera. Position data has to be sent back and forth when you move your avatar or camera, or when some other avatar in the scene moves, or when a script causes things to move around in the scene.
What is NOT Controlled by the Maximum Bandwidth Option?
The key traffic types not controlled by the Maximum Bandwidth Option are multimedia and voice; any parcel audio/music streams, any parcel media stream (video), in viewer v2 shared media video and audio, and voice audio. It turns out that many of these are handled by completely different subsystems under the viewer, and they are not part of the Maximum Bandwidth control.
What Does the Slider for Maximum Bandwidth Actually Do?
A note about the research for this section: There are many theories about what this slider does. Some are close to reality, and others “not so much.” I have researched this by both reading the source code for the currently released open source viewer, consulting with engineers familiar with the viewer code, and checking with Linden Lab to be sure that the basic description is reasonable. As noted above, if you are a developer, you may think I’ve left things out, and that is true. It’s purposeful in order to make this understandable for non-programmers.
As you use Second Life™, you give directions to the viewer in various ways, using keyboard, mouse, other pointing devices, telling the viewer that you want something to happen. These actions turn into messages that are requests to the server(s).
We looked at a few traffic types above, and have learned that some of these are controlled, or throttled, by the Maximum Bandwidth Option, and others are not.
This throttling is done in a fairly sophisticated way. The Maximum Bandwidth setting is sent to the simulator, and tells it what the maximum bandwidth available to your viewer is supposed to be. This is not measured—the simulator takes the number “on faith” as the bandwidth you have available.
The simulator will then assume you have about that amount of bandwidth available as you operate the viewer, and will stream data back to your viewer at a rate about equal to or below the Maximum Bandwidth number. If your viewer starts reporting lost packets, the simulator will then throttle back even further, to keep from overwhelming your client (the viewer.)
How Should You Set Maximum Bandwidth?
In general, you should set Maximum Bandwidth to match the speed of your connection to the Internet. You will want the Maximum Bandwidth to be set as high as possible, with your connection speed considered, yet not so high that the viewer slows down and seems more laggy. If you set Maximum Bandwidth too high on a very slow connection, you can get into the situation where this one setting can reduce performance noticeably. I have only seen this happen on very slow connections (see the next section for more details on handling very slow Internet connections), and typically if I am on any connection with at least 1 Mbps speed available will leave the Maximum Bandwidth all the way up.
There are, however, many possible caveats to this simple statement, which is why in the overview article the advice is “start there and try higher or lower.”
If your connection is fast, typically a cable or fiber-optic connection, your connection will be so fast that you should put the Maximum Bandwidth slider at the top of its range.
If you have a DSL connection (these are typically 768kbps, and often less even if you’re told that is the supposed speed,) then the default 500 kbps setting may be a good starting point.
If you are using a wireless connection, “your results may vary dramatically.” Some wireless setups are rock solid and as fast as wired. Most are far from that description, showing high packet loss rates and much lower speed than a wired connection.
SpeedTest.net is a solid site to use in checking your bandwidth. In general the “Download Speed” is the number you will want to match up with Maximum Bandwidth. (I have no financial or other connection to SpeedTest… I’m just a satisfied user.)
When Should You Do Something Special with the Maximum Bandwidth Slider?
There are a few cases where you will want to adjust the Maximum Bandwidth slider. First of all, any time you change the physical location of your computer you should check your bandwidth and consider whether it’s time to change the Maximum Bandwidth setting. I am not talking about moving from living room to dining room with this comment. I am talking about taking your notebook from home to the office, or to a public WiFi spot or some other location with a different Internet connection.
OK, here is the really important thing to know if you are sometimes in a place with slow Internet access.
If your Internet connection is very slow (and by very slow I mean around 600 kbps or slower,) you may find yourself in the situation that Second Life™ will start, things will rez (albeit slowly) but streaming media (music or video) or voice will not work. Other people in the region will report that they are working fine, but you hear nothing at all.
The details above explain how this can happen, and from that we’ll see what to do about it.
If you have your Maximum Bandwidth set to allow using most or all of your real bandwidth (the connection speed,) you are telling the simulators to use “the whole pipe, as best they can” to shove geometry, texture and control data back to your viewer. There is a problem with this strategy, though. It doesn’t leave any space for audio, music, video or voice! Remember that those types of traffic are separate from the Maximum Bandwidth control.
In this case, you should try reducing the Maximum Bandwidth, sometimes “mightily”! If you are on, for instance, a connection that provides only 500 kbps of throughput and voice is not working at all, or is very choppy, you may want to try running Maximum Bandwidth at 400, or even 300 kbps. This will make things rez more slowly and movement will be slower, but it may tame the geometry and texture traffic enough to let voice keep the connection live.
Why are Audio, Music, Video and Voice a Special Case?
You might be thinking “why are these types of traffic so special”? The answer is that they are real time streaming traffic. If not enough data can get through, the viewer will be missing enough data that there will be gaps in the audio, video or voice (can you say choppiness?) By throttling everything else, we leave hopefully enough free bandwidth to ensure that these streaming traffic types can always get through.
There are other reasons for voice choppiness, usually because of interference from other things running on your machine, however bandwidth starvation or a bad WiFi connection is often the culprit.
The Bottom Line
Ok, so in review…
There are a variety of types of traffic handled by the viewer. The viewer makes requests of the servers to get data sent back to it, and the Maximum Bandwidth Option tells the server how much to throttle information sent back to the viewer, in order to keep overloading the viewer. This setting will set a rough maximum to the speed that the simulator will send data to the viewer, so setting it too low will reduce the performance of the viewer unnecessarily. Maximum Bandwidth should be as high as you can get it before the viewer starts to slow down again, or before multimedia and voice services stop working on a slow connection.
The Maximum Bandwidth does not affect real time streamed traffic, such as audio, music, video or voice, so if those services will not connect on a slow Internet connection, you will want to try reducing the Maximum Bandwidth. If you’re on a fast connection, try setting Maximum Bandwidth to the speed of your connection, and then try setting it to its maximum setting. If things run no slower, then leave it at the top of the range.
Any time you move to a different Internet connection, remember to check Maximum Bandwidth and you’re off and running!
I hope this helps, and as always comments are always welcomed!