Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Mono's memory space

Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
03-23-2008 16:17
I was just on the beta grid to test out mono. I had read conflicting things about memory allocation in mono. Some places say it will be allocated dynamically as needed, other say the usual 16K memory limit will remain.

Anyway, I compiled my script in a mono region with mono enabled and not. Without mono a key memory test showed 3401 bytes free, exactly the same as I get on the main grid. Compiling under mono, the same memory test reports 19,887!!!!! Clearly the 16K limit is not being imposed in this version.

So what have people heard. Will we have more memory to work with under mono?
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
03-23-2008 16:29
In the mono chat they said that memory limit is 64K and yes, the memory would be allocated dynamically.

https://wiki.secondlife.com/wiki/Mono
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
03-23-2008 18:54
in mono script memory is allowed to 64K as scripts get memory dynamicly unlike now every script gets 16K used or unused and there alot more smaller scripts out there and i think most memory heavy scripts need more memory in intervals when they`re active
_____________________
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-23-2008 19:41
which will translate to Mono scripts getting as much memory as they need up to a hard cap of 64k (which should be enough for anyone right bill?) the cap is what freemeory will repot on, even though the scripts will no long reserve all of the available free memory
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Anthony Hocken
Registered User
Join date: 16 Apr 2006
Posts: 121
03-24-2008 05:24
The 64k script limit is the thing I look forward to most with Mono. More than the speed bump and promise of proper language support further down the road. The headaches I've had in the past trying to optimize the crap out of code to squeeze into 16k and/or spread across multiple scripts! So this'll help reduce the number of scripts needed and therefore make it less laggy. But one of the other reasons I sometimes create extra scripts is for more timer events. Multiple timers per script (without resorting to trickery with a single timer) would go nicely with the 64k scripts.
_____________________
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
03-24-2008 07:38
So.. My old class 4 mainland home that's already overloaded with scripts is actually going to get _more_ sluggish with MONO as each script starts to use 4x as much memory as it used to?

Or will things that use the old VM still only eat 16k?
Sho Iuga
Registered User
Join date: 6 Jun 2007
Posts: 35
03-24-2008 08:09
From: Sindy Tsure
So.. My old class 4 mainland home that's already overloaded with scripts is actually going to get _more_ sluggish with MONO as each script starts to use 4x as much memory as it used to?

Or will things that use the old VM still only eat 16k?


Two comments:
- Memory usage is not the main cause of lag
- Mono uses memory dynamically, so a script, that t.ex. only sets the floating text of a prim wont use 16k as with the old system or the maximum of 64k, but rather the 0.5k it really needs. So I would expect overall memory usage to drop rather than rise.
Lee Ludd
Scripted doors & windows
Join date: 16 May 2005
Posts: 243
03-24-2008 11:45
I believe in Mono characters occupy 16 bits, where in LSL they occupy only 8. So a script with a lot of literal strings will need a lot more memory in Mono than in LSL.
Nyoko Salome
kittytailmeowmeow
Join date: 18 Jul 2005
Posts: 1,378
03-24-2008 12:11
mmmmmmmmmm 64k sounds soooooo yummy!! ;) (hehe remembering an old bit on mst3k when joel was quizzing the bots for tasty ramchips;)) can't wait!! :)
_____________________

Nyoko's Bodyoils @ Nyoko's Wears
http://slurl.com/secondlife/Centaur/126/251/734/
http://home.comcast.net/~nyoko.salome2/nyokosWears/index.html

"i don't spend nearly enough time on the holodeck. i should go there more often and relax." - deanna troi
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-24-2008 15:18
From: Sindy Tsure
So.. My old class 4 mainland home that's already overloaded with scripts is actually going to get _more_ sluggish with MONO as each script starts to use 4x as much memory as it used to?

Or will things that use the old VM still only eat 16k?

no as described by LL old scripts chew up 16k whether they need it or not, mono scripts will chew up what they need and no more than 64k.... overall it should reduce the amount of VM memory needed... at least in the short term untill people start using that larger limit.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
03-24-2008 16:50
From: Void Singer
no as described by LL old scripts chew up 16k whether they need it or not, mono scripts will chew up what they need and no more than 64k.... overall it should reduce the amount of VM memory needed... at least in the short term untill people start using that larger limit.


Plus the fact that MONO will process the data during each simulator slice much more efficiently and faster in the majority of cases.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
03-24-2008 22:48
From: Sho Iuga
So I would expect overall memory usage to drop rather than rise.
That is, if/when those tiny ultra-common scripts get re-compiled to mono, as I believe it's been stated that existing lsl scripts won't (or can't) be automatically upgraded to mono.
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
03-24-2008 23:02
Assuming people realize that they can have more little scripts in a sim, it's possible for a larger number of little scripts to cause more lag as the server has more to poll during each slice, even if it is a little faster than the current VM. Hopefully the balance is such that it's still the same, or faster.
_____________________
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
03-25-2008 00:36
If you bother yourself to log onto the beta grid and actually test your scripts on mono you will find that they do not only execut a 'little' faster but a whole f***ing LOT faster. That is, unless they use functions that cause the script to sleep for a certain time.

Either way anything involving maths is going to be FAST.
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
03-25-2008 00:59
I thought this tidbit was interesting:
From: Babbage
Mono also shares assemblies between scripts with the same asset id, so
in the case where you have 100s of identical scripted bullets being
fired out of a scripted gun, if the script is using little stack and
heap, the Mono version will use far less memory than the LSL version,
which will always use 16K per scripted bullet.
_____________________
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
03-25-2008 01:00
From: Squirrel Wood
If you bother yourself to log onto the beta grid and actually test your scripts on mono you will find that they do not only execut a 'little' faster but a whole f***ing LOT faster. That is, unless they use functions that cause the script to sleep for a certain time.

Either way anything involving maths is going to be FAST.

I already did my tests and made a good deal of explosions as well, that have been fixed since then. The speed gains were minor, although helpful, maybe 4 to 5 times faster at the most, for a decent basket of normal script operations that aren't pure math. So, yes, that's 'a little' faster.

The point I was trying to make is that having less memory usage per script will likely mean more scripts per sim, and thus possibly more time spent polling by the sim.
_____________________
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-26-2008 19:36
string and list handling is omproved too, but a few things like state changes seem to have actually slowed down... so definitely check your scripts, so you don't get any nasty surprises.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -