Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006080opensim[REGION] OpenSim Corepublic2012-07-07 15:092012-12-14 17:21
ReporterKayaker Magic 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformlinuxOSopenSUSE 11.4 (x86_64)OS Version11.4
Product Version 
Target VersionFixed in Version 
Summary0006080: Changing size on some prims lags the simulator big time
Description    Changing the size of some prims seems to use an excessive amount of the sims resources. Simple prims like cylinders or spheres don't show this effect, but sculpted prims and particularly a helix (rotated torus) will bring a sim to its knees if you change the size often.

    Curiously, if you change the prim to a set list of sizes, the first time through the loop the sim FPS will bog down, but the second and subsequent times through the list of sizes the sim FPS returns to normal. Even when the list of sizes is large, for example a loop that changes a helix from 0.5 to 10.0 meters in 0.1 meter steps. That's 100 different sizes, are they all being cached? To prevent this caching from masking the problem, I have added a random offset to the size in the following test program.

    One prim running this script will bring the FPS from 56 down to 20. Two objects running this script lowers the FPS from 56 to only 5. Change the prim to a sphere and dozens of copies of this script have no effect on sim FPS.

    I verified that this problem occurs in an osgrid sandbox with Open Simulator 0.7.4 dev 729D901. But I did most of my testing on a stand-alone simulator (Open Simulator 0.7.1.1 release) running on a server tower box with a quad-core CPU, 6GB memory, x86_64-suse-linux, and virtually nothing else running on the computer.
Steps To Reproduce    The following script can be placed in any prim, it converts the prim to a helix to demonstrate the problem sooner.

//demonstrate torus/helix bogging down a sim
float size=0.5; //starting size

default
{
    state_entry()
    {
        llSetPrimitiveParams( //change to a helix
            [PRIM_TYPE,PRIM_TYPE_TORUS,PRIM_HOLE_DEFAULT,<0,1,0>,95.0,<0,0,0>,<1,.38,0>,<0,0,0>,
            <0,1,0>,<0,0,0>,4.0,0.38,0.0]);
        llSetTimerEvent(0.5); //run as fast as you can
    }
    on_rez(integer param)
    {
            size=llFrand(1.0); //random size size on a rez
    }
    timer()
    {
        size += .1; //increase by 10cm
        if (size>20.0) size=llFrand(1.0); //start over if too big
        llSetScale(<size,size,size>); //change the size
    }
}
Additional InformationSome details from my 0.7.1.1 console:
Region (PlanetForge2) # show info
Version: OpenSim 0.7.1.1 Release (interface version 7)
Startup directory: /home/opensim/opensim-0.7.1.1-bin/bin
Console log level: ALL
Region (PlanetForge2) # show stats

ASSET STATISTICS
Asset cache contains 0 assets
Latest asset request time after cache miss: 0s
Blocked client requests for missing textures: 0
Asset service request failures: 0

CONNECTION STATISTICS
Abnormal client thread terminations: 0

INVENTORY STATISTICS
Initial inventory caching failures: 0

FRAME STATISTICS
Dilatn SimFPS PhyFPS AgntUp RootAg ChldAg Prims AtvPrm AtvScr ScrLPS
  0.17 5 4.1 0.0 1 0 57 0 7 103

PktsIn PktOut PendDl PendUl UnackB TotlFt NetFt PhysFt OthrFt AgntFt ImgsFt
    21 113 0 0 0 1007.7 0.0 1007.7 0.0 0.0 0.0

MEMORY STATISTICS
Allocated to OpenSim : 39 MB
TagsNo tags attached.
Git Revision or version numberplease tell me how to find my git version
Run ModeStandalone (1 Region)
Physics EngineODE
Script Engine
EnvironmentMono / Linux64
Mono Version2.8
ViewerImpudence
Attached Files

- Relationships

-  Notes
(0023251)
justincc (administrator)
2012-12-14 16:20

This is very probably an ODE issue. Not so say that there might not be bugs to fix there, but it's also worth trying this stuff with current Bullet to see if the problem exists there.
(0023253)
Kayaker Magic (reporter)
2012-12-14 17:21

Yes! I went to the bulletsim test sim on OSGrid and ran the script above. No effect on SIM performance! Then I went to a 0.7.5 DEV system with ODE and ran it again. The problem did happen there. I'm becoming a bulletsim fan!

- Issue History
Date Modified Username Field Change
2012-07-07 15:09 Kayaker Magic New Issue
2012-12-14 16:20 justincc Note Added: 0023251
2012-12-14 17:21 Kayaker Magic Note Added: 0023253


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker