WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 06-27-2008, 08:14 AM
Mike Konstant Mike Konstant is offline
Member
 
Join Date: Jun 2008
Posts: 5
Question fps performance caused by garbage collection?

Dear Vizard Users,

I am a new user to this group so appoligize in advance if I break protocol.

I am running a virtual reality simulation under Vizard Development Edition 101-89172709 Version 3.00.2701. The simulation works fine most of the time however once and a while the frame rate drops from 60fps down to 20-30ftps with no direct association with the users actions. Has anyone experience such intermittent performance? Can anyone suggest what approach should be taken to trackdown such a problem? More details of what I am facing is given below, for anyone interested;

The computer system is a NVIDIA NFORCE 680i LT SLI Intel Pentium III (2GB RAM) motherboard with a GeForce 8800 GTX card.

The python program running the simulation is multi-threaded. The simulation has static and dynamic objects in the environment. Below is a description of some testing I performed.
Test 1.
Ran simulator from IDE without the dynamic objects; no fps problem
Ran simulator from IDE with the dynamic objects; fps problem after 5 min
Test 2.
Repeated Test 1. Same results
Test 3.
Reset computer
Repeated Test 1. Same results.
Test 4.
Repeated Test 1, but also
Ran simulator from IDE again with the dynamic objects; no fps problem
Test 5.
Ran simulator from ouside IDE without dynamic objects; no fps problem
Ran simulator from ouside IDE with dynamic objects; no fps problem

As illustrated above, replicating this problem is a challenge and I can only guess that it may be cause by memory problems and perhaps related to garbage collection? Could this be a hardware issue? Any insight related to such symptoms would be greatly appreciated.

My current course of action is to eliminate portions of the simulator code until I get a configuration where the fps never drop. I hope I'm lucky and isolate the rogue code responsible for consuming the CPU time and causing the frame rate to underperform. (By the way, I have tried changing the vizard.exe priority to real-time, that just crashes the simiulator)

Mike
Reply With Quote
  #2  
Old 06-27-2008, 02:46 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
What do you mean by 'dynamic' objects? Are you creating objects at runtime? Are you sure the slowdown is caused by the CPU? When the frame rate drops does the update time increase? Also, have you tried disabling the other threads to see if they are causing the slowdown?
Reply With Quote
  #3  
Old 07-04-2008, 09:14 AM
Mike Konstant Mike Konstant is offline
Member
 
Join Date: Jun 2008
Posts: 5
Dynamic, update, threading?

The environment that is being simulated has dynamic vehicles moving on a road. The slowdown is caused by lack of CPU time, most likely due to our custom code in the simulator.
Regarding the update time, it is usually 5-6 and jumps up when the frame rate drops.
Further testing that I have done shows that by excluding the moving objects in the simiulation and removing file saving via a thread the problem seems to go away. My question now is what is the most effecient way to save data while a user is exploring in the enviromnent. Currently a Python thread saves the data, is there a method to do background processing withing the API that keeps the fps as high as possible?

Mike
Reply With Quote
  #4  
Old 07-07-2008, 11:44 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Is your thread looping as fast as possible and writing data? If the thread is not a high priority then try inserting some time.sleep() statements to give other threads a chance to run.
Reply With Quote
  #5  
Old 07-11-2008, 11:02 AM
Mike Konstant Mike Konstant is offline
Member
 
Join Date: Jun 2008
Posts: 5
I have recently dropped the thread in place of a Director() call that save the data to a file. This improves the performance slightly, however I still notice a drop of performance from 60fps to 53fps. Is there a way to set the priority of the Director() call, to a low priority so the thread takes it time to save the file (save the file over a couple seconds as opposed to < 1 second). Adding numerious time.sleeps() does not seem to be a clean way to reduce the priority.
Reply With Quote
  #6  
Old 07-14-2008, 11:37 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Due to the nature of threading in Python it is not possible to set the priority of a thread. At this point adding sleep statements is probably the easiest solution. Is your file saving thread performing a lot of calculation or is it mostly writing to file? Are you writing data in small or large chunks?
Reply With Quote
  #7  
Old 09-08-2008, 12:29 PM
Mike Konstant Mike Konstant is offline
Member
 
Join Date: Jun 2008
Posts: 5
Just for some closure, I have avoided using a thread to save data to the file system and used the director function to handle saving. This improves performance slightly. The problem originates from somewhere else. Someone else might be posting to "Vizard 3.0 Software" regarding this issue.

Thanks for the assistance.
Reply With Quote
  #8  
Old 09-03-2012, 12:44 PM
billjarrold billjarrold is offline
Member
 
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 39
We have been experiencing a similar intmittent slowdown problem.

We have been been privately corresponding with worldviz about the issue.

There is a profiling module that may help identify sources of computational load.

If there is a garbage collection problem maybe an idea is to reduce e amount of virtual memory available. Does anyone know how to do this? One idea is to start up a bunch of extraneous non-vizard resource hogging processes and see if that makes the intermittent slowness problem worse. Is there a better way to reduce the amount if memory available? Is this garbage collection etiology a valid approach/hypothesis?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Improve performance with large number of onthefly objects? Fox5 Vizard 7 04-28-2008 05:19 PM
massive performance hit for stereo mode Matt Vizard 3 03-30-2004 07:32 PM
Improving Performance lucalatini Vizard 1 02-10-2004 11:31 AM


All times are GMT -7. The time now is 05:41 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC