New public alpha: Multi threading AND hyper threading?

Started by Mohawk20, May 05, 2008, 11:18:31 AM

Previous topic - Next topic

Mohawk20

While rendering an animation on 2 cores by multithreading (leaving it go day and night), I sometimes need some extra spu power to play a movie or another app, and so I go to the taskmanager and set tgd.exe's affinity to only one cpu, clearing the other for different apps.

While started on 2 cores, and having only one to work on, the renderer still renders 2 buckets at a time.

Is TG hyperthreading when it renders 2 buckets on one core?
Howgh!

zionner

Well, This is how I think it works: (I'm dont know much about these things so I cant be 100% sure its right)

But Basicly, Every Processor With dual (Or more Cores in it) Has seprate threads on each of those processors, which kind of work like...mini-CPU inside the Cores, which all work together to produce the main Core, now these cores can have...A lot of threads in them (Mine is a 2 Core 2.8, but in Task Manager IT says im running important programs on between 50-100 Threads Each)

So Basicly, running on one core of a dual core could somewhat still work like a dual core, just not nearly as well...

Someone Correct Me If im wrng :D

buchvecny

hyperthreading simplified means that single core pretend to be two cores and thus going to more threads with some speed improvement around 10-15% (alltho intel claims 30%)

it s dependant on your processor. AMD doesnt have hyper threading at all and intel discontinued hyper threading with arrival of core 2 duos (it will come back on nehalems). However if you running some pentium D, its possible that you are hyper threading.

zionner

Quote from: buchvecny on May 05, 2008, 12:46:22 PM
hyperthreading simplified means that single core pretend to be two cores and thus going to more threads with some speed improvement around 10-15% (alltho intel claims 30%)

it s dependant on your processor. AMD doesnt have hyper threading at all and intel discontinued hyper threading with arrival of core 2 duos (it will come back on nehalems). However if you running some pentium D, its possible that you are hyper threading.


So..Baslicly...I was Right?

Mohawk20

Howgh!

jo

Hi,

Quote
Is TG hyperthreading when it renders 2 buckets on one core?

No. HyperThreading is the name for a technique used on Intel processors. Simply put, not all parts of a single processor/core ( I'll call it a processor for simplicity ) are fully utilised during computation. There are often points where a particular queue of instructions in the processor has "bubbles" in it where there are no actual instructions, for various reasons. On a HyperThreading CPU these bubbles in the instruction queues are filled up with instructions from another thread or process, which means the calculations for that thread or process can be completed a little bit quicker than they usually would. However because that thread or process only gets to do calculations in the bubbles the performance increase it gets is not often that high. When I was first looking at this the maximum performance increase was 20%, with the typical increase being something like 5 or 6%. It may have got better since then, but it's never going to be the same as having two actual processors.

Processes and threads are software things, not hardware things. A process is basically an application. A thread is something that a process creates to allow more than operation to happen at the same time. TG2 ( tgd.exe ) is a process, it creates threads to do stuff like rendering or checking for updates when you start the application. Processes are more "heavyweight" than threads, they are usually more complex and use more system resources to operate. Threads are usually more lightweight, they don't require all the overhead of a process.

A process can run as many threads as it likes, up to the point the OS allows. For example TG2 could run 1000 threads at once, even on a single processor machine. The OS is responsible for making sure all the threads get a chance to use the processor as appropriate. In fact right now there are far more things running on your machine than there are processors or cores, just look in Task Manager. The OS makes sure all those things get a fair go at the processor.

TG2 only creates one thread for rendering per processor. That ensures the maximum utilisation of all of your processor with the minimum overhead. When you're doing as many calculations as TG2 does when rendering you'll only be slower if you add more threads than there are processors. When you change the affinity for TG2 so it only runs on one core it still starts two threads for rendering because it detects your machine has two cores, even if you're only letting the application use one ( I'm not 100% sure that's what is happening, I'll have to go and look into it ).

So does changing the affinity really help your movies play more smoothly or whatever?

Regards,

Jo



Mohawk20

Quote from: jo on May 05, 2008, 06:59:05 PM
So does changing the affinity really help your movies play more smoothly or whatever?

Thanks for the explanation Jo, I was just wondering about the terminology...

And to answer your question, yes. Every second heavy (or reasonable heavy) application is far more smooth when TG uses only one core. Otherwise the movie has constant hickups of playing slower, and WMplayer having to catch up by playing a bit faster. With some movies, that can actually make you nauseous.

I'm still used to TG using all the cpu power it can get, slowing down all other processes. But I don't know if that's still the case, or that it was only the 0.9 version that did that...
Howgh!

Oshyan

TG2 still uses all the CPU power it can get - or at least it does now that the renderer is multithreaded. ;) Your results for performance of other apps when assigning TG2 to a single core make perfect sense. You're limiting TG2 to 1 core, so even though there are two threads, they both are using the single core. Rendering will slow down considerably, probably even a bit below a single thread due to thread and memory overhead, but it will still work at least so I think it accomplishes your goal fairly well.

- Oshyan

buchvecny

Quote from: zionner on May 05, 2008, 02:06:32 PM
Quote from: buchvecny on May 05, 2008, 12:46:22 PM
hyperthreading simplified means that single core pretend to be two cores and thus going to more threads with some speed improvement around 10-15% (alltho intel claims 30%)

it s dependant on your processor. AMD doesnt have hyper threading at all and intel discontinued hyper threading with arrival of core 2 duos (it will come back on nehalems). However if you running some pentium D, its possible that you are hyper threading.


So..Baslicly...I was Right?

i am not sure, maybe yes maybe no, but hyperthreading as a specific intel processor term means that single core pretends to be dual core.

Mandrake

Quote from: buchvecny on May 08, 2008, 07:54:13 PM
Quote from: zionner on May 05, 2008, 02:06:32 PM
Quote from: buchvecny on May 05, 2008, 12:46:22 PM
hyperthreading simplified means that single core pretend to be two cores and thus going to more threads with some speed improvement around 10-15% (alltho intel claims 30%)

it s dependant on your processor. AMD doesnt have hyper threading at all and intel discontinued hyper threading with arrival of core 2 duos (it will come back on nehalems). However if you running some pentium D, its possible that you are hyper threading.


So..Baslicly...I was Right?

i am not sure, maybe yes maybe no, but hyperthreading as a specific intel processor term means that single core pretends to be dual core.

Not the way I read it, before hyperthreading, all your ducks were lined up in a row, so to speak. This operation had to be done before that and so on.
The hyper.. allows multiple calculations to be done at the same time, cores have nothing to do with it.

Oshyan


monks

This has been covered before but how do I know that TG is using all the available cores?- it's only detecting one of my 4 at startup. I have animation deep.

monks

sjefen

#12
Quote from: monks on September 24, 2008, 08:55:33 AM
...how do I know that TG is using all the available cores?

If you are rendering you could always press ctrl+alt+delete and then check the gain or whathever it is called.
It's all in norwegian on my computer ::)

- Terje
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

monks


Oshyan

Monks, if it's only detecting 1 of 4 cores, you may need to specify the *minimum* number of cores TG2 should use. To do it per render session you can set this in the Renderer settings. To set a global default, look in the Preferences.

- Oshyan