Texture Thrashing 2015-04

CmdrCupcake (Sovereign Engineer) has been looking at texture thrashing. He found what is eating texture memory and leads to textures cycling through rendering to full load sharp images then going blurry and apparently reloading and getting sharp again only to repeat.

House Triggering Texture Thrashing in some video cards.

House Triggering Texture Thrashing in some video cards.

While it was not immediately obvious the addition of CHUI and its addition of avatar icons to the chat discussions seems to be the trigger for the current texture thrashing. These images are loaded into the viewer as UI textures. There are a ton of these textures used for chat, group chat, and friends lists. These chat textures consume memory.

Since these are considered UI textures the viewer never releases the memory and marks them as No Delete. The viewer holds them in video memory forever, well, for the duration of the login secession.

CmdrCupcake, in testing, found this could burn up 1gb of video ram once a number of group chats were opened. The memory is only released when the viewer is closed.

Because of the viewers limit on video memory use the amount of video one actually has does little, if anything, to reduce the problem. Both 3rd party devs and the Lab have tried changing the video memory limit but that creates other problems and thus is not a workable solution.

Using compact chat does not reduce the video memory load. Even using hidden chat icons will consume memory. The viewer allocates space for the icons whether they are shown or not.

Large friends list can also cause the UI memory to be overloaded with memory allocated for the the icons. So, some people with large friends lists may see texture thrashing as soon as they log into SL and without opening any chat secessions. For others thrashing may not show up for some time, my case. As more chat groups are opened it is more likely thrashing will be triggered.

This is a simple explanation and incomplete. So, while this is the root of texture thrashing now, there are other ways to overload texture memory and initiate texture thrashing.

So, it would seem the only solution for a user work-around would be to reduce friends lists (not at all desirable) and keep group chats closed to avoid loading more icons as new people join chat. Also, not desirable. Restarting the viewer will reset the memory and probably reduce thrashing for a time.

Now that the problem is known, developers will be looking to build a solution. The solution is going to be in how these chat icons are handled memory-wise. Adding CHUI (Chat Hub User Interface) was no small change. So, it may be some time before we see a solution worked out… or not. It may be easy and quick. But, the changes apparently need to be inside some rather complex sections of code. I expect that to take some time, but maybe not. So, we’ll have to wait and see how it goes.

9 thoughts on “Texture Thrashing 2015-04

  1. This is probably a dazzling display of my ignorance, but as I recall icons are usually very small 64x64ish images. It seems unreasonable that you could fill video memory with them. What seems more likely is that the full size profile pic is stored and is scaled to an icon when needed. Seems simple, store the icon, not the profile pic.

    • Lots of things seem simple. It may be. But, we’ll see as Cinder and Cmdrcupcake figure it out.

    • This is exactly the problem, Shug. The avatar icons that are sized to be 64×64 actually full-sized textures (most often 1024×1024) that are scaled to fit. The high resolution textures get bound to video memory and then scaled down.

  2. Pingback: Second Life: Acerca del problema de recarga constante de las texturas | Avatares Argentinos

  3. Very interesting. I guess that would support my observation where while building in ‘do not disturb’ mode with no IM or group chats open there was no thrashing, then when placed and used by a lot of people with several group chats open things start to thrash. I’d love to test this out. I’m sure other factors like amount of region wide build textures effect it also, but any chance of reducing a factor would be appreciated.

  4. I have been experience massive texture thrashing every since Viewer 2, Viewer 1 always worked the best for me.

    Would be nice for a fix for the texture thrashing problem which everything I have read or tried doesn’t fix it.

    • Everyone I know of has been able to stop most of their texture thrashing. So, there is something unique to your computer or viewer that is causing the thrashing. It is a matter of finding the problem.

Leave a Reply to Shug Maitland Cancel reply

Your email address will not be published. Required fields are marked *