14 December 2009

shame!

Microblogging platform Plurk, of which I'm an active user as ThoMillgrove, reports that Microsoft Chinese subsidiary MSN Juku as blatantly ripped off their code, design, and UI elements. Very uncool, unethical, and illegal. We can hope that Microsoft will act in all haste to correct this.

23 November 2009

lag hoodoo quick reference

Approaches to reduce lag, within groups sorted in order of effectiveness, more or less. This does not cover every item mentioned in the series of articles, just the ones that are likely to have the most impact. It also omits hardware and network upgrade options. You may review the previous articles for more details.

Viewer and Operating System items typically affect your local experience, and not others. Those dealing with the avatar and the region (AKA sim) typically affect both you and others.

Enable the Statistics bar to monitor the effects of changes with Control-Shift-1


  • Viewer Control Panel Graphics Tab (with Custom box selected)

    Note that these are trade offs between speed and quality


    • Window Size set to smaller size

    • Quality and Performance slider moved to left one or more steps

    • Draw Distance reduced

    • Atmospheric Shaders and Water Reflections disabled




  • Viewer Control Panel Network Tab

    • Maximum Bandwidth to 500 kpbs, but adjust with experimentation for best FPS

    • Disk Cache Size to maximum (usually 1000 MB)




  • Other Viewer settings and issues

    Activate the Advanced menu with Control-Alt-D


    • Advanced->Rendering->Run Multiple Threads

      This is not helpful if you have one single core CPU

    • Advanced->Rendering->HTTP Get Textures (if available)

    • Disable Voice, and/or Video (Media) if you are not using them

    • Experiment with alternative viewers




  • Local Operating System

    • Run spyware scan, virus scan, and defragmentation (on Windows)

    • Reboot

    • Disable unnecessary 'helper' applications and crapware

    • Reduce window system eye-candy, e.g., Windows Aero interface

    • Give viewer increased priority

    • Update drivers for graphics card, network interface, and motherboard




  • Avatar

    • Check your ARC (Advanced->Rendering->Info Displays->Avatar Rendering Cost
      But never yell at somebody else about their ARC; that is rude

    • Choose unscripted attachments and clothes in preference to scripted ones

    • Choose clothes and other attachments that use a minimal amount of textures cleverly




  • Region (assuming you have permission to create/modify within the region)

    • Remove unnecessary prims, and don't litter!

    • Use large prims to break up view of lots of smaller sims

    • Reuse textures

    • Be careful of scripts, as they can potentially cause serious lag





That completes this series of articles. I hope you've found it helpful. May your lag be low and your enjoyment high.

17 November 2009

lag hoodoo 9: hardware

Before we get started on the main issue of hardware, a couple of things I've read and discussed with others are worth mentioning.

Zauber Paracelsus, whom I don't know from Adam, published a blog article titled 'Reducing Your Lag!!!' that is worth your reading. While much of what he covers I have already mentioned, he did make one statement about the Maximum Bandwidth setting (Preferences->Network) which made me go back and test a bit: 'Put it below 500 and you'll see a huge performance boost.' I played around with it, and found that, on my system, 500 seemed to give me the best results. It wasn't a huge change, only three or four FPS, but that can make a big difference in feel on an otherwise laggy system. Probably the best setting for your system will depend on your particular network, so experiment with it a bit.

Second, especially if you have a Windows system from a major vendor such as Dell or HP, you may have a lot of 'crapware' being loaded on start up on your system. It's worth taking a look on the Task Manager to see what all may be running on your system that you are not aware of. Take a look at this ZDNet blog entry for more details on how to deal with this.

As you work on reducing lag in your virtual world experience, it's important to remember that you can only do so much if your hardware is not up to the task. Just as a tune up, as important as it is, will not make a Hyunadi perform like a Ferrari, so insufficiently powerful computer hardware cannot perform beyond its limits. Obviously, if money is no object, you can buy a $5000 gaming system and very likely dramatically reduce your lag issues, at least those on the client side. I will not go into huge detail as to how to purchase or build such a system, but you can take a look at the Tom's Hardware Build Your Own website for lots of information on that.

However, many of us do not have that sort of cash ready to spend on such a system. There are strategic upgrades that can be made to maximise whatever money is available for hardware improvement. I do not intend to write an in-depth article on hardware upgrading, but I will touch on the areas most likely to affect the performance of a virtual world viewer. I recommend that you take a look at the vast amount of information available on the Tom's Hardware website.

The key to hardware optimisation is in discovering the bottleneck, and there is generally a bottleneck. With 3d VW viewers, the most likely culprits are GPU (graphics processing unit, the heart of your graphics card), CPU, and RAM (memory). There could also be hard disk, bus, or network speed issues. CPU and RAM are fairly easily checked using a monitoring application, such as the Windows Task Manager, the Mac OS X Activity Manager, or the Linux "top" command. These tools can quickly show you, among other things, if your CPU is being utilised at 100% on an ongoing basis, or if your RAM is being overtaxed. On Windows, for instance, select the Performance tab. If one or more of the CPU Usage History is remaining at 100%, or the Physical Memory Usage History is remaining near 100%, the system has a bottleneck in the affected area.

Memory is usually a fairly easy and not terribly expensive upgrade, and if your system has less than 1 GB, you should almost certainly upgrade it. CPU is usually a more complex upgrade, and may require a motherboard replacement, at which point it may make more sense to consider a replacement system. Network speed is usually a function of what your ISP is providing you, though there can be local network issues that cause loss of information and slow down overall performance.

For GPU performance, take a look at the graphics card installed in your system, and compare it to the Second Life recommendations, which will generally be applicable to viewers for Opensim-based grids as well. If you upgrade your GPU, ensure that your power supply is adequately rated for the demands of your system. Typically the specifications for a graphics card will specify a minimum recommended power supply wattage.

Next week, I will wrap up this serious with a review in the form of a quick checklist of things you can do to reduce lag. Until then, happy avataring!

03 November 2009

lag hoodoo VIII: what would Henry do?

In this article, I'll look at a few odds and ends of lag reduction that that we haven't covered yet.

The advanced menu, activated with Control-Alt-D (it was originally called the Debug menu, hence the use of 'D'), gives us one or two possibilities to look at, depending on the particular viewer. First, there's an option under Advanced->Rendering called 'Run Multiple Threads'. If you have a multiple core CPU (quite likely if you've purchased you system in the last year or so), or multiple CPUs (less likely), selecting this can make a significant difference, at the potential cost of occasional crashes. If you have a single CPU, this will likely make no difference, and is best left off. If you're not sure what sort of CPU you have, try turning it on while watching the FPS in the Statistics Bar. If you see a significant improvement, then leave it on; if not, turn it back off.

Additionally, on the Snowglobe viewer and a few others that have borrowed its new texture pipeline, there will be a choice in the same menu for 'HTTP pipeline'. If it is there, turn it on. The difference it makes can range from very slight to huge, depending on several factors.

Disable voice from the 'Voice Chat' tab of the Preferences window if you never use voice, as that is an additional running process and a couple of libraries.

Aside from those, a few other things that can be done are general system maintenance issues. I won't go into great detail, as there are plenty of online resources. Defragment your hard drive if you're running Windows. Scan for viruses and spyware. Make sure you are not running services and other applications that you never or seldom use. Update the drivers for your graphics card, network, and motherboard.

Experiment with different viewers. There is no one viewer that is fastest on all systems in all situations, so find the one that works best for your. Some I have found to be generally faster are Emerald, Imprudence, and Cool. But sometimes, they're slower for some people. Also, some viewers have an optimised version available for newer CPUs. Unless your system is quite old, try that.

When in doubt, reboot. That's especially true with Windows, but also applies to Mac OS and Linux, if the system has been up for several days.

Remember, there is only so much you can do with software if your hardware is inherently limited; next week, we'll look at hardware, and then I intend to wrap up with checklist of sorts.

27 October 2009

lag hoodoo number seven: the server

Early on I mentioned server-side lag as a potential issue. This, as you may recall, is reported on both the Lag Meter and, in much greater detail, the Statistics Bar. The most interesting server numbers on the Statistics Bar as far as I'm concerned are Time Dilation and Sim FPS. Other potentially interesting ones are Agent Updates/Sec and Script Events.

Time Dilation is a measure of how well the region is keeping up. Typically, it should be at 0.99. If it starts to drop below 0.95, the region is lagging, and the lower it drops, the worse the lag. Likewise, Sim FPS is a measure of the fastest rate the sim is able to update the scene to viewers; as with FPS on viewers, if it drops below 15 FPS, you will notice jerkiness, even if your viewer FPS is faster.

So what causes server side lag? The simple answer is complexity: the more there is for the server to deal with, the slower it gets. This complexity can be caused by lots of prims, lots of textures, lots of scripts, or lots of avatars. Starting with the last one first, the server has to keep track of the number of avatars, and the relations between those avatars and everything else in the sim (for our purposes, consider a sim and a region to be the same thing). As the number of avatars in a sim increases, the number of relationships increases exponentially, as all the avatars' viewers have to be updated with information about each avatar. This is why twenty avatars in a sim can seem so much laggier than simply twice ten.

Lots of prims can cause lots of lags, all else being equal. This is true not only of the prims that are a part of the scene, but also the prims that are worn by avatars in the form of hair, shoes, and other attachments. Now the viewer can also be lagged by lots of prims, but the server performs some smarts so as not to send prims that cannot be seen, either because they are completely hidden, or because they are too far away. But the server still has to account for every one of those prims. Likewise, every textures on those prims have to be accounted for, and transferred.

Finally, scripts can cause lag. It's important to know that scripts are handled at a lower priority than the actual rendering of the scene. That means that, if the server is too busy accounting for everything else, it may handle scripts slowly, or not at all. If scripts are running, and there are a lot of them, or one or two that are very processing intensive, they can also add to server side lag.

So, what to do, what to do? Obviously, if you own or have permissions in the region, you can do more than if you are merely a visitor, by reducing both the number of prims and the number of textures. One clever approach is to combine a number of related textures into one, and then using offsets and scaling to use only pieces of that texture on different prims. Likewise, care in the use of scripts can make a big difference. Additionally, laying things out so that not all prims are visible from all locations, while not necessarily helping the server in terms of the number of prims to be managed, will reduce both network and viewer lag.

If you cannot control these aspects of the sim, there are still things you can do. Reducing the number of prims and textures on your avatar can make a difference. This does not mean you have to go naked in a crowded place, but it does mean that careful choice of what you're wearing can make a difference. Avatar Rendering Cost, ARC, is an interesting, though not entirely accurate, means of determining the load your avatar is contributing. This is found from the Advanced menu (activated with Control-Alt-D), as Advanced->Rendering->Info Displays->Avatar Rendering Cost. This will display a number, the ARC, over the head of all avatars in range. Generally, the lower the better, especially in a lag situation. However, notice that the ARC on other avatars, as you move away from them, will drop. This is because at a distance there is less to render on your viewer; but it is still having to be tracked by the sim. Experiment with different hair, or jewelry.

A naked avatar has an ARC of zero, but so does a fully dressed avatar, if she is only wearing appearance (non-prim) clothes and hair. It's the attachment of prims that drives ARC up, and, as we know, prims add complexity to the job the server has to do.

However, it is very important to remember, before you decide to become an ARC enforcers, yelling at others to reduce theirs, that ARC is often really a fairly minor issue compared to the physical presence of the avatar. So the main point in this is to mind your own avatar, and make sure you are not contributing more than necessary to the lag. Also, I recommend you not leave the ARC turned on, as it causes viewer lag for you.

Finally, be a good citizen and don't leave litter around. If you unbox something, don't leave the box lying around. If you pull something out from inventory, or create something for temporary use, remove it when finished.

19 October 2009

lag hoodoo, the sixth visitation

This week we'll talk about competition. The computer has finite resources, and no matter how well you've tuned your viewer, if something else is competing for those resources, it will have an impact.

The biggest potential competitors are other applications. Web browsers, graphics tools, even word processor and spreadsheets can have an impact. Big downloads or streaming media can impact the network performance significantly. If you're seeing a lot of lag, and have tried the things before, start closing applications. If you have lots of tabs open in a browser, close tabs, especially those for high-demand pages such as YouTube.

Vista's (and presumably Windows 7's) Aero interface can have a huge impact on graphic performance. MacOS's interface likewise can compete for graphics card resources. I've found with Vista that disabling the semi-transparent window frames makes a 5 to 10 FPS difference in my viewer performance. Menu-click (that's right click for you right-handers) on Computer to select properties, click 'Advanced system settings', click 'Custom', and then unselect the 'Enable desktopcomposition' box and press OK. Equivalent tuning in MacOS is likely to help.

One other tip is that reducing the area to render improves performance. In other words, if you reduce your viewer from full screen to a smaller window, FPS can increase significantly. This becomes a trade-off between performance and being able to actually see what you're doing sometimes, but is worth experimenting if you are still suffering from lag issues.

Next week, we'll discuss server-side lag, and what can be done about it.