On 21/03/11 03:52, Adam Farrugia wrote: > On 11/03/11 06:42, Adam Farrugia wrote: >> Hi All, >> >> Running the following: >> >> Ubuntu 10.10 Server >> mono 2.6.7 >> 16GB RAM >> 1 x Quad-core AMD CPU >> opensim 0.7.0.2 (Grid Mode) >> >> Found that XEngine causes mono spike CPU usage over 100% briefly when >> automatic script save is invoked. Actual spike value varies with sim load, >> but pattern is the same regardless of load. Parameter is "SaveInterval" in >> XEngine params in OpenSim.ini. Default interval is 120 seconds. Changed >> SaveInterval to other time values to test and sure enough, spike occurs at >> those intervals. >> Currently running 4 regions, Grid mode, all regions running numerous scripts. >> Has anyone seen this before? Searched pretty hard and seen plenty of issues >> with earlier versions of mono with high CPU usage and workarounds by >> tweaking MONO_THREADS_PER_CPU but nothing specifically relating to this. >> Not sure if it is a bug to be reported, or just a natural limit of XEngine >> when it auto-saves script states when there lots of scripts on a grid. >> >> Rgds, >> >> Adam Farrugia > > > Out of interest, how many scripts are we talking about here? Are they > complicated scripts with a lot of state? > > As far as I can see, script state saving is single threaded. > > Justin Clark-Casey (justincc) > http://justincc.org/blog > http://twitter.com/justincc > > > Hi Justin- sorry for the delay in reply. There is about 160-odd scripts per > region. Close to half of them are what I'd call somewhat complicated in terms > of use of state- those ones are particularly focused on transaction > processing, i.e., each region consists of shops (or stores) that provide > various goods and services and the system to support this is scripted into > objects, some of which avatars use to "produce" (from a defined set of > resources), price/re-price and sell products/services for their store as well > as buying products/services from other stores. Using "top" in Ubuntu, when > the XEngine automatic script save is invoked, the CPU% for mono briefly > spikes well over 100%, but overall CPU %idle is still quite high (roughly > 60-70%). It doesn't cause of itself the sim to crash- it was just something I > discovered when trying to work out why mono was causing CPU spikes at what > appeared to be regular intervals. So what you're implying is that it's state > complexity within sc > ripts rather than script count that may account for this?
Hi Adam. I'm afraid I don't know enough about the script engine right now to comment further - I was more interested in getting a sense of when this problem revealed itself. -- Justin Clark-Casey (justincc) http://justincc.org/blog http://twitter.com/justincc Oh, OK Justin. The initial symptom that kicked off the troubleshooting was that there seemed to be a strange mini-lag every now and then, after adding the scripted stores to the sim. It seems to be more pronounced under Ubuntu/Mono than Windows/.Net in terms of in-world performance (I'm running a copy of the same region on two different servers but on the same grid), but task manager in Windows shows similar CPU spikes. Thanks anyway for your attention. Cheers, Adam _______________________________________________ Opensim-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/opensim-users
