Project

General

Profile

Actions

Emulator Issues #5620

closed

Remove LTTC and write a guide on "How to use your own cpu"

Added by Sonicadvance1 over 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Other
Milestone:
4.0
Regression:
No
Relates to usability:
Yes
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

I propose we remove the lock threads to core GUI option. The INI option can remain in case anyone REALLY has a reason to use it.
The option only serves to confuse and bewilder newcomers to using Dolphin. The only benefit to this option is to work around shitty OS scheduling which doesn't really happen. Need to get more people's opinion on this.

Actions #1

Updated by kostamarino over 11 years ago

It helps speed things up a bit when turbo boost is used (pretty much every new cpu has turbo) by utilizing two cores instead of every core there is. It helps especially with mobile cpus that have big turbo boosts and aren't easily overclockable. Below is an example of such a cpu: http://www.intel.com/content/www/us/en/processor-comparison/processor-specifications.html?proc=65714.

Actions #2

Updated by Sonicadvance1 over 11 years ago

I want numbers on how much it increases performance on turbo boosted processors. A couple of games should be fine.

Actions #3

Updated by hatarumoroboshi over 11 years ago

Time ago I used this option with Xenoblade to have less crashes. Without it enabled on my system the game freezed much more.

Actions #4

Updated by Sonicadvance1 over 11 years ago

That's interesting, but this option doesn't actually touch anything that would cause it to crash. Sounds more like a unstable system that you have.

Actions #5

Updated by tommyhl2.SS over 11 years ago

Sonicadvance1: Where did this sudden need to remove this option come from? You don't even have a PC that can run Dolphin at all, according to you. :D

Actions #6

Updated by Billiard26 over 11 years ago

Yes. The option is silly. It shouldn't need to be Dolphin's job to decide what thread goes on what core.

Actions #7

Updated by OMEGA345 over 11 years ago

Perhaps users should be given the choice of rather we want it to use all or let it do it's thing?

Actions #8

Updated by Billiard26 over 11 years ago

@ OMEGA345
What?

Actions #9

Updated by kostamarino over 11 years ago

Sonicadvance1 i don't have a mobile cpu to test, especially with some mobile i7 models it might make a difference. Hopefully someone who has can provide some numbers.

Actions #10

Updated by Sonicadvance1 over 11 years ago

Doesn't need to be a mobile CPU, just use any CPU that has turbo boost, if it does give a performance benefit, even the desktop CPUs will be effected. I want to see these raw numbers.

Actions #11

Updated by NaturalViolence over 11 years ago

The turbo boosts for desktop cpus are very small and easier to trigger than laptop cpus. So yeah, it kind of does need to be a mobile cpu if you want to see a significant difference.

Actions #12

Updated by axxer6 over 11 years ago

I wouldn't remove this option until you fix whatever is wrong with Donkey Kong Country Returns. Currently that game freezes unless you check Lock Threads to Cores.

If you still really badly wanted to remove the GUI option you could at least change the ini for that game to include Lock Threads to Cores.

Actions #13

Updated by scientificraver over 11 years ago

No! Instead of being removed it should be enabled by default for all games and then may be hidden. On my CoreI7 Sandy Bridge this option always provides a significant boost in Win7x64, especially with CPU heavy games like SMG or Zelda SS.

Actions #14

Updated by delroth over 11 years ago

Can you provide any benchmark showing a performance increase with LTtC?

As a matter of fact, I just tested LTtC in three situations. Here are my results:

I couldn't find any situation where LTtC was actually faster on Windows 7 with an i7-920 (HT enabled).

Actions #15

Updated by scientificraver over 11 years ago

I actually have a mobile Corei7 2670QM.

Zelda SS Title Screen DX11 3.0-750:
LTtC disabled -> 24FPS
LTtC enabled -> 24FPS

Zelda SS file select screen with rotating map:
LTtC disabled -> 18-19 FPS
LTtC enabled -> 21-22 FPS

Since February 2012, I compared diffenrent settings in many games and LTtC enabled is always 2-3 FPS faster in CPU-heavy scenes.

Actions #16

Updated by NightKev over 11 years ago

Perhaps add a tooltip that says something akin to "If you have a Hyper-Threading enabled Intel CPU, this can possibly provide a small speed boost; potentially unstable. If unsure, leave unchecked.", like 90% of the other options?

Actions #17

Updated by scientificraver over 11 years ago

A 10+% boost is not small but significant.

Actions #18

Updated by Sonicadvance1 over 11 years ago

  • Milestone set to Next
Actions #19

Updated by Sonicadvance1 over 11 years ago

  • Milestone changed from Next to 4.0
Actions #20

Updated by Billiard26 over 11 years ago

  • Operating system N/A added

Users are confused about what the option actually does.
The current implementation is ugly in it's method of determining which virtual cores are separate physical cores.
The option will force multiple instances of dolphin on the same few cores.
Thread scheduling is the job of the OS, not Dolphin.
Afaik, none of the developers have even seen LTtC improve performance first hand.

I think it should be removed.

Actions #21

Updated by Billiard26 over 11 years ago

its*

Actions #22

Updated by kodiacktech over 11 years ago

I agree with Billiard on this one. The performance differences can be statistically significant, but they can also be largely unpredictable. Just look at the differences in the above benchmarks. One of sees a consistent drop in performance, while the other reports a moderate bump (likely due to Turbo Boost kicking in).

One difference here, however, is that delroth's benchmarks aren't at all rough estimates. They're used with the benchmarking tool, so there's a much smaller margin of error. Of course, delroth is also running a first-gen i7, which has a fairly conservative Turbo Boost, if he even has the option enabled.

Thread scheduling is a job that is best handled by the operating system. You may get a small boost on Turbo Boost-enabled CPUs, but even that isn't going to be consistent. If the operating system is doing its job correctly, it should be properly load balancing single-threaded work anyways, keeping the performance improvement -if any - largely intact. Preventing the OS from scheduling on certain cores is only limiting resources.

Actions #23

Updated by scientificraver over 11 years ago

If the option gets removed, all windows users with a modern 2nd or 3rd Generation i7 CPU will experience a great loss in performance on any CPU-demanding scene. Therefore the option should not be removed. Also in many game wikis it is recommended to enable LTTC to increase performance and with a modern CPU it works all the time.

Maybe the check box could be removed and LTTC could be automatically enabled whenever a modern i7-CPU is detected in the system. And further testing should be done with i3, i5 and AMD CPUs. Why remove a feature that makes dolphin significantly faster for the majority of users?

Actions #24

Updated by Billiard26 over 11 years ago

@ scientificraver
Please provide data showing LTtC increasing performance. (not just "I think the fps 10% higher")

Actions #25

Updated by MofoMan2000 over 11 years ago

People with 2nd or 3rd generation i7 CPUs are not "the majority of users" or probably aren't even 10% of users. What your asking for is a kludge. Really it ought to just be implemented correctly by default (by the OS), but failing that it ought to be implemented correctly for everyone.

Actions #26

Updated by MofoMan2000 over 11 years ago

*you're

Actions #27

Updated by Billiard26 over 11 years ago

See issue 5045.
We can't even detect the number of cores reliably.

Actions #28

Updated by Sonicadvance1 over 11 years ago

This is closed with 30d4259bba78

Actions #29

Updated by parlane over 11 years ago

  • Status changed from New to Fixed
Actions #30

Updated by Billiard26 over 11 years ago

  • Status changed from Fixed to Accepted

Apparently the "turbo-boost" people who claim LTTC gives them a magical speed boost are only in need of a whole-process affinity setting.

It seems this has nothing to do with poor OS thread scheduling?
(locking threads is not needed)

If people confirm this I think we should either remove LTTC completely
(and tell people to just manually set the process affinity like they do with any other program, you can even make your dolphin shortcut do it automatically)

or we should change the setting to control the whole process affinity.
(allowing one to enter processor numbers)

Personally, I still think it should be removed, even more so if just process affinity is needed/wanted.

Actions #31

Updated by parlane over 11 years ago

It turns out that I have a CPU capable of turbo boost.

Intel® Core™ i7-720QM Processor (1.6GHz,4 Cores/8 Threads,turbo up to 2.8GHz, 6MB Cache)

Tests showed that LTTC does make an improvement. But process affinity (through the task manager) makes a better one.

2 and 3 core process affinity (I purposely didn't use hyperthread secondary cores) gave a 2fps speed increase over the lttc option.

I propose we add the ability to set the process affinity on Windows and remove this LTTC nonsense once and for all.

https://docs.google.com/spreadsheet/ccc?key=0AoaIPbZviOvedDVWalZYd3NJVUw3TEdlOVFBa0RUQmc#gid=0

Actions #34

Updated by Billiard26 over 11 years ago

ya

Actions #35

Updated by Billiard26 about 11 years ago

  • Status changed from Accepted to Fixed

Well, LTTC was removed.

Actions #36

Updated by wespipes69 about 11 years ago

Ok, so what's the answer? How do I set all this up to conveniently use Dolphin and utilize my i5?

Actions #37

Updated by parlane about 11 years ago

Right click Dolphin.exe -> Create Shortcut.
Right click the newly created shortcut -> Properties

Set the target to:
%windir%\system32\cmd.exe /c start "Dolphin" /high /affinity 5 "Dolphin.exe"

Click apply/ok. Double click (run) the shortcut.

To use 3 cores instead of 2 use "2A" instead of "5"
%windir%\system32\cmd.exe /c start "Dolphin" /high /affinity 2A "Dolphin.exe"

When I tested 3 core I found it to be faster than 2 cores at times but slower at others.

Actions #38

Updated by wespipes69 about 11 years ago

Ok, thanks parlane!

Last question (hard getting reliable info on this), for my cpu, what should the affinity be set to? I obviously would like good performance, but I want to be safe and not burn up my cpu. http://ark.intel.com/products/52210/Intel-Core-i5-2500K-Processor-6M-Cache-up-to-3_70-GHz

Is this accurate details about all this? http://www.realenvironmentxtreme.com/forums/index.php?/topic/13514-affinity-tweak-question/page__view__findpost__p__93726

Actions #39

Updated by parlane about 11 years ago

Ah I see you don't have hyper threading.

I suggest these values instead:

3, 5 or 7
That's:
2 core (cpu 0 and cpu 1)
2 core (cpu 0 and cpu 2)
3 core (cpu 0,1,2)

All of these options don't use cpu 3.

The only way to test which one is best is through trial and error.

Btw in case you aren't sure yet, the numbers for affinity are hexadecimal defining which cores to enable or disable for the process.

Cpu 0 = 0x01
Cpu 1 = 0x02
Cpu 2 = 0x04
Cpu 3 = 0x08
(these next ones are only if you have 4 core with hyper threading)
Cpu 4 = 0x10
Cpu 5 = 0x20
Cpu 6 = 0x40
Cpu 7 = 0x80

With hyper threading Cpu 0 and 1 are the same core but different threads. So if you had hyper threading you would try to not use the second thread as you want less switching.

Actions

Also available in: Atom PDF