当前位置:网站首页>Solve the single thread scheduling problem of intel12 generation core CPU (II)

Solve the single thread scheduling problem of intel12 generation core CPU (II)

2022-07-06 16:38:00 Ruo Miaoshen

( One ) Previous review

1.1 Twelve generation core size core and power mode

Reference resources 《 solve Intel12 Generation core CPU【 The small nucleus is full , Big core onlookers 】 The problem of (WIN11)》.
The main problem is that even in Win11 Next , Multithreaded programs will almost always run on small cores , Large core idle , Resulting in low efficiency .
The solution is 【 Power mode 】->【 Best performance 】.

1.2 Single threaded program problems

Reference resources 《 solve Intel12 Generation core CPU Single thread only gives small cores to run 》.
The main problem is that even if the best performance is set , Self developed early single threaded program , It will still run on the small core .
At that time, I accidentally found a monitoring program hanging , We can try to use large cores . Although I don't quite understand it, I also do so .

( Two ) set priority (priority)

In the discussion of the above problem , Some students mentioned that you can test and set the process priority , And process dependencies .
As shown in the figure below , These two items can be found in 【 Task manager 】 in , process 【 Details 】 Set in the page right-click menu .
 Insert picture description here
After testing , Priority is very effective , There is no need to hang monitoring .
Set the process priority to 【 high 】 in the future , Tested a previous time-consuming single threaded program .
It's faster than closing the small core 100 second , Here's the picture .

Program 8P + 0E8P8E performance 8P8E Hang up monitoring 8P8E High priority Company
Another single thread 105913671050940 second

And set priorities , It can be carried out in its own program .
adopt CreateProcess() Join in HIGH_PRIORITY_CLASS Parameters control the priority of the creation process .
It's fine too SetThreadPriority() Set priority after creation .

( 3、 ... and ) Set correlation (affinity)

In the menu above , The next item of priority is relevance .
It means to set what is used in this process CPU Logic processor .
The default is to use both , All selected .
 Insert picture description here
The test found that the last 8 After the small core is unchecked , It's true that only big cores can be used .
But the problem is this correlation setting , Program code It seems impossible .

Just a little bit , In addition to the above mouse point , It seems that you can only set the correlation in the following way :

  • Start the program by batch command .
  • Start the program by shortcut .
  • Through third-party software such as Process Lasso Set up .

The first two command formats :start /affinity 0x? app.exe
0x? What logic is used for bit setting CPU.
app.exe Is the program you want to start .

( Four ) solve

There are few old single thread and time-consuming programs here .
So it only needs to be in the scheduling platform , For these procedures 【 Set high priority 】 It solves the problem of efficiency .

as for 【 Set correlation 】, How to set and different CPU The number of cores is related to , There is no API You can call , So don't consider for the time being .

原网站

版权声明
本文为[Ruo Miaoshen]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060920282265.html