No multithreading and performance decrease with new Tech Preview 3

Started by ZStar, April 29, 2008, 11:00:34 PM

Previous topic - Next topic

ZStar

Matt,

I am sorry to see you dragged into this problem and away from more productive efforts.  At the same time, I appreciate your direct interest.  Here are a couple of screen caps with notations that should satisfy your request.

For this test, I started TG, clicked the "OK" button on the intro screen and let it run.  My only other interaction was to click the exit button to terminate TG.

The higher than expected CPU usage always occurs during what I assume are TG idle times.  As you can see from the graph the instantaneous CPU usage bounces up and down but averages about 50% for both cores.  Both cores max out briefly during the preview rendering which I would expect.  I would see the same behavior under the previous, non-multi threaded, version of TG.

Is there some OS option that could make the two cores act as redundant backups for each other rather than operating independently?

Should this particular discussion be moved to the Support forum?  I don't want to interfere with others discussing the new version.

Thanks,

Dave

Matt

Thanks for the detailed report.

I don't know the cause yet, but I'd like you to try one more thing. Try disabling the automatic check for updates in Preferences and then restart Terragen to repeat the above test. The automatic update check runs in a separate thread, and it's possible that it might be stuck in a loop using CPU cycles while the rest of the program continues. I'll be pretty lucky if it turns out to be this, but it's an easy enough thing to test before investigating other possibilities.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

Quote from: ZStar on April 29, 2008, 11:00:34 PM
Is there some OS option that could make the two cores act as redundant backups for each other rather than operating independently?

Usually you shouldn't worry about how the OS divides the work among the processors/cores. Although it may look like a thread is being equally shared by multiple processors, the OS is actually switching between the processors/cores at very short intervals (a fraction of a second) using 100% of one processor/core during each time slice. The interval is long enough that there shouldn't be any significant overhead from this, but short enough that you can't see what's happening in the CPU usage reports. I'm talking about a single thread here. With multiple threads the same switching can happen but more of the cores will be used simultaneously.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

ZStar

No joy. 

The Automatic Update option was already cleared.  Just to be certain, I did cycle the option by checking it, restarting TG and unchecking it, and restarting TG again.  I saw no change in behavior due to the state of the Auto Update option.  I had the Task Manager Performance window open the whole time so I could monitor CPU usage.

I figured that an OS option for the CPUs was a long shot.  I am aware of the Affinity setting and used it with the previous version to render two cropped views in parallel in two separate instances of TG.  That worked as expected.  I even experimented with the Affinity setting for the new version with the min/max threads set to 1/1.  Task Manager showed TG running on only one core and the render time was the same as with no affinity setting and TG apparently running on both cores. 

- Dave

ZStar

Matt,

I don't know if this will help or not.  I found the Task Manager option to show kernel activity on the Performance graph.  The kernel sure looks active but it suddenly drops on the second core when a full render is started.  Are the preview and full renders handled by different code?

- Dave

ZStar

I have eliminated all non-essential processes that I could identify.  The problem persists.  Are there any more ideas?

Oshyan

Dave, can you email support AT planetside.co.uk with a request for further diagnoses? I think we'll want to work more closely with you at this point as we move toward the beta and we're nailing down CPU detection and utilization code right now, so it's very timely.

- Oshyan