massive use of link_message
|
nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
|
09-01-2005 00:44
is there any problem when using several scripts with link_message? i have 1 object with 16 prims. each prim got 32 script. each script is listening for llMessageLinked on his prim, and for specific integer num. total 512 scripts waiting, in idle mode. no actovuty at all. no message is beeing sent. just for droping this object on a sim, the SIM FPS drops down about 40% (tested on several sims ex.: sandbox cordova from 2200 to 1200 SIM FPS)... active scripting count remains the same... how to reduce load?
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
09-01-2005 01:15
Group the scripts into one. Use "if" statements to seperate what to do when receiving a specific number.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
|
09-01-2005 03:52
thats exactly not the solution. i don't splited it into several scripts just to give me more work... i splited it to achieve my goal, each script will do 1 task then wait the delay for doing this task. per example: llEmail. u can only send 1 email each 10 seconds, this way i can handle 512 emails each 10 seconds. the architecture is working correctly for any delayed specific task, except when idle it takes 40% of SIM FPS. is there another way to lower the load?
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
09-01-2005 04:31
No 
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
|
09-01-2005 04:45
From: nonnux white thats exactly not the solution. i don't splited it into several scripts just to give me more work... i splited it to achieve my goal, each script will do 1 task then wait the delay for doing this task. per example: llEmail. u can only send 1 email each 10 seconds, this way i can handle 512 emails each 10 seconds. the architecture is working correctly for any delayed specific task, except when idle it takes 40% of SIM FPS. is there another way to lower the load? Link Messages have a delay of 0.1 seconds so thats a max of 100 emails per 10 seconds (email has a 20 second delay i think ). The question you should be asking is: Do you really need to send them that fast? What you could do is set up say 20 emailing scripts each filtering on an integer 0 - 19. and every time u send a link msg just add a count to your integer number. Then when it reaches 20 have it set to 0 and start over, that will let u send 1 email every second and it wont cut the FPS in half  .
|
a lost user
Join date: ?
Posts: ?
|
Bypassing Limits Leads to Problems
09-01-2005 09:05
From: nonnux white per example: llEmail. u can only send 1 email each 10 seconds, this way i can handle 512 emails each 10 seconds.
This is the 2nd or 3rd time in a week I've seen someone mention using multiple scripts to get around the llEmail delay. Perhaps you should ask yourself WHY you are defeating a mechanism that was put in there for a reason? Certainly you can, at the moment, have more than one script and execute llEmail more often than is desired. However, SHOULD you be doing it is another question. That question goes to the spirit/intent of the 10 second delay as opposed to the actual implementation.
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
09-01-2005 09:27
The 10 second delay was put there as an excercise for the scripters, by the Lindens, of course!
But 512 is definitely overkill. I would agree with using no more than 20 email scripts, and that only if you might actually have to use that many very often.
|
nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
|
09-01-2005 10:03
is not overkilling. lets say: no XML-RPC, no object-to-object direct comunication... how can u develop a server that acts worlwide, without using email? of course the script is not overloading, most of the time is idle. the problem is not when sending mail, since i placed inside a delay about 1 second for each email, the problem is this object takes too many ressources when idle. imagine a 512 scripts each one with a 12 email queue? isn't it good? the server can do the work slowly to avoid lag, but it need to store queues, and send instant emails, not waiting 10 seconds between each email when, per example, 10 clients at same time ask information to the server. the server while be used only for data storage.
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
09-01-2005 10:17
Francis Chung manages to do an autoupdate system for all of her items, and I seriously doubt that she has 512 email scripts in her servers. Same thing with Squagmire Stravinsky. I suggest contacting Squagmire and asking him.
Link messages sent while a script is sleeping are still queued, by the way.
|
nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
|
09-01-2005 10:23
i am just thinking an a new way to do it: only 1 prim needed: the prim rez an object, that will send the email, then dies. this way i can send as many as needed in a particular momment, and beeing idle will really beeing idle i hope to don't generate bigger delay then 10 seconds with this ideia  edited: i didn't get any limit on 1 single script receiving emails. i sent over 96 and stoped. checked using integer num_left on email.
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
09-01-2005 11:04
Hmm... that's a pretty good idea. Perhaps have a few rez scripts, and have some of the email prims already rezzed.
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
09-01-2005 11:06
Rezzing/derezzing is quite hard on server's performance, though...
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
09-01-2005 11:13
Yes, it is. I still believe that the 20 email scripts is the best idea.
|
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
|
09-01-2005 11:46
If you little scripts have anything in them that would make them "active", then the sim performance will be impacted just for having them rezed.
Check the sim active scripts count, rez your object, then check again. If it goes up by the number of scripts you have, then you need to re-examine the scripts to make sure they don't have llListens or llSetTimerEvents or anything else that would make each one "active".
But yeah, as said above, there is a max speed, so coding over that doesn't make much sense.
_____________________
~ Tiger Crossing ~ (Nonsanity)
|
nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
|
09-02-2005 04:27
well, first let me thx to all for all the help! i am not a pro lsl coder, but i don't think i am a noob. i started scripting with lsl allways thinking on performance. i removed this server from existence. in fact on the new grid it is affecting the performances for script use. so, i am rebuilding my server. i am testing a rezzing system to send emails, and it looks very fast, and also the impact on sim performance are very small. it rezzes 1 prim and use this prim to send the email. after email sent, the prim dies. (the prim is also temp_on_rez) there is some limitations on speed about many functions. like llSetText per example. i use SetText to show some information about the server working processes - to avoid the main script beeing sleeping when setting text, i have 4 internal script with linked_message setting the text... this is just an example on how i'm working to speed up the server handling for all requests. on all this tests, i found out that having a script waiting for linked message, is like having a script listening on a specific channel... it is a listenner, so it needs space to run. why am i having so much work? because there is no other solution for storing data across sims. i can't wait till summer 2xxx for XML-RPC, and object-to-object will be only on summer 3XXX (i heard one linden saying that maybe is not so many X's eheh) thx for help, i will post here more information about this data server system.
|