MantisBT - opensim
View Issue Details
0007582opensim[REGION] OpenSim Corepublic2015-05-20 22:392015-05-21 22:28
normalminorhave not tried
master (dev code) 
Grid (1 Region per Sim)
Mono / Linux64
0007582: llCastRay v3 very poor performance (High CPU)
I have just upgraded to master git and noticed that my testing area was using 7 full cores of my 8 core cpu ie 700% cpu after switching to v3 llCastRay. In addition to high cpu usage the RayCast no longer seems to be bale to penetrate a Torus or Tube hole, I am attaching my test rig to be used as a basis for comparison. You will see that it fails very bad with this rig, you can also click the blue boxes on the torus and tube, it should report it is hitting the back plate, but it does not, it worked fine when testing v2.
No tags attached.
related to 0007546closed nebadon llCastRay only partly implemented 
related to 0007568closed nebadon llCastRay V3 needs throttling 
? llCastRay_Test_Rig_v1.0.iar (164,556) 2015-05-20 22:39
png llCastRay_High_CPU1.png (70,870) 2015-05-20 22:50

png llCastRay_High_CPU2.png (1,082,802) 2015-05-20 22:58
Issue History
2015-05-20 22:39nebadonNew Issue
2015-05-20 22:39nebadonFile Added: llCastRay_Test_Rig_v1.0.iar
2015-05-20 22:50nebadonFile Added: llCastRay_High_CPU1.png
2015-05-20 22:51nebadonRelationship addedrelated to 0007546
2015-05-20 22:58nebadonFile Added: llCastRay_High_CPU2.png
2015-05-20 22:58nebadonNote Added: 0028406
2015-05-20 23:09nebadonNote Added: 0028407
2015-05-21 19:55MagnuzNote Added: 0028416
2015-05-21 20:21nebadonNote Added: 0028417
2015-05-21 20:21nebadonStatusnew => closed
2015-05-21 20:21nebadonAssigned To => nebadon
2015-05-21 20:21nebadonResolutionopen => fixed
2015-05-21 22:28MagnuzRelationship addedrelated to 0007568

2015-05-20 22:58 [^] [^]
2015-05-20 23:09   
I also tested the 2 new patches that have not been commited to master yet ie: [^]
and [^]

made no difference still seeing very high cpu at 700% and the raycast through torus and tube fail.
2015-05-21 19:55   
Thank you for help testing and the visually very impressive test rig. I set it up in my test region and ran it. Rays pass through torus and tube holes, and the CPU load stays at 17-19% on one core, which is as expected, since throttling for none-attachments and none-"vehicles" is set to 40 ms castray time per 200 ms cycle (40/200=0.2=20%) in settings default.

The manual blue boxes work as you described they should, except when llCastRay is out of time owing to throttling, since the script doesn't handle the resulting RCERR_CAST_TIME_EXCEEDED response then.

Did you check the setting in OpenSim.ini, which was changed to
    UseLlCastRayV3 = true
    UseLlCastRayV2 = true
when the code and name were updated to V3? If not, you're testing the old "Avination" version of llCastRay. Unfortunately I missed updating that in the original Mantis 7546 before it was closed, but added it in the Mantis 7568 with the throttling patch.
2015-05-21 20:21   
oh ok I did indeed miss that, that does seem to help, though CPU is still quite high at around 180% cpu now, its definitely better but still far from great, but at least the ray is now making it through the tube and torus, I will close this patch for now in hopes that things continue to improve thanks for the input and patches Magnuz!