Skip to content

Performance depends on number of 'setoption Threads value X' commands #6516

@vondele

Description

@vondele

Describe the issue

The following two invocations:

printf "setoption name Threads value 288\nsetoption name Threads value 288\nspeedtest 288 36864 15\nucinewgame\n" | ./stockfish.master

and

printf "setoption name Threads value 288\nspeedtest 288 36864 15\nucinewgame\n" | ./stockfish.master

give different performance. An even number of setoption commands results in good performance, and odd number in bad performance. The difference is most visible on multisocket numa systems:
e.g.

Nodes/second               : 228918174

vs

Nodes/second               : 266462375

It is not a recent issue, as it was also present in SF 17.1

Expected behavior

same performance independent on the number of calls

Steps to reproduce

printf "setoption name Threads value 288\nsetoption name Threads value 288\nsetoption name Threads value 288\nspeedtest 288 36864 15\nucinewgame\n" | ./stockfish.master

Anything else?

No response

Operating system

Linux

Stockfish version

master, SF17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions