Scripts: Difference between revisions
m (→Script Memory) |
|||
(13 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
This means that we would run out of memory after 3971 vendors were rezzed, so that is our actual limit. | This means that we would run out of memory after 3971 vendors were rezzed, so that is our actual limit. | ||
== '''<span style="color:#00528c"> | == '''<span style="color:#00528c">Sim/Region Scripts </span>''' == | ||
Of course, these numbers assume you have *no other scripts* rezzed on sim, but this is never the case. | Of course, these numbers assume you have *no other scripts* rezzed on sim, but this is never the case. | ||
Line 22: | Line 22: | ||
Provided you have Estate Manager access to the menus, in order to properly calculate how many CasperVend vendors you can rez before you see any lag, go to: | Provided you have Estate Manager access to the menus, in order to properly calculate how many CasperVend vendors you can rez before you see any lag, go to: | ||
''World -> Region/Estate -> Debug -> Get Top Scripts'' | '''World -> Region/Estate -> Debug -> Get Top Scripts''' | ||
Refresh this a few times, and note the *maximum* number at the top, for example: | Refresh this a few times, and note the *maximum* number at the top, for example: | ||
Line 28: | Line 28: | ||
'''"539 scripts taking a total of 1.685ms."''' | '''"539 scripts taking a total of 1.685ms."''' | ||
Mutiply the | Mutiply the number of scripts by 66kb and you have the approximate memory usage - in this example, '''(539 scripts) x (66kb) = 35,574kb''' (or approximately 36mb), so there are 223mb available to use - enough for around 3,500 CasperVend vendors. | ||
Subtract the script time from 22 - in this example, '''(22ms) - (1.685ms) = 20.315ms''' - and you have the amount of script time you have available to play with. In this case the leftover script time is easily more than enough to handle 3,500 additional vendors on the sim/region. | |||
=== Scripts Run % / Script Events === | |||
---- | |||
The percentage of scripts that are run (script events) should be as close to 100% as possible on a healthy sim. Any less than 100% and you're running slow. On a homestead, because so many inworld regions are jammed on a server cpu, it's '''very''' easy to fall below 100%. | |||
The more scripts that are on the sim, the more script events are trying to be run within the timeframe measured in sim statistics. If you are having issues with vendors or rental units "dropping" transactions, or not responding at all, and your "scripts run" % is more like 10% '''or less''' (which has been seen on some breedable-related rental sims....) then the sim is effectively '''broken.''' | |||
This is '''NOT''' a matter of "heavy duty users", and a new version of the script '''cannot''' be made for this situation because the the region just isn't able to fire off any script events in the first place. Scripts cannot work if they cannot run. | |||
=== Vendor Limits Within Sim/Region === | |||
---- | |||
Normal panel vendors from these companies were rezzed and left to sit for 30 minutes for the scripts to settle into their "idling" or "sleeping" period. This table shows the results of this test: | Normal panel vendors from these companies were rezzed and left to sit for 30 minutes for the scripts to settle into their "idling" or "sleeping" period. This table shows the results of this test: | ||
Line 55: | Line 65: | ||
== '''<span style="color:#00528c"> CasperVend Script Times </span>''' == | == '''<span style="color:#00528c"> CasperVend Script Times </span>''' == | ||
The table below lists script times for the various vending objects | The table below lists script times for the various vending objects for CasperVend itself. (Gift cards are not included in this chart because they are not supposed to be left rezzed out.) | ||
The '''"Active/Waiting"''' column simply means that the customer has interacted with the vendor (clicking for a menu, clicking a panel on a multi vendor, etc.) and the vendor is in the waiting period (rather than gone to sleep), waiting for what the customer may do next. | The '''"Active/Waiting"''' column simply means that the customer has interacted with the vendor (clicking for a menu, clicking a panel on a multi vendor, etc.) and the vendor is in the waiting period (rather than gone to sleep), waiting for what the customer may do next. | ||
Line 83: | Line 93: | ||
|} | |} | ||
== | === Holovendors & Rezzing === | ||
---- | |||
Certain types of operation are very taxing on sim resources. The two laggiest operations are teleporting in/out of a region, and rezzing objects. | Certain types of operation are very taxing on sim resources. The two laggiest operations are teleporting in/out of a region, and rezzing objects. | ||
Because of that, and despite their efficient design, CasperVend HoloVend vendors cause significantly more lag than other CasperVend vendors, '''while they are rezzing products'''. When idle, or even in "active/waiting" mode, they don't cause much lag at all. | Because of that, and despite their efficient design, CasperVend HoloVend vendors cause significantly more lag than other CasperVend vendors, '''while they are rezzing products'''. When idle, or even in "active/waiting" mode, they don't cause much lag at all. | ||
As a result of the lag that rezzing puts on a sim/region (it is one of the laggiest things you can do besides teleport), we don't recommend "temp rezzing" (zero-prim type rezzing) under '''ANY''' circumstances - zero-prim rezzer gadgets continually re-rez an object, thus putting that rezzing strain on the sim/region 24/7. | As a result of the lag that rezzing puts on a sim/region (it is one of the laggiest things you can do besides teleport), we don't recommend "temp rezzing" (zero-prim type rezzing) under '''ANY''' circumstances - zero-prim rezzer gadgets continually re-rez an object, thus putting that rezzing strain on the sim/region 24/7. Why? Because the "re-draw" (re-rezzing) of the item has to be sent to every avatar in viewing range, '''and''' every script in the item has to be reloaded on each rez - about once every minute. | ||
That continual re-rezzing of objects '''IS''' the reason many, many landlords will ban the use of temporary/zero-prim rezzers! | That continual re-rezzing of objects '''IS''' the reason many, many landlords will ban the use of temporary/zero-prim rezzers! | ||
CasperVend HoloVend has a configurable time limit you can set before things will derez - if you don't want an item to stay rezzed all the time, simply set a time limit greater than "0" on the Holovendor configuration page. | CasperVend HoloVend has a configurable time limit you can set before things will derez - if you don't want an item to stay rezzed all the time, simply set a time limit greater than "0" on the Holovendor configuration page. |
Latest revision as of 20:53, 4 August 2018
Script Time
Most people know that CasperVend uses only one script in all its vendor units and dropboxes. But how important is this, really? Let us look at the actual script time being used, and relative efficiencies.
A sim/region runs at approximately 45 frames per second when it's not lagged. This allows roughly 22ms *total* script time per region.
CasperVend vendors run at roughly 0.001 - 0.002ms of script time per frame. This means you could theoretically have 11,000 of our vendors rezzed before experiencing lag (assuming there were NO other scripts on the sim/region).
Script Memory
Another factor is script memory. A simulator has 256mb of script memory, and each of our vendors uses 66kb. This means that we would run out of memory after 3971 vendors were rezzed, so that is our actual limit.
Sim/Region Scripts
Of course, these numbers assume you have *no other scripts* rezzed on sim, but this is never the case.
Provided you have Estate Manager access to the menus, in order to properly calculate how many CasperVend vendors you can rez before you see any lag, go to:
World -> Region/Estate -> Debug -> Get Top Scripts
Refresh this a few times, and note the *maximum* number at the top, for example:
"539 scripts taking a total of 1.685ms."
Mutiply the number of scripts by 66kb and you have the approximate memory usage - in this example, (539 scripts) x (66kb) = 35,574kb (or approximately 36mb), so there are 223mb available to use - enough for around 3,500 CasperVend vendors.
Subtract the script time from 22 - in this example, (22ms) - (1.685ms) = 20.315ms - and you have the amount of script time you have available to play with. In this case the leftover script time is easily more than enough to handle 3,500 additional vendors on the sim/region.
Scripts Run % / Script Events
The percentage of scripts that are run (script events) should be as close to 100% as possible on a healthy sim. Any less than 100% and you're running slow. On a homestead, because so many inworld regions are jammed on a server cpu, it's very easy to fall below 100%.
The more scripts that are on the sim, the more script events are trying to be run within the timeframe measured in sim statistics. If you are having issues with vendors or rental units "dropping" transactions, or not responding at all, and your "scripts run" % is more like 10% or less (which has been seen on some breedable-related rental sims....) then the sim is effectively broken.
This is NOT a matter of "heavy duty users", and a new version of the script cannot be made for this situation because the the region just isn't able to fire off any script events in the first place. Scripts cannot work if they cannot run.
Vendor Limits Within Sim/Region
Normal panel vendors from these companies were rezzed and left to sit for 30 minutes for the scripts to settle into their "idling" or "sleeping" period. This table shows the results of this test:
Vending System | Script count (multivendors) | Script time | Script mem | Max # of vendors |
---|---|---|---|---|
Alika | 3 | 0.002 | 197kb | 1330 |
BSM | 2 | 0.003 | 131kb | 2001 |
CasperVend | 1 | 0.001 | 66kb | 3971 |
HippoVend | 10 | 0.016 | 655kb | 400 |
HippoVend "Elite" | 1 | 0.002 | 66kb | 3971 |
CasperVend Script Times
The table below lists script times for the various vending objects for CasperVend itself. (Gift cards are not included in this chart because they are not supposed to be left rezzed out.)
The "Active/Waiting" column simply means that the customer has interacted with the vendor (clicking for a menu, clicking a panel on a multi vendor, etc.) and the vendor is in the waiting period (rather than gone to sleep), waiting for what the customer may do next.
Vendor and expansion objects were rezzed and left to sit for 30 minutes for the scripts to settle into their "idling" period. For the "Active" column, objects were clicked to get a popup menu, followed by an immediate check of the script time once the popup menu was generated.
CasperVend Vendor Type | Script time (Idling/Sleeping) | Script time (Active/Waiting) |
---|---|---|
CasperVend² Free/Premium Panel Vendors | 0.001 | 0.002 |
CasperVend² Gatcha | 0.002 | 0.003 |
CasperVend² HoloVend | 0.001 | 0.007 |
CasperVend² Lucky Chair | 0.002 | 0.002 |
CasperVend² Midnight Madness | 0.001 | 0.002 |
CasperVend² QuantityVend | 0.001 | 0.002 |
CasperVend² TextureVend | 0.001 | 0.002 |
Holovendors & Rezzing
Certain types of operation are very taxing on sim resources. The two laggiest operations are teleporting in/out of a region, and rezzing objects.
Because of that, and despite their efficient design, CasperVend HoloVend vendors cause significantly more lag than other CasperVend vendors, while they are rezzing products. When idle, or even in "active/waiting" mode, they don't cause much lag at all.
As a result of the lag that rezzing puts on a sim/region (it is one of the laggiest things you can do besides teleport), we don't recommend "temp rezzing" (zero-prim type rezzing) under ANY circumstances - zero-prim rezzer gadgets continually re-rez an object, thus putting that rezzing strain on the sim/region 24/7. Why? Because the "re-draw" (re-rezzing) of the item has to be sent to every avatar in viewing range, and every script in the item has to be reloaded on each rez - about once every minute.
That continual re-rezzing of objects IS the reason many, many landlords will ban the use of temporary/zero-prim rezzers!
CasperVend HoloVend has a configurable time limit you can set before things will derez - if you don't want an item to stay rezzed all the time, simply set a time limit greater than "0" on the Holovendor configuration page.