Hyperthreading

Discussion in 'General Discussion' started by BasJon, Feb 19, 2012.

  1. Karoly Mayer

    Karoly Mayer Registered

    Joined:
    Jan 14, 2012
    Messages:
    29
    Likes Received:
    3
    i7-2630QM if it tells you something. It is a laptop, probably Abriel has right, HT cannot be disabled in order to protect the system. By the way, I have massive overheating running Rfactor2 and any overclocking could be harmful for my harware, i guess. I use ice accus during running rF2, it is funny, isnt it? :)
     
  2. DrR1pper

    DrR1pper Registered

    Joined:
    Apr 29, 2012
    Messages:
    3,294
    Likes Received:
    36
    That's an odd question to ask since when has it ever been alleged that rF2 would use 6 cores?

    Someone correct me if i'm wrong but with HT on a game that is designed to utilise no more than 2 physical cores will use up no more than 4 logical cores? And for a quad core with HT enabled, those 4 logical cores can be made up from 2 physical cores or from 1 logical core from each of the 4 physical cores?
     
    Last edited by a moderator: Feb 2, 2013
  3. Old Hat

    Old Hat Registered

    Joined:
    Feb 22, 2011
    Messages:
    163
    Likes Received:
    8
    No, I've not heard anyone say it. But I haven't looked at computer specs for 6 years; I only heard of hex core last week. Just trying to make sense of this thread.
     
  4. Novis

    Novis Registered

    Joined:
    Oct 7, 2010
    Messages:
    251
    Likes Received:
    4
    Programs do not know the difference between logical and physical processors. A quad core processor with HT will be seen as 8 processors from any program. A game with two threads will only use two processors simultanious, be it logical or physical. The threads can be both on one core with HT (two logical processors on the same physical processor) or on two separate cores (two physical processors). If they run on the same core they will race for some processor resources which may be bad for performance.
     
  5. Novis

    Novis Registered

    Joined:
    Oct 7, 2010
    Messages:
    251
    Likes Received:
    4
    There are AMD Opteron x64 processors with 8/16 cores.
     
  6. DrR1pper

    DrR1pper Registered

    Joined:
    Apr 29, 2012
    Messages:
    3,294
    Likes Received:
    36
    If that were true then it makes no sense to have hyper-threading at all....ever.

    How would it benefit a game (or any software for that matter in fact) that was programmed to utilise only up to 2 cores without HT if it is also limited to only 2 logical cores when HT is enabled? In the two possible scenarios, if the 2 logical cores chosen are from the same physical core, that would be a downgrade in overall resources available compared to the 2 physical cores in the non HT scenario. And if the program did use 2 logical cores from 2 different physical cores, that is an identical scenario as the non HT scenario with the same amount of resources.

    Also, rf2 has in excess of 15 threads whilst running (my own observation showed 25 in singleplayer with many AI)) and as others have pointed out, more than one thread can be ran on a single core (be it physical or logical). If that were not the case, no one would be able to run rf2 on anything less than an 16 core AMD opteron with only 1 core to spare.


    edit: I didn't mean to sound harsh, i'm just curious as to the true nature of how it all works.

    So what may actually be the case is that rF2 only has 2 processes which can have multiple threads within then. For example could be 1 process running for AI and the other process for physics. And within each of these processes can be as many threads are needed and are scheduled to take turns at using the processor assigned to it, like so...

    [​IMG]

    Now i don't understand how HT could help rF2 at all for the following reason....

    I imagine that the majority of threads are going to be dependent of the results from the other threads in the same process and so the scheduling and time it takes to complete all the threads would/should be no different if a process took place on the same physical core (with and without HT enabled) or if it were spread across 2 physical cores. Only if the threads are independent of one another (which i imagine being true for multiple AI's each with their own physics calculations) would multi-core be beneficial. But i still don't understand how HT adds value to these examples?
     
    Last edited by a moderator: Feb 2, 2013
  7. Novis

    Novis Registered

    Joined:
    Oct 7, 2010
    Messages:
    251
    Likes Received:
    4
    To run faster on a multi-processor system a program must have more active running threads. If a program only have two active threads it doesn't matter if you have a one core with HT, a dual core, a quad core or what ever. Both threads can be run simultanious on any of the above processors. The singe core with HT would probably be the slowest of them though and no difference would probably be detected between the dual and quad core unless someother process needed time to run (which usually always is the case).

    If that program could be split into 4 active threads it may run double as fast on a quad core than on the other two. Programs that do heavy processing has to be able to run many threads concurrently if to utilize a multi core processor.

    A processor is not locked to only run one thread. Threads are switch in and out all the time. Threads are only allowed to run for a limited time (millis) before switched out and another thread is then given a run. If you have many processors many threads can run similtanious and the less wait they have to do. Only threads that are ready to do processing are running for some time on the processor. Most threads are in a waiting state, waiting on being activated by something (the user?).

    A multi-core processor is never utilized fully until you have as many threads ready for processing as processors. Thats why games normally tend to run as fast on dual core as on quad core processor systems.

    HT is not to be confused with a dual core. Compare a dual core with HT against a quad core and the quad will be faster as the HT cores share resources. Compare two quad cores, one with and one without HT, the one with HT will run faster whenever you have more than 4 threads ready to be processed.

    The main advantage with multi-core processors is that they are able to run many different process (programs) simultainious.
     
  8. DrR1pper

    DrR1pper Registered

    Joined:
    Apr 29, 2012
    Messages:
    3,294
    Likes Received:
    36
    Yes Novis, that makes a lot of sense now, thanks.

    But i just want to make one correction in all that you wrote (and correct me back if i'm wrong) that when you say "thread" you actually mean "process" right? Because "threads" are the subsets of a "process" according to wiki...

     
  9. Novis

    Novis Registered

    Joined:
    Oct 7, 2010
    Messages:
    251
    Likes Received:
    4
    A process is an instance of a running program. It contains everything to describe the state of that program. That process can be executed as one or more threads depending on it's implementation. A thread is the smallest (and only) executing unit in a process. If an OS supports multi-threading you could probably say that it never run processes but only threads beloning to a process. If it run a process, it would run one or more threads belonging to that process.

    Some OSes use the term lightweight-process instead of thread. If an OS doesn't support multi-threading you usually never talks about threads at all and then the process is the smallest executing unit.

    But no, I think I ment thread whenever I wrote thread, but in the meaning of a thread belonging to a process. Somewhere perticulair in my post you point to?

    Edit: After reading your previous post I would say that RF2 is only one process, and contains many threads but only two of them show some sort of activity during play.
     
    Last edited by a moderator: Feb 3, 2013
  10. DrR1pper

    DrR1pper Registered

    Joined:
    Apr 29, 2012
    Messages:
    3,294
    Likes Received:
    36
    Thanks for the clarification, I think I have a much better understanding of the different terminologies and their implementations now. ;)
     

Share This Page