Page 1 of 3

C++11 threads seem to get shafted for cycles

Posted: Tue Mar 18, 2014 12:04 am
by User923005
An examination of Fabian's new program shows something bad when we examine the time slices we are getting. It almost seems like threads are created with idle time priority, or some awful level like that.

NORMAL PRIORITY
using start senpai-x64-avx.exe we get this:

info depth 23 seldepth 50 currmove e2e4 currmovenumber 1 nodes 149720064 time 475001 nps 315199 hashfull 500 info depth 23 seldepth 50 nodes 149928670 time 475822 score cp 23 pv e2e4 e7e5 g1f3 b8c6 f1b5 a7a6 b5c6 d7c6 e1g1 c8g4 h2h3 g4f3 d1f3 g8e7 f3b3 b7b5 d2d3 e7g6 c1e3 f8e7 b1d2 e8g8 b3c3 d8d7 d2f3 info depth 23 seldepth 50 currmove g1f3 currmovenumber 2 nodes 149972992 time 476000 nps 315069 hashfull 500

ENHANCED PRIORITY
using start /realtime senpai-x64-avx.exe we get this:

info depth 23 seldepth 50 currmove e2e4 currmovenumber 1 nodes 149607424 time 176000 nps 850042 hashfull 500 info depth 23 seldepth 50 nodes 149928670 time 176371 score cp 23 pv e2e4 e7e5 g1f3 b8c6 f1b5 a7a6 b5c6 d7c6 e1g1 c8g4 h2h3 g4f3 d1f3 g8e7 f3b3 b7b5 d2d3 e7g6 c1e3 f8e7 b1d2 e8g8 b3c3 d8d7 d2f3 info depth 23 seldepth 50 currmove g1f3 currmovenumber 2 nodes 150468608 time 177000 nps 850105 hashfull 500

so the program with one thread runs 850105 / 315069 = 2.7 times faster (~270%) under elevated priority.
That's pretty bogus since there should be a small difference for normal threads.

Consider the Stockfish result:
NORMAL PRIORITY
using start /realtime stockfish_14031222_x64_modern_sse42.exe:

Stockfish 120314 64 SSE4.2 by Tord Romstad, Marco Costalba and Joona Kiiski uci id name Stockfish 120314 64 SSE4.2 id author Tord Romstad, Marco Costalba and Joona Kiiski [snip] info depth 23 currmove a2a4 currmovenumber 20 info depth 23 seldepth 29 score cp 27 nodes 18029688 nps 1318730 time 13672 multipv 1 pv e2e4 e7e5 g1f3 g8f6 f3e5 d7d6 e5f3 f6e4 d2d3 e4f6 d3d4 d6d5 f1d3 b8c6 b1c3 f8d6 d1e2 c8e6 c3b5 e8g8 e1g1 c6b4 b5d6 d8d6 f3e5 b4d3 info depth 24 currmove e2e4 currmovenumber 1

ENHANCED PRIORITY
using start stockfish_14031222_x64_modern_sse42.exe:
Stockfish 120314 64 SSE4.2 by Tord Romstad, Marco Costalba and Joona Kiiski uci id name Stockfish 120314 64 SSE4.2 id author Tord Romstad, Marco Costalba and Joona Kiiski

[snip]
info depth 23 currmove a2a4 currmovenumber 20 info depth 23 seldepth 29 score cp 27 nodes 18029688 nps 1145760 time 15736 multipv 1 pv e2e4 e7e5 g1f3 g8f6 f3e5 d7d6 e5f3 f6e4 d2d3 e4f6 d3d4 d6d5 f1d3 b8c6 b1c3 f8d6 d1e2 c8e6 c3b5 e8g8 e1g1 c6b4 b5d6 d8d6 f3e5 b4d3 info depth 24 currmove e2e4 currmovenumber 1

difference is 1318730 / 1145760 = 1.15 times faster (~15%)

Something is entirely bogus with the default thread priority for C++11 threads, I think.
Is there a simple way to change it?

I found this sourceforge project for Boost threads changing priority:
http://sourceforge.net/projects/threadutility/

is there any semi-portable way to do it in C++11 threads?

Re: C++11 threads seem to get shafted for cycles

Posted: Tue Mar 18, 2014 6:11 am
by ThinkingALot
On my machine startpos NPS is ~1290kns regardless of the priority (set to realtime via task manager). NPS scaling with four threads is pretty good (over 4900kns).

Re: C++11 threads seem to get shafted for cycles

Posted: Tue Mar 18, 2014 9:07 pm
by BB+
A standard Internet search for something like "thread priority C++11" should turn up this post:
http://stackoverflow.com/questions/1888 ... ity-in-c11
There's no way to set thread priorities via the C++11 library. I don't think this is going to change in C++14, and my crystal ball is too hazy to comment on versions after that.

In POSIX, pthread_setschedparam(thread.native_handle(), policy, {priority});
Windows function is SetThreadPriority.
The standard C++ library doesn't define any access to thread priorities. To set thread attributes you'd use the std::thread's native_handle() and use it, e.g., on a POSIX system with pthread_getschedparam() or pthread_setschedparam(). I don't know if there are any proposals to add scheduling attributes to the thread interface.

Re: C++11 threads seem to get shafted for cycles

Posted: Tue Mar 18, 2014 9:41 pm
by User923005
Thanks.
I am going to try boost::thread, since std::thread was based on boost, and with the boost version you can set priority, though it is a fiddly thing to do it.

Re: C++11 threads seem to get shafted for cycles

Posted: Tue Mar 18, 2014 10:23 pm
by hyatt
Does this happen when you run the program by itself, or with lots of other crap running at the same time? If the former, I don't see how changing priorities can do anything as the first priority for the O/S is to schedule runnable processes on available processors. Priorities are irrelevant. If the later, then I suppose anything can happen, but I would not test in that environment anyway...

Re: C++11 threads seem to get shafted for cycles

Posted: Tue Mar 18, 2014 10:43 pm
by User923005
hyatt wrote:Does this happen when you run the program by itself, or with lots of other crap running at the same time? If the former, I don't see how changing priorities can do anything as the first priority for the O/S is to schedule runnable processes on available processors. Priorities are irrelevant. If the later, then I suppose anything can happen, but I would not test in that environment anyway...
It happens when the program is running by itself. And it is consistent that boosting the base priority of the executable gives an enormous speedup.

Komodo, which also uses C++11 threads may also have this problem. I will test it later on this evening to find out.

It is always possible that it is a function of the operating system (I am currently using Windows Server 2012 R2), or some other factor, since someone else said they did not see the problem.

Re: C++11 threads seem to get shafted for cycles

Posted: Wed Mar 19, 2014 12:55 am
by User923005
Komodo TCEC suffers from the same defect on my machine:

This is with the process started with normal priority:

Komodo TCECr 64-bit by Don Dailey, Larry Kaufman and Mark Lefler
using hardware POPCNT
info string Licensed to Danniel Corbit
uci
id name Komodo TCECr 64-bit
id author Don Dailey, Larry Kaufman, Mark Lefler
option name Ponder type check default true
option name Hash type spin default 128 min 1 max 16384
option name OwnBook type check default true
option name MultiPV type spin default 1 min 1 max 99
option name Book File type string default komodo.bin
option name Log File type string default <empty>
option name Clear Hash type button
option name ktabm open type spin default 10 min 0 max 20
option name ktabm end type spin default 12 min 0 max 20
option name UCI_AnalyseMode type check default false
option name Use Lmr type check default true
option name Null Move pruning type check default true
option name Best Book Line type check default false
option name Minimal Reporting type check default false
option name table memory type spin default 64 min 1 max 256
option name Threads type spin default 1 min 1 max 64
option name move overhead milliseconds type spin default 10 min 0 max 50000
option name Drawscore type spin default -7 min -200 max 200
option name time usage aggressiveness type spin default 0 min -9 max 9
uciok
ucinewgame
go infinite
info depth 1 time 54 nodes 20 nps 370 hashfull 0
info depth 1 time 60 nodes 21 score cp 63 nps 349 hashfull 0 pv e2e4
info depth 2 time 72 nodes 47 nps 652 hashfull 0
info depth 2 time 79 nodes 155 score cp 39 nps 1961 hashfull 0 pv e2e4 d7d6
info depth 3 time 84 nodes 177 nps 2106 hashfull 0
info depth 3 time 87 nodes 300 score cp 39 nps 3448 hashfull 0 pv e2e4 e7e6 g1f3

info depth 4 time 97 nodes 352 nps 3628 hashfull 0
info depth 4 time 108 nodes 951 score cp 23 nps 8804 hashfull 0 pv e2e4 d7d5 d1f
3 g8f6 b1c3
info depth 5 time 127 nodes 1101 nps 8668 hashfull 0
info depth 5 time 137 nodes 1558 score cp 17 nps 11371 hashfull 0 pv e2e4 d7d5 d
1f3 g8f6 b1c3 c8g4
info depth 6 time 156 nodes 1992 nps 12767 hashfull 0
info depth 6 time 170 nodes 3390 score cp 33 lowerbound nps 19939 hashfull 0 pv
e2e4
info depth 6 time 178 nodes 4024 score cp 32 upperbound nps 22605 hashfull 0 pv
e2e4 d7d5
info depth 7 time 185 nodes 4335 nps 23431 hashfull 0
info depth 7 time 192 nodes 5699 score cp 22 nps 29680 hashfull 0 pv e2e4 d7d5 e
4d5 d8d5 b1c3 d5e6 f1e2 g8f6 d2d4 b8c6
info depth 8 time 207 nodes 6974 nps 33688 hashfull 0
info depth 8 time 218 nodes 9678 score cp 26 nps 44388 hashfull 0 pv e2e4 d7d5 e
4d5 d8d5 b1c3 d5e6 f1e2 e6g6 c3d5 g6g2
info depth 9 time 232 nodes 12441 nps 53620 hashfull 0
info depth 9 time 262 nodes 21431 score cp 17 nps 81792 hashfull 0 pv e2e4 d7d5
e4d5 g8f6 b1c3 f6d5 d1f3 e7e6 d2d4 b8c6 f1b5
info depth 9 time 309 nodes 31241 score cp 19 nps 101092 hashfull 0 pv d2d4 d7d5
c1f4 c8f5 b1c3 e7e6 g1f3 b8c6 c3b5 f8d6
info depth 10 time 340 nodes 36718 nps 107987 hashfull 1
info depth 10 time 375 nodes 45860 score cp 21 nps 122285 hashfull 1 pv d2d4 d7d
5 c1f4 c8f5 b1c3 e7e6 c3b5 f8d6 e2e3 g8f6 g1f3 d6f4
info depth 11 time 416 nodes 59892 nps 143962 hashfull 1
info depth 11 time 479 nodes 85664 score cp 18 nps 178824 hashfull 2 pv d2d4 d7d
5 c1f4 b8c6 b1c3 e7e6 c3b5 f8d6 f4d6 c7d6 e2e3 g8f6
info depth 12 time 653 nodes 161565 nps 247404 hashfull 4
info depth 12 time 922 nodes 283560 score cp 22 nps 307530 hashfull 8 pv d2d4 d7
d5 g1f3 g8f6 c2c4 e7e6 b1c3 b8c6 c1f4 f8d6 e2e3 d6f4 e3f4
info depth 13 time 1140 nodes 368679 nps 323384 hashfull 11
info depth 13 time 1345 nodes 462353 score cp 19 nps 343734 hashfull 14 pv d2d4
d7d5 g1f3 g8f6 c2c4 e7e6 b1c3 f8b4 e2e3 b4c3 b2c3 f6e4 c1a3 b8c6 d1b3 b7b6 c4d5

info depth 13 time 1882 nodes 691823 score cp 24 nps 367578 hashfull 21 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6
info depth 14 time 2009 nodes 740895 nps 368766 hashfull 22
info depth 14 time 2419 nodes 923516 score cp 26 nps 381748 hashfull 28 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6 b4c3 b2c3

info depth 15 time 2694 nodes 1067396 nps 396188 hashfull 33
info depth 15 time 3070 nodes 1229292 score cp 26 nps 400398 hashfull 38 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6 b4c3
info depth 16 time 3420 nodes 1384990 nps 404944 hashfull 42
info currmove e2e4 currmovenumber 1
info depth 16 time 6416 nodes 2612399 score cp 10 upperbound nps 407145 hashfull
83 pv e2e4 e7e5
info currmove d2d4 currmovenumber 2
info depth 16 time 8407 nodes 3648303 score cp 17 nps 433935 hashfull 115 pv d2d
4 d7d5 c1f4 g8f6 e2e3 c8f5 f1d3 f5d3 c2d3 b8c6 d1b3 a8b8 b1c3 e7e6 g1f3 f8d6 f4d
6 c7d6 a1c1
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 17 time 9721 nodes 4126184 nps 424436 hashfull 130
info currmove d2d4 currmovenumber 1
info depth 17 time 15449 nodes 7097339 score cp 21 nps 459377 hashfull 221 pv d2
d4 d7d5 c2c4 d5c4 e2e3 c8e6 b1a3 g8f6 a3c4 e6d5 g1f3 b8c6 f1d3 e7e6 e1g1 c6b4 c4
e5 b4d3 d1d3 c7c6
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 18 time 18234 nodes 8379794 nps 459567 hashfull 260
info currmove d2d4 currmovenumber 1
info depth 18 time 24765 nodes 11378413 score cp 25 nps 459447 hashfull 350 pv d
2d4 d7d5 c2c4 d5c4 e2e3 c8e6 g1f3 c7c6 e3e4 h7h6 e4e5 e6d5 f1e2 e7e6 b1c3 f8b4 e
1g1 g8e7 d1a4 b8a6
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 19 time 26663 nodes 12131753 nps 454994 hashfull 370
info currmove d2d4 currmovenumber 1
info depth 19 time 47599 nodes 22040298 score cp 22 nps 463034 hashfull 621 pv d
2d4 d7d5 c2c4 c7c6 c4d5 g8f6 b1c3 c6d5 c1f4 b8c6 e2e3 d8b6 a2a3 c8f5 b2b4 e7e6 g
1f3 a8c8 c3a4 b6d8 a4c5 f8c5
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 20 time 52282 nodes 24225314 nps 463349 hashfull 664
info currmove d2d4 currmovenumber 1



This is with the process started with elevated process priority:
Komodo TCECr 64-bit by Don Dailey, Larry Kaufman and Mark Lefler
using hardware POPCNT
info string Licensed to Danniel Corbit
uci
id name Komodo TCECr 64-bit
id author Don Dailey, Larry Kaufman, Mark Lefler
option name Ponder type check default true
option name Hash type spin default 128 min 1 max 16384
option name OwnBook type check default true
option name MultiPV type spin default 1 min 1 max 99
option name Book File type string default komodo.bin
option name Log File type string default <empty>
option name Clear Hash type button
option name ktabm open type spin default 10 min 0 max 20
option name ktabm end type spin default 12 min 0 max 20
option name UCI_AnalyseMode type check default false
option name Use Lmr type check default true
option name Null Move pruning type check default true
option name Best Book Line type check default false
option name Minimal Reporting type check default false
option name table memory type spin default 64 min 1 max 256
option name Threads type spin default 1 min 1 max 64
option name move overhead milliseconds type spin default 10 min 0 max 50000
option name Drawscore type spin default -7 min -200 max 200
option name time usage aggressiveness type spin default 0 min -9 max 9
uciok
ucinewgame
go infinite
info depth 1 time 27 nodes 20 nps 714 hashfull 0
info depth 1 time 30 nodes 21 score cp 63 nps 677 hashfull 0 pv e2e4
info depth 2 time 36 nodes 47 nps 1270 hashfull 0
info depth 2 time 41 nodes 155 score cp 39 nps 3780 hashfull 0 pv e2e4 d7d6
info depth 3 time 43 nodes 177 nps 4022 hashfull 0
info depth 3 time 48 nodes 300 score cp 39 nps 6245 hashfull 0 pv e2e4 e7e6 g1f3

info depth 4 time 53 nodes 352 nps 6636 hashfull 0
info depth 4 time 57 nodes 951 score cp 23 nps 16672 hashfull 0 pv e2e4 d7d5 d1f
3 g8f6 b1c3
info depth 5 time 62 nodes 1101 nps 17746 hashfull 0
info depth 5 time 65 nodes 1558 score cp 17 nps 23954 hashfull 0 pv e2e4 d7d5 d1
f3 g8f6 b1c3 c8g4
info depth 6 time 71 nodes 1992 nps 28040 hashfull 0
info depth 6 time 77 nodes 3390 score cp 33 lowerbound nps 44005 hashfull 0 pv e
2e4
info depth 6 time 83 nodes 4024 score cp 32 upperbound nps 48457 hashfull 0 pv e
2e4 d7d5
info depth 7 time 87 nodes 4335 nps 49804 hashfull 0
info depth 7 time 92 nodes 5699 score cp 22 nps 61933 hashfull 0 pv e2e4 d7d5 e4
d5 d8d5 b1c3 d5e6 f1e2 g8f6 d2d4 b8c6
info depth 8 time 99 nodes 6974 nps 70441 hashfull 0
info depth 8 time 108 nodes 9678 score cp 26 nps 89608 hashfull 0 pv e2e4 d7d5 e
4d5 d8d5 b1c3 d5e6 f1e2 e6g6 c3d5 g6g2
info depth 9 time 119 nodes 12441 nps 104508 hashfull 0
info depth 9 time 144 nodes 21431 score cp 17 nps 148779 hashfull 0 pv e2e4 d7d5
e4d5 g8f6 b1c3 f6d5 d1f3 e7e6 d2d4 b8c6 f1b5
info depth 9 time 173 nodes 31241 score cp 19 nps 180580 hashfull 0 pv d2d4 d7d5
c1f4 c8f5 b1c3 e7e6 g1f3 b8c6 c3b5 f8d6
info depth 10 time 199 nodes 36718 nps 184508 hashfull 1
info depth 10 time 226 nodes 45860 score cp 21 nps 202913 hashfull 1 pv d2d4 d7d
5 c1f4 c8f5 b1c3 e7e6 c3b5 f8d6 e2e3 g8f6 g1f3 d6f4
info depth 11 time 270 nodes 59892 nps 221779 hashfull 1
info depth 11 time 333 nodes 85664 score cp 18 nps 257210 hashfull 2 pv d2d4 d7d
5 c1f4 b8c6 b1c3 e7e6 c3b5 f8d6 f4d6 c7d6 e2e3 g8f6
info depth 12 time 526 nodes 161565 nps 307142 hashfull 4
info depth 12 time 821 nodes 283560 score cp 22 nps 345351 hashfull 8 pv d2d4 d7
d5 g1f3 g8f6 c2c4 e7e6 b1c3 b8c6 c1f4 f8d6 e2e3 d6f4 e3f4
info depth 13 time 999 nodes 368679 nps 369029 hashfull 11
info depth 13 time 1179 nodes 462353 score cp 19 nps 392134 hashfull 14 pv d2d4
d7d5 g1f3 g8f6 c2c4 e7e6 b1c3 f8b4 e2e3 b4c3 b2c3 f6e4 c1a3 b8c6 d1b3 b7b6 c4d5

info depth 13 time 1598 nodes 691823 score cp 24 nps 432905 hashfull 21 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6
info depth 14 time 1676 nodes 740895 nps 442037 hashfull 22
info depth 14 time 1957 nodes 923516 score cp 26 nps 471878 hashfull 28 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6 b4c3 b2c3

info depth 15 time 2186 nodes 1067396 nps 488260 hashfull 33
info depth 15 time 2420 nodes 1229292 score cp 26 nps 507944 hashfull 38 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6 b4c3
info depth 16 time 2638 nodes 1384990 nps 524986 hashfull 42
info depth 16 time 4133 nodes 2612399 score cp 10 upperbound nps 632048 hashfull
83 pv e2e4 e7e5
info depth 16 time 5300 nodes 3648303 score cp 17 nps 688320 hashfull 115 pv d2d
4 d7d5 c1f4 g8f6 e2e3 c8f5 f1d3 f5d3 c2d3 b8c6 d1b3 a8b8 b1c3 e7e6 g1f3 f8d6 f4d
6 c7d6 a1c1
info depth 17 time 5772 nodes 4126184 nps 714822 hashfull 130
info currmove d2d4 currmovenumber 1
info depth 17 time 8907 nodes 7097339 score cp 21 nps 796782 hashfull 221 pv d2d
4 d7d5 c2c4 d5c4 e2e3 c8e6 b1a3 g8f6 a3c4 e6d5 g1f3 b8c6 f1d3 e7e6 e1g1 c6b4 c4e
5 b4d3 d1d3 c7c6
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 18 time 10455 nodes 8379794 nps 801465 hashfull 260
info currmove d2d4 currmovenumber 1
info depth 18 time 14159 nodes 11378413 score cp 25 nps 803571 hashfull 350 pv d
2d4 d7d5 c2c4 d5c4 e2e3 c8e6 g1f3 c7c6 e3e4 h7h6 e4e5 e6d5 f1e2 e7e6 b1c3 f8b4 e
1g1 g8e7 d1a4 b8a6
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 19 time 14831 nodes 12131753 nps 817953 hashfull 370
info currmove d2d4 currmovenumber 1
info depth 19 time 22773 nodes 22040298 score cp 22 nps 967813 hashfull 621 pv d
2d4 d7d5 c2c4 c7c6 c4d5 g8f6 b1c3 c6d5 c1f4 b8c6 e2e3 d8b6 a2a3 c8f5 b2b4 e7e6 g
1f3 a8c8 c3a4 b6d8 a4c5 f8c5
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 20 time 24875 nodes 24225314 nps 973866 hashfull 664
info currmove d2d4 currmovenumber 1
info depth 20 time 30516 nodes 31192685 score cp 23 nps 1022150 hashfull 780 pv
d2d4 d7d5 c2c4 c7c6 c4d5 c6d5 b1c3 g8f6 g1f3 b8c6 d1b3 e7e6 c1f4 f8e7 e2e3 e8g8
f1e2 f6e4 e1g1 e4c3 b2c3 g7g5
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 21 time 37153 nodes 33945441 nps 913643 hashfull 816
info currmove d2d4 currmovenumber 1
info depth 21 time 72623 nodes 76396629 score cp 26 nps 1051948 hashfull 993 pv
d2d4 g8f6 c2c4 d7d6 g1f3 c8f5 d1b3 d8c8 b1c3 e7e6 f3h4 f5g6 d4d5 e6d5 c3d5 f6d5
c4d5 f8e7 h4g6 h7g6 e2e4 e8g8 f1d3 b8d7 c1e3
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20


Depth 20 NPS = 1022150 verses 463349 NPS with normal priority.
That ratio is 2.2 to 1, which is similar to the problem with senpai.

Re: C++11 threads seem to get shafted for cycles

Posted: Wed Mar 19, 2014 2:30 am
by User923005
Using boost does not help (same issue and some small further reduction in performance).
I did not manually alter the priority of the threads in boost, since I found a library that does it.
I am going to try this library:
http://sourceforge.net/projects/threadutility/

Re: C++11 threads seem to get shafted for cycles

Posted: Wed Mar 19, 2014 4:08 am
by mjlef
What machine are you using to run these tests on? The nps seem very low. What other processes are running in the background and with what priority? I cannot seem to duplicate your results so more details would be appreciated.

Mark
User923005 wrote:Komodo TCEC suffers from the same defect on my machine:

This is with the process started with normal priority:

Komodo TCECr 64-bit by Don Dailey, Larry Kaufman and Mark Lefler
using hardware POPCNT
info string Licensed to Danniel Corbit
uci
id name Komodo TCECr 64-bit
id author Don Dailey, Larry Kaufman, Mark Lefler
option name Ponder type check default true
option name Hash type spin default 128 min 1 max 16384
option name OwnBook type check default true
option name MultiPV type spin default 1 min 1 max 99
option name Book File type string default komodo.bin
option name Log File type string default <empty>
option name Clear Hash type button
option name ktabm open type spin default 10 min 0 max 20
option name ktabm end type spin default 12 min 0 max 20
option name UCI_AnalyseMode type check default false
option name Use Lmr type check default true
option name Null Move pruning type check default true
option name Best Book Line type check default false
option name Minimal Reporting type check default false
option name table memory type spin default 64 min 1 max 256
option name Threads type spin default 1 min 1 max 64
option name move overhead milliseconds type spin default 10 min 0 max 50000
option name Drawscore type spin default -7 min -200 max 200
option name time usage aggressiveness type spin default 0 min -9 max 9
uciok
ucinewgame
go infinite
info depth 1 time 54 nodes 20 nps 370 hashfull 0
info depth 1 time 60 nodes 21 score cp 63 nps 349 hashfull 0 pv e2e4
info depth 2 time 72 nodes 47 nps 652 hashfull 0
info depth 2 time 79 nodes 155 score cp 39 nps 1961 hashfull 0 pv e2e4 d7d6
info depth 3 time 84 nodes 177 nps 2106 hashfull 0
info depth 3 time 87 nodes 300 score cp 39 nps 3448 hashfull 0 pv e2e4 e7e6 g1f3

info depth 4 time 97 nodes 352 nps 3628 hashfull 0
info depth 4 time 108 nodes 951 score cp 23 nps 8804 hashfull 0 pv e2e4 d7d5 d1f
3 g8f6 b1c3
info depth 5 time 127 nodes 1101 nps 8668 hashfull 0
info depth 5 time 137 nodes 1558 score cp 17 nps 11371 hashfull 0 pv e2e4 d7d5 d
1f3 g8f6 b1c3 c8g4
info depth 6 time 156 nodes 1992 nps 12767 hashfull 0
info depth 6 time 170 nodes 3390 score cp 33 lowerbound nps 19939 hashfull 0 pv
e2e4
info depth 6 time 178 nodes 4024 score cp 32 upperbound nps 22605 hashfull 0 pv
e2e4 d7d5
info depth 7 time 185 nodes 4335 nps 23431 hashfull 0
info depth 7 time 192 nodes 5699 score cp 22 nps 29680 hashfull 0 pv e2e4 d7d5 e
4d5 d8d5 b1c3 d5e6 f1e2 g8f6 d2d4 b8c6
info depth 8 time 207 nodes 6974 nps 33688 hashfull 0
info depth 8 time 218 nodes 9678 score cp 26 nps 44388 hashfull 0 pv e2e4 d7d5 e
4d5 d8d5 b1c3 d5e6 f1e2 e6g6 c3d5 g6g2
info depth 9 time 232 nodes 12441 nps 53620 hashfull 0
info depth 9 time 262 nodes 21431 score cp 17 nps 81792 hashfull 0 pv e2e4 d7d5
e4d5 g8f6 b1c3 f6d5 d1f3 e7e6 d2d4 b8c6 f1b5
info depth 9 time 309 nodes 31241 score cp 19 nps 101092 hashfull 0 pv d2d4 d7d5
c1f4 c8f5 b1c3 e7e6 g1f3 b8c6 c3b5 f8d6
info depth 10 time 340 nodes 36718 nps 107987 hashfull 1
info depth 10 time 375 nodes 45860 score cp 21 nps 122285 hashfull 1 pv d2d4 d7d
5 c1f4 c8f5 b1c3 e7e6 c3b5 f8d6 e2e3 g8f6 g1f3 d6f4
info depth 11 time 416 nodes 59892 nps 143962 hashfull 1
info depth 11 time 479 nodes 85664 score cp 18 nps 178824 hashfull 2 pv d2d4 d7d
5 c1f4 b8c6 b1c3 e7e6 c3b5 f8d6 f4d6 c7d6 e2e3 g8f6
info depth 12 time 653 nodes 161565 nps 247404 hashfull 4
info depth 12 time 922 nodes 283560 score cp 22 nps 307530 hashfull 8 pv d2d4 d7
d5 g1f3 g8f6 c2c4 e7e6 b1c3 b8c6 c1f4 f8d6 e2e3 d6f4 e3f4
info depth 13 time 1140 nodes 368679 nps 323384 hashfull 11
info depth 13 time 1345 nodes 462353 score cp 19 nps 343734 hashfull 14 pv d2d4
d7d5 g1f3 g8f6 c2c4 e7e6 b1c3 f8b4 e2e3 b4c3 b2c3 f6e4 c1a3 b8c6 d1b3 b7b6 c4d5

info depth 13 time 1882 nodes 691823 score cp 24 nps 367578 hashfull 21 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6
info depth 14 time 2009 nodes 740895 nps 368766 hashfull 22
info depth 14 time 2419 nodes 923516 score cp 26 nps 381748 hashfull 28 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6 b4c3 b2c3

info depth 15 time 2694 nodes 1067396 nps 396188 hashfull 33
info depth 15 time 3070 nodes 1229292 score cp 26 nps 400398 hashfull 38 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6 b4c3
info depth 16 time 3420 nodes 1384990 nps 404944 hashfull 42
info currmove e2e4 currmovenumber 1
info depth 16 time 6416 nodes 2612399 score cp 10 upperbound nps 407145 hashfull
83 pv e2e4 e7e5
info currmove d2d4 currmovenumber 2
info depth 16 time 8407 nodes 3648303 score cp 17 nps 433935 hashfull 115 pv d2d
4 d7d5 c1f4 g8f6 e2e3 c8f5 f1d3 f5d3 c2d3 b8c6 d1b3 a8b8 b1c3 e7e6 g1f3 f8d6 f4d
6 c7d6 a1c1
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 17 time 9721 nodes 4126184 nps 424436 hashfull 130
info currmove d2d4 currmovenumber 1
info depth 17 time 15449 nodes 7097339 score cp 21 nps 459377 hashfull 221 pv d2
d4 d7d5 c2c4 d5c4 e2e3 c8e6 b1a3 g8f6 a3c4 e6d5 g1f3 b8c6 f1d3 e7e6 e1g1 c6b4 c4
e5 b4d3 d1d3 c7c6
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 18 time 18234 nodes 8379794 nps 459567 hashfull 260
info currmove d2d4 currmovenumber 1
info depth 18 time 24765 nodes 11378413 score cp 25 nps 459447 hashfull 350 pv d
2d4 d7d5 c2c4 d5c4 e2e3 c8e6 g1f3 c7c6 e3e4 h7h6 e4e5 e6d5 f1e2 e7e6 b1c3 f8b4 e
1g1 g8e7 d1a4 b8a6
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 19 time 26663 nodes 12131753 nps 454994 hashfull 370
info currmove d2d4 currmovenumber 1
info depth 19 time 47599 nodes 22040298 score cp 22 nps 463034 hashfull 621 pv d
2d4 d7d5 c2c4 c7c6 c4d5 g8f6 b1c3 c6d5 c1f4 b8c6 e2e3 d8b6 a2a3 c8f5 b2b4 e7e6 g
1f3 a8c8 c3a4 b6d8 a4c5 f8c5
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 20 time 52282 nodes 24225314 nps 463349 hashfull 664
info currmove d2d4 currmovenumber 1



This is with the process started with elevated process priority:
Komodo TCECr 64-bit by Don Dailey, Larry Kaufman and Mark Lefler
using hardware POPCNT
info string Licensed to Danniel Corbit
uci
id name Komodo TCECr 64-bit
id author Don Dailey, Larry Kaufman, Mark Lefler
option name Ponder type check default true
option name Hash type spin default 128 min 1 max 16384
option name OwnBook type check default true
option name MultiPV type spin default 1 min 1 max 99
option name Book File type string default komodo.bin
option name Log File type string default <empty>
option name Clear Hash type button
option name ktabm open type spin default 10 min 0 max 20
option name ktabm end type spin default 12 min 0 max 20
option name UCI_AnalyseMode type check default false
option name Use Lmr type check default true
option name Null Move pruning type check default true
option name Best Book Line type check default false
option name Minimal Reporting type check default false
option name table memory type spin default 64 min 1 max 256
option name Threads type spin default 1 min 1 max 64
option name move overhead milliseconds type spin default 10 min 0 max 50000
option name Drawscore type spin default -7 min -200 max 200
option name time usage aggressiveness type spin default 0 min -9 max 9
uciok
ucinewgame
go infinite
info depth 1 time 27 nodes 20 nps 714 hashfull 0
info depth 1 time 30 nodes 21 score cp 63 nps 677 hashfull 0 pv e2e4
info depth 2 time 36 nodes 47 nps 1270 hashfull 0
info depth 2 time 41 nodes 155 score cp 39 nps 3780 hashfull 0 pv e2e4 d7d6
info depth 3 time 43 nodes 177 nps 4022 hashfull 0
info depth 3 time 48 nodes 300 score cp 39 nps 6245 hashfull 0 pv e2e4 e7e6 g1f3

info depth 4 time 53 nodes 352 nps 6636 hashfull 0
info depth 4 time 57 nodes 951 score cp 23 nps 16672 hashfull 0 pv e2e4 d7d5 d1f
3 g8f6 b1c3
info depth 5 time 62 nodes 1101 nps 17746 hashfull 0
info depth 5 time 65 nodes 1558 score cp 17 nps 23954 hashfull 0 pv e2e4 d7d5 d1
f3 g8f6 b1c3 c8g4
info depth 6 time 71 nodes 1992 nps 28040 hashfull 0
info depth 6 time 77 nodes 3390 score cp 33 lowerbound nps 44005 hashfull 0 pv e
2e4
info depth 6 time 83 nodes 4024 score cp 32 upperbound nps 48457 hashfull 0 pv e
2e4 d7d5
info depth 7 time 87 nodes 4335 nps 49804 hashfull 0
info depth 7 time 92 nodes 5699 score cp 22 nps 61933 hashfull 0 pv e2e4 d7d5 e4
d5 d8d5 b1c3 d5e6 f1e2 g8f6 d2d4 b8c6
info depth 8 time 99 nodes 6974 nps 70441 hashfull 0
info depth 8 time 108 nodes 9678 score cp 26 nps 89608 hashfull 0 pv e2e4 d7d5 e
4d5 d8d5 b1c3 d5e6 f1e2 e6g6 c3d5 g6g2
info depth 9 time 119 nodes 12441 nps 104508 hashfull 0
info depth 9 time 144 nodes 21431 score cp 17 nps 148779 hashfull 0 pv e2e4 d7d5
e4d5 g8f6 b1c3 f6d5 d1f3 e7e6 d2d4 b8c6 f1b5
info depth 9 time 173 nodes 31241 score cp 19 nps 180580 hashfull 0 pv d2d4 d7d5
c1f4 c8f5 b1c3 e7e6 g1f3 b8c6 c3b5 f8d6
info depth 10 time 199 nodes 36718 nps 184508 hashfull 1
info depth 10 time 226 nodes 45860 score cp 21 nps 202913 hashfull 1 pv d2d4 d7d
5 c1f4 c8f5 b1c3 e7e6 c3b5 f8d6 e2e3 g8f6 g1f3 d6f4
info depth 11 time 270 nodes 59892 nps 221779 hashfull 1
info depth 11 time 333 nodes 85664 score cp 18 nps 257210 hashfull 2 pv d2d4 d7d
5 c1f4 b8c6 b1c3 e7e6 c3b5 f8d6 f4d6 c7d6 e2e3 g8f6
info depth 12 time 526 nodes 161565 nps 307142 hashfull 4
info depth 12 time 821 nodes 283560 score cp 22 nps 345351 hashfull 8 pv d2d4 d7
d5 g1f3 g8f6 c2c4 e7e6 b1c3 b8c6 c1f4 f8d6 e2e3 d6f4 e3f4
info depth 13 time 999 nodes 368679 nps 369029 hashfull 11
info depth 13 time 1179 nodes 462353 score cp 19 nps 392134 hashfull 14 pv d2d4
d7d5 g1f3 g8f6 c2c4 e7e6 b1c3 f8b4 e2e3 b4c3 b2c3 f6e4 c1a3 b8c6 d1b3 b7b6 c4d5

info depth 13 time 1598 nodes 691823 score cp 24 nps 432905 hashfull 21 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6
info depth 14 time 1676 nodes 740895 nps 442037 hashfull 22
info depth 14 time 1957 nodes 923516 score cp 26 nps 471878 hashfull 28 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6 b4c3 b2c3

info depth 15 time 2186 nodes 1067396 nps 488260 hashfull 33
info depth 15 time 2420 nodes 1229292 score cp 26 nps 507944 hashfull 38 pv e2e4
e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 e8g8 f1c4 d7d6 e5f3 b8c6 d2d3 c8e6 c4e6 b4c3
info depth 16 time 2638 nodes 1384990 nps 524986 hashfull 42
info depth 16 time 4133 nodes 2612399 score cp 10 upperbound nps 632048 hashfull
83 pv e2e4 e7e5
info depth 16 time 5300 nodes 3648303 score cp 17 nps 688320 hashfull 115 pv d2d
4 d7d5 c1f4 g8f6 e2e3 c8f5 f1d3 f5d3 c2d3 b8c6 d1b3 a8b8 b1c3 e7e6 g1f3 f8d6 f4d
6 c7d6 a1c1
info depth 17 time 5772 nodes 4126184 nps 714822 hashfull 130
info currmove d2d4 currmovenumber 1
info depth 17 time 8907 nodes 7097339 score cp 21 nps 796782 hashfull 221 pv d2d
4 d7d5 c2c4 d5c4 e2e3 c8e6 b1a3 g8f6 a3c4 e6d5 g1f3 b8c6 f1d3 e7e6 e1g1 c6b4 c4e
5 b4d3 d1d3 c7c6
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 18 time 10455 nodes 8379794 nps 801465 hashfull 260
info currmove d2d4 currmovenumber 1
info depth 18 time 14159 nodes 11378413 score cp 25 nps 803571 hashfull 350 pv d
2d4 d7d5 c2c4 d5c4 e2e3 c8e6 g1f3 c7c6 e3e4 h7h6 e4e5 e6d5 f1e2 e7e6 b1c3 f8b4 e
1g1 g8e7 d1a4 b8a6
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 19 time 14831 nodes 12131753 nps 817953 hashfull 370
info currmove d2d4 currmovenumber 1
info depth 19 time 22773 nodes 22040298 score cp 22 nps 967813 hashfull 621 pv d
2d4 d7d5 c2c4 c7c6 c4d5 g8f6 b1c3 c6d5 c1f4 b8c6 e2e3 d8b6 a2a3 c8f5 b2b4 e7e6 g
1f3 a8c8 c3a4 b6d8 a4c5 f8c5
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 20 time 24875 nodes 24225314 nps 973866 hashfull 664
info currmove d2d4 currmovenumber 1
info depth 20 time 30516 nodes 31192685 score cp 23 nps 1022150 hashfull 780 pv
d2d4 d7d5 c2c4 c7c6 c4d5 c6d5 b1c3 g8f6 g1f3 b8c6 d1b3 e7e6 c1f4 f8e7 e2e3 e8g8
f1e2 f6e4 e1g1 e4c3 b2c3 g7g5
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20
info depth 21 time 37153 nodes 33945441 nps 913643 hashfull 816
info currmove d2d4 currmovenumber 1
info depth 21 time 72623 nodes 76396629 score cp 26 nps 1051948 hashfull 993 pv
d2d4 g8f6 c2c4 d7d6 g1f3 c8f5 d1b3 d8c8 b1c3 e7e6 f3h4 f5g6 d4d5 e6d5 c3d5 f6d5
c4d5 f8e7 h4g6 h7g6 e2e4 e8g8 f1d3 b8d7 c1e3
info currmove e2e4 currmovenumber 2
info currmove e2e3 currmovenumber 3
info currmove d2d3 currmovenumber 4
info currmove b1c3 currmovenumber 5
info currmove g1f3 currmovenumber 6
info currmove b1a3 currmovenumber 7
info currmove g1h3 currmovenumber 8
info currmove c2c4 currmovenumber 9
info currmove b2b3 currmovenumber 10
info currmove g2g3 currmovenumber 11
info currmove b2b4 currmovenumber 12
info currmove g2g4 currmovenumber 13
info currmove a2a4 currmovenumber 14
info currmove h2h4 currmovenumber 15
info currmove c2c3 currmovenumber 16
info currmove f2f4 currmovenumber 17
info currmove f2f3 currmovenumber 18
info currmove a2a3 currmovenumber 19
info currmove h2h3 currmovenumber 20


Depth 20 NPS = 1022150 verses 463349 NPS with normal priority.
That ratio is 2.2 to 1, which is similar to the problem with senpai.

Re: C++11 threads seem to get shafted for cycles

Posted: Wed Mar 19, 2014 4:39 am
by mjlef
I did some experiments on my laptop running a recent version of Komodo normally via a command line and using the start command. I did a simple "go depth 16" command with all these results. Note this is a typical ultrabook, not noted for speed:

just starting from command line by typing the program name: 777415 nps
start /HIGH program name: 802644 nps
start /REALTIME program name: 803250 nps
start /normal program name: 787391 nps

biggest speed difference 3% (command line startup without "start" versus realtime).

I am not seeing the high swings reported on openchess, but will try to do some more experiments on some other machines. I suspect whatever machine was used is running some time consuming processes in the background. Also, based on some quick skimming of Windows documentation, realtime priority is not recommended since it can stop the machine from responding to mouse moves and keyboard input--it is reserved for realtime processing things that are super time critical.

results were on a dual core laptop. I will try some other machines when they are booted up in Windows.