• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 944 945 946 947 948 1198 Next »

Dolphin i7 mobile problem
View New Posts | View Today's Posts

Pages (6): « Previous 1 2 3 4 5 6 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Dolphin i7 mobile problem
12-13-2010, 05:24 AM (This post was last modified: 12-13-2010, 05:26 AM by NaturalViolence.)
#21
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
Quote:Is it even proper to call it a physical "thread"? Seems like there are just physical cores and logical threads. That's the confusing point. Anyways..

Thread is actually the more proper term.

Quote:4 physical cores? This would mean Dolphin is using more than 2 cores? I thought this was *impossible*?

It can't use more than 2 cores AT THE SAME TIME. It can still use two cores then switch over and use the other two for awhile then switch back. As I said earlier, dolphin jumps around from one thread to another.

Quote:How do you know which logical threads belong to which physical cores?

You don't. Only the OS knows that.

Quote:Anyways, I still don't know why Dolphin will only use 25% max CPU

Because it is using 4 of the 8 logical threads at 50% load. Which is the same as 2 running at 100%, which is 25% of the max.

Quote:and it did the same behavior (50% on 4 logical threads), I would get more like 50% max CPU, making HT the problem. Or would this not happen and it'd still use 25%, somehow. You tell me..

Just because cpu usage is lower does not mean it's slower. If you take two cpus, a quad core and an octacore, which are otherwise identical, and run the same dual-threaded software on both the cpu load on the octacore will be half of what it is on the quad core but the software will be running at the same speed. 2 threads at 100% would be 50% load on the quad core and 25% load on the octacore.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
12-13-2010, 06:18 AM
#22
xenofears Offline
Member
***
Posts: 192
Threads: 7
Joined: Nov 2010
(12-13-2010, 05:24 AM)NaturalViolence Wrote:
Quote:How do you know which logical threads belong to which physical cores?

You don't. Only the OS knows that.

But.. you identified in that second screenshot that two logical threads belonged to the same physical core?

Quote:
Quote:Anyways, I still don't know why Dolphin will only use 25% max CPU

Because it is using 4 of the 8 logical threads at 50% load. Which is the same as 2 running at 100%, which is 25% of the max.

...

Just because cpu usage is lower does not mean it's slower. If you take two cpus, a quad core and an octacore, which are otherwise identical, and run the same dual-threaded software on both the cpu load on the octacore will be half of what it is on the quad core but the software will be running at the same speed. 2 threads at 100% would be 50% load on the quad core and 25% load on the octacore.

Yes, I understand all this. What I am not understanding, the actual question, is why Dolphin isn't utilizing more CPU power on this CPU.

In this real world, it is slower, as the quad core is only 1.6ghz without Turbo Boost (whereas a dual core of the same value would be a lot faster) and Dolphin is not achieving full speed in many games. Dolphin needs to use ~100% of Core 1 and +50% of Core 2 (however much the slower of emulated CPU or GPU can use), or any reality combination that works out to equate to more than 100% of a single core (i.e. 25% CPU). With Dual Core this should be possible. Hell, why even turn on Dual Core if it's only going to use 25% of my CPU? Seems to me it would be faster to lock it to a single core and let it get fully turbo-boost'ed..

.. but that doesn't work. Turning off Dual Core seems to have it STILL use 4 logical threads but at even less utilization. It can't utilize even close to 25% CPU speed using a single core... hmm, I think I found a prime example here of how HT slows down Dolphin if you aren't using Dual Core at the least.

Locking threads to cores with Dual Core off gives you a single thread/8 at 100% (which looks like what is happening with Dual Core off and it off, it's just getting spread across 4 threads.)

Seems very apparent to me that if I did not have HT on it could use 100% of a single thread (which in this case also means core) with Dual Core OFF and climb over the 25% CPU hurdle with it on. At the very least I could lock it to a single core and get full Turbo Boost. I REALLY wish I could turn off HT and experiment and just tell you what happens. But I can't...
Find
Reply
12-13-2010, 07:15 AM (This post was last modified: 12-13-2010, 08:04 AM by NaturalViolence.)
#23
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
Quote:Yes, I understand all this. What I am not understanding, the actual question, is why Dolphin isn't utilizing more CPU power on this CPU.

How can it? Dolphin only has two threads, therefore it can either run on two threads at 100%, 4 threads at 50%, or 8 threads at 25%. Therefore total load on an 8 thread cpu is always going to be 25% if it's working properly no matter what you do. The reason you see 4 threads with usage at 50% instead of 8 with usage at 25% is because although you have 8 threads you only have 4 physical threads, so it uses every other thread in order to avoid using logical threads that belong to the same physical thread. As long as you have 8 threads it is impossible for dolphin to use more without some kind of glitch/bug.

Quote:.. but that doesn't work. Turning off Dual Core seems to have it STILL use 4 logical threads but at even less utilization. It can't utilize even close to 25% CPU speed using a single core... hmm, I think I found a prime example here of how HT slows down Dolphin if you aren't using Dual Core at the least.

Well of course. By turning off dual core you now have one software thread jumping between 4 logical threads instead of two software threads jumping between 4 logical threads. So the load will be cut in half.

If you had HT off your cpu load would double since you would have only 4 logical threads instead of 8. But the speed would not change. Dual threaded software will run at the same speed on a dual core or a quad core cpu even though the load on the dual core will be 100% while the load on the quad core will be 50%.

You still clearly don't get it but I will keep trying until it "clicks". I think the problem is you seem to be trying to connect "dual core" with the number of cores that can be used. Dual core means it can use two core at the same time, but it can still use any of the available cores. I have a quad core cpu with 4 physical threads and 4 logical threads. I can either turn lock threads to cores on which will keep the software threads (the software running on a thread) from changing to another thread. Therefore I will have 2 cores running at 100% for a total load of 50%. If I turn lock threads to cores off I will have 4 threads running at 50% each since the software will be jumping between all 4 cores even though it's only able to use two at the same time. So I will still have 50% load. Likewise if I turned off dual core I would have a 25% total load regardless of whether lock threads to cores is off or on. With it on I would have 1 thread running at 100%. With it off I would have 4 threads running at 25%, both would give me 25% load total. You get it? That one piece of software is jumping between all 4 threads.

Trust me their is nothing wrong. HT does not slow dolphin down unless lock threads to cores is used.

Edit:

Alright I made this real quick to try and explain this to you in a visual way: http://naturalviolence.webs.com/dolphin_lecture.docx

I'll cover HT in my next "lecture" once I'm sure you understand that contents of what I've talked about so far since HT makes things a lot more complex. Most applications lock threads to cores but dolphin gives you the option.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
12-13-2010, 08:20 AM
#24
xenofears Offline
Member
***
Posts: 192
Threads: 7
Joined: Nov 2010
(12-13-2010, 07:15 AM)NaturalViolence Wrote: Dolphin only has two threads, therefore it can either run on two threads at 100%, 4 threads at 50%, or 8 threads at 25%. Therefore total load on an 8 thread cpu is always going to be 25% if it's working properly no matter what you do.


You just equated each logical HT thread as being equal to a physical core. If what you said is true, emulation is slowed down by 1/2 by HT because I have twice as many threads. If HT was off, I would have 4 threads, and it can run at 50% CPU load instead of the 25% I am getting. You argue this again.

Dolphin CAN'T run on two threads (that are physically separate cores) at 100% each on this CPU. I made this point emphatically. That's the key point. You have eloquently described how this load is distributed, which while interesting, isn't really relevant, unless you are trying to prove that HT causes less CPU utilization.

Quote:By turning off dual core you now have one software thread jumping between 4 logical threads instead of two software threads jumping between 4 logical threads. So the load will be cut in half.

That wasn't the point. The point was that 100% load of ONE logical thread is about 1/8th CPU power, which as you make incredibly clear is correct since it is 1/8 threads. But there's FOUR cores. You are proving my point, if it was fully utilizing one core, it would be 1/4. But no, it seems that, on this CPU at least, each logical thread per core is equally divided among that core. And since Dolphin can only use 2 threads at once, it isn't fully utilizing two cores. If HT was off, I'd have 4 threads, and each thread would be 25% CPU. And Dolphin can use two threads, giving an eloquent argument how this would be ideally 50% CPU usage yourself:

Quote:I think the problem is you seem to be trying to connect "dual core" with the number of cores that can be used. Dual core means it can use two core at the same time, but it can still use any of the available cores. I have a quad core cpu with 4 physical threads and 4 logical threads. I can either turn lock threads to cores on which will keep the software threads (the software running on a thread) from changing to another thread. Therefore I will have 2 cores running at 100% for a total load of 50%. If I turn lock threads to cores off I will have 4 threads running at 50% each since the software will be jumping between all 4 cores even though it's only able to use two at the same time. So I will still have 50% load. Likewise if I turned off dual core I would have a 25% total load regardless of whether lock threads to cores is off or on. With it on I would have 1 thread running at 100%. With it off I would have 4 threads running at 25%, both would give me 25% load total. You get it? That one piece of software is jumping between all 4 threads.

Yes yes all of that is true. But, again, I DON'T have 25% load with Dual Core off or anywhere above 25% with it on. Why? Your argument would seem to be that it's because I have 8 threads. Again you are proving my point. If I had 4 threads (HT off), then the exact above would apply to my processor, and I WOULD have 25% load per thread, or 50% load with Dual Core on.

Unless...

Quote:If you had HT off your cpu load would double since you would have only 4 logical threads instead of 8. But the speed would not change. Dual threaded software will run at the same speed on a dual core or a quad core cpu even though the load on the dual core will be 100% while the load on the quad core will be 50%.

You just equated each logical HT thread as being equal to a physical core again. And HT as turning my quad core into an eight core!

Seriously, I am not saying I am definitely right here, but your arguments aren't making any sense. I may know nothing about HT, but I have an extremely firm grasp of logic. Perhaps this post will clear things up, but if it doesn't, I don't care to argue further. Thank you for trying to explain it to me. I know this is all extremely difficult to communicate, especially on a message board.

Find
Reply
12-13-2010, 09:40 AM (This post was last modified: 12-13-2010, 09:43 AM by NaturalViolence.)
#25
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
Quote:You just equated each logical HT thread as being equal to a physical core. If what you said is true, emulation is slowed down by 1/2 by HT because I have twice as many threads. If HT was off, I would have 4 threads, and it can run at 50% CPU load instead of the 25% I am getting. You argue this again.

Emulation is only slowed if it is using two logical threads that belong to the same physical thread, which is why it only uses one logical thread per physical thread. Once again you're not getting it. Just because the load is lower does not mean the software is running slower or using less processing power.

Quote:Dolphin CAN'T run on two threads (that are physically separate cores) at 100% each on this CPU. I made this point emphatically. That's the key point. You have eloquently described how this load is distributed, which while interesting, isn't really relevant, unless you are trying to prove that HT causes less CPU utilization.

HT does reduce cpu load since you have twice as many threads. But it does not decrease the amount of processing power used or the speed of emulation. And you are right you cannot get dolphin to use two logical cores belonging to two physical cores. With lock threads to cores it will use two logical cores that belong to the same physical core while with lock threads to cores turned off it will use 4 logical cores belonging to 4 physical threads. Your original argument was that HT is slowing dolphin down, this is simply not true.

Quote:That wasn't the point. The point was that 100% load of ONE logical thread is about 1/8th CPU power, which as you make incredibly clear is correct since it is 1/8 threads. But there's FOUR cores. You are proving my point, if it was fully utilizing one core, it would be 1/4. But no, it seems that, on this CPU at least, each logical thread per core is equally divided among that core. And since Dolphin can only use 2 threads at once, it isn't fully utilizing two cores. If HT was off, I'd have 4 threads, and each thread would be 25% CPU. And Dolphin can use two threads, giving an eloquent argument how this would be ideally 50% CPU usage yourself:

First of all it doesn't care how many physical cores you have. It uses logical cores to calculate load. If it's using 1 logical core at 100% that would be 12.5% total load. If 2 logical cores are being fully utilized the load would be 25%. I think I may have stumbled upon another problem in your understanding you seem to think that because only 1 logical thread of a physical thread is being used that half of the physical thread is being used. The whole point of HT is to use multiple logical threads per physical thread in order to assign multiple tasks so that if one task stalls it can switch to the other task. However if you have 4 physical threads your cpu can only process 4 tasks simultaneously regardless of how many logical threads you have. I think the problem in your communication this whole time was that you didn't understand that.

Please look at my visual explanation which is now attached to the end of my previous post. I'll make a follow up to it explaining HT soon.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
12-13-2010, 10:00 AM (This post was last modified: 12-13-2010, 10:10 AM by xenofears.)
#26
xenofears Offline
Member
***
Posts: 192
Threads: 7
Joined: Nov 2010
[quote='NaturalViolence' pid='126029' dateline='1292197248']
[quote]First of all it doesn't care how many physical cores you have. It uses logical cores to calculate load. If it's using 1 logical core at 100% that would be 12.5% total load. If 2 logical cores are being fully utilized the load would be 25%. I think I may have stumbled upon another problem in your understanding you seem to think that because only 1 logical thread of a physical thread is being used that half of the physical thread is being used. The whole point of HT is to use multiple logical threads per physical thread in order to assign multiple tasks so that if one task stalls it can switch to the other task. However if you have 4 physical threads your cpu can only process 4 tasks simultaneously regardless of how many logical threads you have. I think the problem in your communication this whole time was that you didn't understand that.[/quote]

Yep, that explains it.

"25% CPU" is misleading, that's not actually true, that's the problem. I want to know what the overall % of the actual maximum available-at-once physical CPU is being used. Alas it seems this is very hard to determine or calculate accurately with multiple cores and HT (if I understand correctly, on 4 core/8 threads, 25% with Dolphin using logical threads unique to each core, it's more like 50% + HT bonus). Cheers. I'll check out your chart.

..However we still have to take into account the possibly major loss of performance in not having Turbo Boost by 4 cores being used, I mean we are talking 1.6ghz vs 2.8ghz.. Sad wish I could lock Dolphin to two physically unique threads.. so HT may in fact slow things down, or am I wrong?
Find
Reply
12-13-2010, 11:15 AM (This post was last modified: 12-13-2010, 11:36 AM by NaturalViolence.)
#27
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
If you take turbo boost into account, I don't know, I don't know enough about turbo boost to make that call. I think I have perfected my "lecture", here is the new complete version in several different file formats:

.doc: http://naturalviolence.webs.com/dolphin_lecture.doc

.pdf: http://naturalviolence.webs.com/dolphin_lecture.pdf

.docx: http://naturalviolence.webs.com/dolphin_lecture.docx

Tell me what you think of it (be honest).

A few things I forgot to mention in the lecture since I'm operating under the assumption that you already know these things, I'll just list them anyways.

-Multicore cpus are designed to give the os several different place where it can carry out code independent of one another. That way several tasks can be executed simultaneously without slowing each other down.

-In order for a single piece of software to take advantage of this to increase the amount of processing power available to it the task that the software must complete must be split into several smaller tasks that are needed to complete that bigger task. So you end up with several different pieces of software each performing a task on a different microprocessor. When you create a piece of software to perform a specific task related to your program you need to give it a location to run (where to send the task to be completed), these are called threads.

-When intel introduced hyperthreading intel provided multiple entrance locations into the core in order to trick the os into thinking it has more cores then it actually has. So to keep people from getting confused we call the locations logical threads and the actual hardware that processes the thread a physical thread. If you set two pieces of software to run on thread 0 and thread 1 on a hyperthreaded cpu even though you have told them to go to different locations to be processes they will actually end up going to the same place, the first physical thread (core 0).

-The diagrams assume that dolphin is bottlenecked by the cpu (which is almost always true. For example if you had a single core cpu you are not garaunteed to get 100% cpu load with all software obviously since other things can bottleneck the cpu.

-Something else (forgot what)

I also noticed one mistake in the lecture. It's actually the OS that makes dolphin run on every other logical thread, not dolphin itself. When lock threads to cores is off the OS controls thread management instead of dolphin defining threads to use. Microsoft must have foreseen problems like this when designing win 7 and went ahead and prepared the kernel for using HT properly.

Your head probably feels like a watermelon by now Tongue.

If you don't want to use the terms "physical thread" and "logical thread" that's fine. If you use the words core (physical thread) and thread (logical thread) everyone will still know what you're talking about.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
12-14-2010, 04:39 AM
#28
xenofears Offline
Member
***
Posts: 192
Threads: 7
Joined: Nov 2010
Turbo Boost increases speed by increasing processor frequency/multiplier (I think both) dynamically when less than all cores are in use, maximal effectiveness with a single core being maxed... you probably already know this. The temperature also plays a big factor, making full turbo boost all the time on a laptop unfeasible though. I think a lot of independent testing would need to be done to truly know, it's an Intel mystery. I just found a little Turbo Boost Monitor gadget, let's check it out now. Locking Cores to Threads+HT (turning Dolphin into single core) is DEFINITELY slower than Dual Core+HT (2 core/4 thread use), no further testing there needed, thought it might be curious to see the Turbo Boost differences.

I'll check out your chart (in depth, took a peek,) soon, least I can do for all this time you spent Smile
Find
Reply
12-14-2010, 02:29 PM (This post was last modified: 12-14-2010, 02:38 PM by NaturalViolence.)
#29
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
Yes I already know the basics, I just don't know if HT affects it. It's basically nothing more than an if then else statement in the bios that changes the multiplier based on 5 factors.

If CPU load of a thread = 100% (since if it is lower than 100% it is being bottlenecked and overclocking would not help)
then
if temperature < 85C
then
if cpu power consumption < ?
then
if cpu amp < ?
then
if core multiplier < ? (the max turbo multiplier, this changes based on the number of active cores in mobile versions)
then
increase core multiplier by 1
else
do nothing

It's a bit more complex than that. If power consumption, amps, or temperature limits are exceeded it lowers the multiplier by 1 instead of doing nothing. And if none of the threads are running at 100% then it just resets the multiplier to the stock value. The real question is whether it uses load on physical threads or logical threads for doing this. That would tell me if HT affects it or not.

Some slight differences between mobile and desktop cpus. The desktop cpus don't have the amp and power consumption limitations and the max core multiplier does not change based on number of active cores. I won't even get into the second generation turbo boost that sandy bridge uses.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
12-14-2010, 03:23 PM
#30
xenofears Offline
Member
***
Posts: 192
Threads: 7
Joined: Nov 2010
I got virtually no Turbo Boost with HT, Dual Core on / Lock Threads off. I'm playing at 1.6ghz. There's the speed problem.

I meant more than how much HT affects it is how it indirectly effects it with Dolphin, if it was off you could lock threads to cores and fully use 2 cores only without the thread jumping that MIGHT cause less Turbo Boosting. Also you said thread load must be 100%.. well it's never 100% on Dolphin without Lock Threads on.. or is that not how it calculates it?
Find
Reply
« Next Oldest | Next Newest »
Pages (6): « Previous 1 2 3 4 5 6 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode