Drop Menu Website Template
Image
image
image


Hello There, Guest! Register

Post Reply 
Catlag
05-10-2013, 10:24 AM
Post: #1
Catlag
Another thread discussed rubberbanding at one of the major KittyCatS market regions. Charm uses that region, and she's made some comments about it, as well.

Now, there are a number of possible causes for problems. But a major cause is the sheer number of scripts in the region. So I took a couple minutes to examine the script usage.

In boxes, I note there very few scripts. But in live cats, there are quite a few.

Scripts cause lag in several ways.

When the script is executing, it takes processing time.

If the script is not executing, but is "running", it's waiting for events. Cats seemingly sitting doing nothing are waiting for events such as timers and communications from scratching posts, HUDs, etc. The means, for each likely event which the script might be waiting for, the simulator must check that running script to see if it's interested in the event.

Cats are ALWAYS listening for communications from the HUDS. The means for EVERY script in EVERY cat, which is currently running, the simulator must check THAT script to see if a message (say, you saying "Hi, how's it going" to a friend in Local Chat) is one the script might be interested in.

So, even though the script is "running" but "idle, waiting for an event" it's still using processing time. That's tiny, per script, per cat, but it adds up in a hurry when you consider that an active simulator will be throwing hundreds and thousands of events per second.

A script which is NOT running, such as many of the scripts in a live cat, still causes lag. Why? Because, even though it's not running, it still consumes memory. Even though only 3 of the one or two dozen scripts in a live cat are generally running, the memory for ALL of those two dozen scripts must be allocated and reserved for each script.

This means, if there are a LOT of live cats, there's a HUGE amount of memory reserved for their non-running scripts.

Now, if there is enough actual memory, that's not a problem. But there may not be. In fact, there probably isn't. When there isn't enough memory, the operating system "swaps" some out to a file on disk. That takes time. And, if the memory is needed again, it must swap something else out to make room, and re-load the saved memory In the trade, when this occurs, we call it "thrashing" (think of trashing wheat and the mess it makes and you get the idea).

My theory is that one of the reasons some of the major KittyCatS market regions are seeing performance problems is that, with so many cats, meaning so many scripts (running or not), and coupled with the fact that several regions share the physical machine's memory, the memory is thrashing.

The question is: is there anything KittyCatS can do to help alleviate this issue?

The answer is: YES!

Many of those "not-running" scripts don't NEED to be there!

Consider: if a cat is in 2D mode, it can't move, it can't be posed, it won't talk, it can't be cuddled, etc. So ELIMINATE those scripts which can't possible be activated, based upon the cat's current mode.

Often, of course, we'll see full 3D cats. But they're posed for display and the owner does not want them DOING anything. Adding a special "marketing mode" (offering a selection of set poses) and rezzing a new Market-Mode cat would allow many of those unneeded scripts to be candidates for elimination.

For scripts which can't be eliminated, consolidating several features into a single script, especially is those features are generally running or not-running at the same time, can reduce scripts, as well and should be considered.
Visit this user's website Find all posts by this user
Quote this message in a reply
 Thanks given by: dakillakm Resident , LadyBrighid Resident , Ryanna Enfield
05-10-2013, 12:38 PM
Post: #2
RE: Catlag
Very interesting and definitely an issue that would be great to have a fix for. The lag at markets definitely has an effect on the secondary market as a whole, imho. I know I rarely just wander around markets because of the lag present. If your suggestions for having "marketing mode" or less scripts in low prim mode were implemented easily enough I think it would be a great help!!

[Image: 7884046580_9ba4a7cbb5_n.jpg]

Marketplace Store

United Catteries Store
Find all posts by this user
Quote this message in a reply
 Thanks given by: Ryanna Enfield
05-10-2013, 12:49 PM
Post: #3
RE: Catlag
i totally agree and thank you for taking the time to examine and explain the issue in an easy to understand way. I hope KC is able to come up with something to make browsing through the sims a little easier.

Big Grin Kitty Cats Are Like Potato Chips, You Can Never Have Just One Big Grin
Find all posts by this user
Quote this message in a reply
 Thanks given by: Ryanna Enfield
05-10-2013, 01:01 PM (This post was last modified: 05-10-2013 01:03 PM by Ethereal Hurricane.)
Post: #4
RE: Catlag
Players can upgrade their computers to help some of the problems. Seemingly a decent amount of people I've conversed with, have sub-par computers that I personally wouldn't even do word processing on. But that is just me Tongue I want my computer to respond instantly, not issue a command, and go get something to eat while I wait.

[Image: heart.gif]
Visit this user's website Find all posts by this user
Quote this message in a reply
05-10-2013, 03:00 PM
Post: #5
RE: Catlag
(05-10-2013 01:01 PM)Ethereal Hurricane Wrote:  Players can upgrade their computers to help some of the problems. Seemingly a decent amount of people I've conversed with, have sub-par computers that I personally wouldn't even do word processing on. But that is just me Tongue I want my computer to respond instantly, not issue a command, and go get something to eat while I wait.

I'm so glad I do have an upgraded computer so it can handle it. I DJ as well so I needed a faster computer anyway. I don't have an issue with lagging on certain sims when it comes to walking around but I have noticed at times, getting the bid boards to show up on one sim can take a while. It usually only happens once or twice a week and not on any given day/time either. Not everyone can upgrade so they are stuck. They aren't cheap! I'm not going to say doing a system clean or reformatting will solve the issue because before I upgraded my other comp was a POS and neither one of those methods did jack.

[Image: Untitled-3_zpse0d66f02.png]
Find all posts by this user
Quote this message in a reply
05-10-2013, 04:49 PM
Post: #6
RE: Catlag
A faster computer helps, yes, if the problem is the amount of work your viewer has to do. It's not just the computer, itself. My computer is way fast. When I got it, I needed a lot of computing power and no graphics whatsoever. Upgrading to a high-end graphics card helped immensely with Second Life. (I run around with every feature enabled, all options to the max, and it's quite fast). Charm's laptop is every bit as fast but, since she can't upgrade the graphics hardware, she can't enable all the features I do. So, I see advanced lighting, shadows and ambient occlusion, while she's limited to the shaders and local lights. Except for the differences, we don't see much difference in performance on out computers from one region to another.

A faster Internet connection also helps. If you're on DSL, you have no idea how much better it will be if you switch to a high-speed cable service. I monitor our connection and, if it's under-performing, I fix it or beat up one our cable Internet provider until they get it fixed. So, rubberbanding is rarely an issue for us.

I've been watching the performance on some of her shops. What I'm seeing is a lot of time on the simulator going to script processing.

My theory is a lot of that time is wasted swapping memory in and out.

Consider, the typical live cat has a couple dozen scripts, consuming about 1.1M (million) bytes of memory, in total. But only THREE of those scripts are actually running! At a rough guess, I'd suggest memory usage could be reduced by 85% to 90% is just the running scripts appeared in the cat. For a region with 500 live cats, that's a saving of about 600M (million) bytes. I've not asked the Lindens how much memory is actually available but I'd be willing to bet that 600M is somewhere near half of it. Freeing up that much memory is gonna have an effect!
Visit this user's website Find all posts by this user
Quote this message in a reply
 Thanks given by: Ryanna Enfield
05-11-2013, 10:19 AM
Post: #7
RE: Catlag
Easy answer, "Blah Blah Blah, Lag is in SL!"......... Have Fun! Tongue

? Amore

Heart Amore KittyCats Heart
Check out all 5 Locations! Lm's in my Profile!
Main Store
Visit this user's website Find all posts by this user
Quote this message in a reply
05-11-2013, 03:00 PM
Post: #8
RE: Catlag
(05-11-2013 10:19 AM)AmoreJade Cyberstar Wrote:  
Easy answer, "Blah Blah Blah, Lag is in SL!"......... Have Fun! Tongue

Problem is, all the blah blah blah leads to NO FUN!

I run a gaming laptop, so I process the goods as fast as anybody,
so I can rez as quick as SL can dish it out.

But I have no control over how fast SL processes the goods.

A room full of running kitteh will bog me down.

I like the concept of a 'shelf' mode.

An on/off switch so to speak.

I really really like the concept of smart coding.

Listen to Tad, he's not making this stuff up.


[Image: DERKITTEHMILLlogosmallest.jpg]

http://maps.secondlife.com/secondlife/Nykus/54/231/24/

Soylent Green is KitteH!
Visit this user's website Find all posts by this user
Quote this message in a reply
05-11-2013, 05:36 PM
Post: #9
RE: Catlag
Does Linden Labs have problems which degrade the game? Yes. Do they sometimes push out software upgrades which were ill-conceived and/or poorly tested? Of course.

But is the bulk of the "lag" actually part of Second Life? Can Linden Labs do anything about it? No!

If we ignore under-powered users, and network issues, we're still left with "lag" problems. And the blame for those lies squarely upon that segment of the users which "builds".

The simulator operates in three phases, processing each, about 20 times per second. Simulator lag results when one of those phases can't complete its work in the allotted time.

Builders DO cause texture lag by using 1024x1024 textures when smaller, often much smaller, textures would produce the same visual results. Linden Labs has done what they can to correct this by moving textures to HTTP.

Builders CAN cause physics lag by moving physical objects. (In my experience, the physics phase is rarely the lagging part of the simulator.) Linden Labs has done what they can to aid with this by adding Pathfinding and adding the Prim Physics option (which allows builders to eliminate prims from the physics simulation entirely).

Builders DO cause script processing lag by poorly written scripts and by throwing in scripts willy-nilly where fewer scripts, well designed, would do the job. Linden Labs does what they can to speed script processing. But they know this is a huge issue and have been looking at ways they can make it better such as limiting the number of scripts an Avatar may "wear" and limiting the number of scripts allowed on a region.

Unfortunately, when it comes to actually addressing the root causes of script lag, Linden Labs can't do much more than reactive "patches" such as script limits. To fix script-caused lag, the builders will need to get involved. They'll need to learn good design practices, and pay more attention to resource use.

Will this ever happen? In general: no.

But there are times, such as with KittyCatS where ONE script author (or one small team) can make some changes which will have far-reaching effect.
Visit this user's website Find all posts by this user
Quote this message in a reply
 Thanks given by: Ryanna Enfield
Post Reply 




User(s) browsing this thread: 1 Guest(s)