Strange behavior since 2.2 update: too many cores??

Started by dduane, December 28, 2010, 08:30:41 AM

Previous topic - Next topic

dduane

So here's a weird one, friends. Has anyone else seen anything like this?

Since installing build 2.2.22.1, when the initial Terragen 2 herald screen comes up, it routinely reports twice as many cores as I actually have. On the big 2-core 64-bit machine (running Windows 7 Premium) it says "Found 4 processor cores" (if only!). On the little Samsung netbook, which has just one core to its name, it reports two.

I believe I installed over the top of my first version of T2 in both cases. (It would have been version 2.1.18.1.) Should I perhaps have uninstalled first and then installed clean? Or is this due to some other problem entirely?

...I should mention that this version of T2 also seems to push my big machine a lot harder in the processing department., which surprises me. Quite lightweight renders seem to be pushing CPU usage up to 100%, whereas with 2.1 it rarely went over 40% or so. Have I possibly missed a core setting in the update or something?

Any suggestions as to how to investigate this would be much appreciated.  :)

Best -- Diane
Diane Duane | The Owl Springs Partnership | Co. Wicklow, Ireland
SF and fantasy fiction from the author via Amazon or https://ebooks.direct

neuspadrin

Can you provide some details about what processors you have?

Also it sounds like terragen is now properly detecting cores, not leaving them out.

Basically you have 1 and 2 cores, but they both have what is called "hyperthreading".  I'm assuming the netbook is an atom processor, which has hyperthreading.  The only dual cores I know that have hyperthreading are i7's.  Most likely Terragen 2 wasn't properly detecting these versions of hyperthreading perhaps, and in the update added them.

Hyperthreading is process where it uses one core, but can be detected as 2 cores and run twice as many processes.  The technicals behind this involve how a computer processes material, it often is stuck waiting on something from the harddrive or ram, in which hyperthreading allows for the core to be used while waiting.

Terragen is by default supposed to try to eat up 100% cpu during render to increase speeds.

If you do not want terragen to use the extra cores, in terragen go to Edit->Preferences, check the "override automatic number of cores detection" and set it to what you want.

You can also change the setting on a per render basis, by going to the render tab, then going to the advanced on the render you will be using, and making max cores the number you want instead of 16 (the default).


dduane

Quote from: neuspadrin on December 28, 2010, 09:35:04 AM
Can you provide some details about what processors you have?</quote]

No probs. The big machine is a custom build from Scan.co.uk with a Gigabyte board, 4 GB of RAM, 64-bit; it has an Intel Core i3 processor running at 2.93 GHz but overclocked to (IIRC) 8.  The graphics board's a Radeon HD 5800 with 1024 MB of onboard graphics memory, if that's germane.

QuoteAlso it sounds like terragen is now properly detecting cores, not leaving them out.

Oh good. I thought maybe I'd broken something. :)  Thanks for the explanation about hyperthreading: I hadn't known about how it would affect T2's core count. And yes, the Samsung has an Atom processor. So all is well.

QuoteTerragen is by default supposed to try to eat up 100% cpu during render to increase speeds.

Relieved again.  My machine has been having some Win7-related internal problems and I'd been concerned that  the CPU issue was associated somehow.

QuoteIf you do not want terragen to use the extra cores, in terragen go to Edit->Preferences, check the "override automatic number of cores detection" and set it to what you want.

Super -- will do.  (Not that this is an issue most of the time. T2's welcome to use the CPU most of the time.)

Thanks again!

Best -- Diane
Diane Duane | The Owl Springs Partnership | Co. Wicklow, Ireland
SF and fantasy fiction from the author via Amazon or https://ebooks.direct

Oshyan

neuspadrin is correct, we have adjusted the detection of CPU cores to account for the improvements in hyperthreading in newer processors like Intel's i-series. In this case your CPU is probably the i3-530 which does feature hyperthreading, so it can run twice the number of *threads* as it has physical cores. It does not run twice as fast as a result, but there is a performance boost, and it's best to leave it set to take advantage of the additional threads for maximum performance.

http://www.newegg.com/Product/Product.aspx?Item=N82E16819115222

- Oshyan

PabloMack

#4
Quote from: neuspadrin on December 28, 2010, 09:35:04 AM
If you do not want terragen to use the extra cores, in terragen go to Edit->Preferences, check the "override automatic number of cores detection" and set it to what you want.

In Windows XP/Vista/7 you can also use Task Manager to Set Affinity for specific cores to specific processes. To do this, right-click task bar and select "Start Task Manager".
Go to Applications Tab. Right click Terragen 2 and select "Go To Process". Next right click the selected process and select "Set Affinity...". You can then check and
uncheck specific cores that are eligible to be used by the process.

Matt

Quote from: PabloMack on January 07, 2011, 01:05:12 PM
In Windows XP/Vista/7 you can also use Task Manager to Set Affinity for specific cores to specific processes. To do this, right-click task bar and select "Start Task Manager".
Go to Applications Tab. Right click Terragen 2 and select "Go To Process". Next right click the selected process and select "Set Affinity...". You can then check and
uncheck specific cores that are eligible to be used by the process.

What are the benefits of doing that?

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

Kadri

#6
Quote from: Matt on January 15, 2011, 08:06:56 PM
Quote from: PabloMack on January 07, 2011, 01:05:12 PM
In Windows XP/Vista/7 you can also use Task Manager to Set Affinity for specific cores to specific processes. To do this, right-click task bar and select "Start Task Manager".
Go to Applications Tab. Right click Terragen 2 and select "Go To Process". Next right click the selected process and select "Set Affinity...". You can then check and
uncheck specific cores that are eligible to be used by the process.
What are the benefits of doing that?
Matt

When i use TG2 with all of the 4 cores my pc is barely useful for anything else .
But when i set 3 cores for TG2 i can use my web browser or anything i want easily with the last core.
I am not sure but TG2 uses the cores more aggressively.
In the past with other render engines they were a little more user friendly(Edit:not quite the right word-TG2 does what it have to obviously by using all the cores) for using other software  in render time.
But nothing i can say is scientific here  ;)

Beside this , with 16 cores or so in horizon(with hyperthreading or not )
if TG2 can not use all of the cores we can assign 4 TG2 programs for 4 cores each (assuming enough memory).
Or some of them for rendering and some for games. This way we can use our pc more at ease .
But in TG2 we can use the minimum and maximum threads setting too for this.

Henry Blewer

I have been able to run Terragen 2 on both 'logical' cores on my P4 HT, and web surf, watch movies, etc;. I just change the task priority to low.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

jo

Hi Kadri,

Quote from: Kadri on January 16, 2011, 05:06:53 AM
Beside this , with 16 cores or so in horizon(with hyperthreading or not )

That's not exactly on the horizon, I've had an 8 core machine with hyperthreading (giving 16 cores) for more than a year. I might not be understanding you though.

Quote
Or some of them for rendering and some for games. This way we can use our pc more at ease .
But in TG2 we can use the minimum and maximum threads setting too for this.

There are several ways you could prevent TG2 using all your cores if that's what you want to do, without having to mess about setting affinity and such. Of course you can use maximum threads setting in the render node. You have to change that each time you create start a new project or create a render node though.

Another way to do it is to use the settings in the Startup pane of the preferences that let you specify the preferred number of cores. This is probably the easiest way to make sure no more cores than you want are used for rendering without having to mess about with changing settings in nodes.

You could also save a project file set up with your desired settings and then use that as project creation template. The settings for this are also in the n the Startup pane of the preferences. Change the popup to "Load from file" and then choose your customised file with the button underneath.

Regards,

Jo


Matt

Quote from: Kadri on January 16, 2011, 05:06:53 AM
Quote from: Matt on January 15, 2011, 08:06:56 PM
Quote from: PabloMack on January 07, 2011, 01:05:12 PM
In Windows XP/Vista/7 you can also use Task Manager to Set Affinity for specific cores to specific processes. To do this, right-click task bar and select "Start Task Manager".
Go to Applications Tab. Right click Terragen 2 and select "Go To Process". Next right click the selected process and select "Set Affinity...". You can then check and
uncheck specific cores that are eligible to be used by the process.
What are the benefits of doing that?
Matt

When i use TG2 with all of the 4 cores my pc is barely useful for anything else .
But when i set 3 cores for TG2 i can use my web browser or anything i want easily with the last core.

I believe the most efficient way to limit Terragen to 3 cores is to tell Terragen to only render with 3 threads, either in Preferences or on the render node settings as mentioned by Jo. As far as I'm aware, the OS should be very good at allocating those threads to usable cores without user intervention, and it should give you the same kind of improved response in other applications. (I am still interested in seeing results which show otherwise.) Anyhow, if you assign Terragen to 3 specific cores you should also tell Terragen to render with only 3 threads - running with 4 threads on 3 cores will usually be slower than running with 3 threads.
Just because milk is white doesn't mean that clouds are made of milk.

Kadri

#10
Quote from: jo on January 16, 2011, 09:27:34 PM
......
That's not exactly on the horizon, I've had an 8 core machine with hyperthreading (giving 16 cores) for more than a year. I might not be understanding you though.

I mean more in common use .

Quote
...
You could also save a project file set up with your desired settings and then use that as project creation template. The settings for this are also in the n the Startup pane of the preferences. Change the popup to "Load from file" and then choose your customised file with the button underneath.
Regards,
Jo

This is not really a problem for me. Mostly i do not know what i will do at render time.
So i change the affinity or Tread counts in TG2  as i want at the render time.  So no problem here :)

Thanks Jo !

Quote from: Matt on January 16, 2011, 10:54:40 PM
...
As far as I'm aware, the OS should be very good at allocating those threads to usable cores without user intervention, and it should give you the same kind of improved response in other applications. (I am still interested in seeing results which show otherwise.) ...

I think some times about this too if there is any difference or not , but i doubt that it is so much to be crucial for me.
But for the big guys with render farms it could be important maybe :) I would love to here about this too only for curiosity :)

Quote from: Matt on January 16, 2011, 10:54:40 PM
... Anyhow, if you assign Terragen to 3 specific cores you should also tell Terragen to render with only 3 threads - running with 4 threads on 3 cores will usually be slower than running with 3 threads.

Thanks , Matt!

bla bla 2

#11
Bonsoir, J'ai un quad core et T2 utilise 100% du processeur. Récemment, quand le rendu arrive à la fin, le processeur ralentit à 40-50%. Est-ce normal ?

Hi, I have a quad core and T2 uses 100% of the processor. Recently, when the render is close to end, the processor slows down to 40-50%. Is it normal ?

neuspadrin

Quote from: bla bla 2 on January 17, 2011, 03:59:07 PM
Bonsoir, J'ai un quad core et T2 utilise 100% du processeur. Récemment, quand le rendu arrive à la fin, le processeur ralentit à 40-50%. Est-ce normal ?

Hi, I have a quad core and T2 uses 100% of the processor. Recently, when the render is close to end, the processor slows down to 40-50%. Is it normal ?

Yes. Basically you can see when it renders it splits each section of the render into a certain number of "blocks" as it renders. Each of these divisions is technically what 1 core gets to do itself. So near the end there might only be 2 blocks left, so only 2 cores will be actively rendering.

Matt

#13
Quote from: Kadri on January 17, 2011, 05:58:33 AM
I think some times about this too if there is any difference or not , but i doubt that it is so much to be crucial for me.
But for the big guys with render farms it could be important maybe :) I would love to here about this too only for curiosity :)

It seems like whenever this is recommended, there's never any evidence given that it helps. I think people might only be doing this "just in case". But since it involves more work for the user for no proven benefit, I am trying to either dispel the myth or have someone prove it once and for all ;)

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

Kadri

#14
Quote from: Matt on January 29, 2011, 10:11:00 PM
Quote from: Kadri on January 17, 2011, 05:58:33 AM
I think some times about this too if there is any difference or not , but i doubt that it is so much to be crucial for me.
But for the big guys with render farms it could be important maybe . I would love to here about this too only for curiosity.
It seems like whenever this is recommended, there's never any evidence given that it helps. I think people might only be doing this "just in case". But since it involves more work for the user for no proven benefit, I am trying to either dispel the myth or have someone prove it once and for all .
Matt

:)



@njeneb :  I didn't tried these (be carefull) but it may be useful to you.
                http://www.prnwatch.com/prio.html
                http://www.bitsum.com/prolasso.php
                There are maybe many more too!

I mostly forget the task priority setting , but maybe this setting would be more useful for me too.Thanks :)
Then there are pages like these :
http://www.codinghorror.com/blog/2006/08/thread-priorities-are-evil.html
::)

Are there any programmer that aren't bald ? It seems very mind boggling!
I now can understand my programmer friend really better , as he was showing a moving square on the screen with such enthusiasm in the early nineties  :)