MantisBT - opensim
View Issue Details
0007582opensim[REGION] OpenSim Corepublic2015-05-20 22:392015-05-21 22:28
nebadon 
nebadon 
normalminorhave not tried
closedfixed 
master (dev code) 
 
Grid (1 Region per Sim)
BulletSim
Mono / Linux64
4.0.1
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
http://opensimulator.org/mantis/file_download.php?file_id=4213&type=bug
png llCastRay_High_CPU1.png (70,870) 2015-05-20 22:50
http://opensimulator.org/mantis/file_download.php?file_id=4214&type=bug
png

png llCastRay_High_CPU2.png (1,082,802) 2015-05-20 22:58
http://opensimulator.org/mantis/file_download.php?file_id=4215&type=bug
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

Notes
(0028406)
nebadon   
2015-05-20 22:58   
http://nebadon2025.com/screenshots/llCastRay_High_CPU1.png [^]
http://nebadon2025.com/screenshots/llCastRay_High_CPU2.png [^]
(0028407)
nebadon   
2015-05-20 23:09   
I also tested the 2 new patches that have not been commited to master yet ie:

http://opensimulator.org/mantis/view.php?id=7568 [^]
and
http://opensimulator.org/mantis/view.php?id=7575 [^]

made no difference still seeing very high cpu at 700% and the raycast through torus and tube fail.
(0028416)
Magnuz   
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
from
    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.
(0028417)
nebadon   
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!