Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Recent Mono slowdown across the grid

Liam Tairov
Registered User
Join date: 20 Nov 2007
Posts: 58
02-04-2009 06:33
Hello

Today I posted this in the Technical Issues forum but have reposted it here with more detail as it affects scripters and anyone using Mono.

Does any one know why Mono is running much slower across the grid lately?
Or if this slowdown is likely to be permanent due to some new Mono features?
It seems constant at about 2.8 times slower than a few weeks ago. Unfortunately I don't know when the slowdown occured.

I produce a freebie lag tester that measures both script speed for Mono and LSL - the script is given below.

The LSL versions shows scripts running at full speeds in good sims but the Mono version shows 2.8 times slower. I have tested this in a dozen or so lightly loaded sims and full Islands but the slowdown is remakably constant at 2.8 to 2.9.

This Mono slowdown is really affecting us because we converted our chess and poker games from LSL to Mono and saw a very large increase in speed. So there must be many others in the same position as us.

Any thoughts would be really appreciated.

-------

The script is below - and just measures the number of computations over a given time. They were vey accurate for both Mono and LS until a short time ago. the LSL one is still accurate.

<?php

// This lag tester gives a rough measure of script speed
// and so gives an indication of how fast our chess computers
// will run in that location.
// for example
// speed 1 and the Blitz level should take 10 seconds or less
// speed 2 - and Blitz takes 20 seconds
// speed 30 - Blitz takes 300 seconds - so chess is unplayable

// This Lag Tester is free for any use:-
// you can modify, give away, sell, take the code whatever.

// Yes, the scripting is a mess, but it is FREE


//integer MAX_LOOP = 1695; // Gives 1 second in lag free sim LSL

integer MAX_LOOP = 99009; // Gives 1 second in lag free sim MONO

integer startTime;
integer endTime;
integer timeTaken;

Main()
{ float ftime;
float diff;

llOwnerSay("";);
llOwnerSay("Lag test starting....";);

ComputeLag(MAX_LOOP/5);
if (timeTaken<=1)
{ ComputeLag(MAX_LOOP*10);
ftime=timeTaken/10.0;
if (ftime<1.0) ftime=1.0;
llOwnerSay("Time = "+(string)ftime);
}
else
{ ComputeLag(MAX_LOOP/2);
ftime=timeTaken*2.0;
llOwnerSay("Sim Speed = "+(string)ftime);
}

diff=ftime-1.0;
if (ftime>1.0) llOwnerSay("Sim "+(string)diff+" times slower!";);
else llOwnerSay("Fast Sim";);

if (ftime<=1.2) llOwnerSay("Good";);
else if (ftime<=1.5) llOwnerSay("Okay";);
else if (ftime<2.0) llOwnerSay("Slow";);
else if (ftime<3.0) llOwnerSay("Very Slow";);
else llOwnerSay("Terrible";);

llOwnerSay("";);
}


ComputeLag(integer count)
{ integer n;
float num1;
float num2;
float num3;
float num4;


startTime=llGetUnixTime();

num1=3.142;
num2=9.189;

n=1;
do
{
num3=num1*num2;
num4=num3/num1;

n=n+1;
}
while(n<=count);

endTime=llGetUnixTime();
timeTaken=endTime-startTime;

}


default
{

touch_start(integer total_number)
{
Main();
}
}

?>
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
02-04-2009 12:38
http://jira.secondlife.com/browse/SVC-3679

LL fixed a memory issue, and since then some have reported here that list operation sare now much slower. Perhaps the speed reduction they see is an overall issue, or perhaps it's unrelated.

Check again in the new 1.25.5 server and see how it fares, they are supposed to be reverting part of that fix.
_____________________
Liam Tairov
Registered User
Join date: 20 Nov 2007
Posts: 58
02-04-2009 13:28
From: Darien Caldwell
http://jira.secondlife.com/browse/SVC-3679

LL fixed a memory issue, and since then some have reported here that list operation sare now much slower. Perhaps the speed reduction they see is an overall issue, or perhaps it's unrelated.

Check again in the new 1.25.5 server and see how it fares, they are supposed to be reverting part of that fix.


thank you Darien - i was totally unaware of this situation regarding the memory problems with Mono as mentioned in the JIRA.

At least now if some customers report crashes i have somewhere to start looking - thankfully no such reports so far even though memory in some scripts was tighter than i would normally like.

The main thing is the Lindens are aware of the problem and are working on it although it does sound a tough nut to crack.
Liam Tairov
Registered User
Join date: 20 Nov 2007
Posts: 58
02-04-2009 13:48
From: Darien Caldwell

Check again in the new 1.25.5 server and see how it fares, they are supposed to be reverting part of that fix.


Good news - I've just found a 1.25.5 server (1.25.5.109327) (Scratchy sim)and the speed is almost back to normal - only 20% slower - really great news.
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
02-04-2009 23:41
Well I am keeping my thumbs crossed on this one as the bug made most of my Products unusable (they are list centric to the extreme). I actually wasted 2 whole days trying to debug what was a working Release Candidate, trying to work out why it had slowed to a crawl, before I found out that LL had Borked it and not me.