Skip to content

Performance is poor when bothing cores on multiple chiplets #470

Description

@kuro68k

This is an issue that affects Raw Therapee as well. I am testing ART 1.26.3.

When running ART normally, performance is quite poor. Some tools in particular are extremely slow. Dynamic Range Compression can take a minute to run on an Ryzen 7900X, for example.

If I limit ART to use the cores on just one chiplet, performance is vastly improved. Dynamic Range Compression takes a couple of seconds max. Other tools are faster as well.

In case you are not familiar with how Ryzen CPUs are built, they use 8 core "chiplets". These are single chips with 8 CPU cores on them. My CPU has two of these, each with a couple of cores disabled (probably because they failed testing at the factory), for a total of 12 cores (2x6). The two chiplets sit side by side on the CPU carrier, and talk to each other over an internal bus.

The problem is that this bus severely limits performance when CPU cores from both chiplets need to access the same data. They have to coordinate and arbitrate access, keeping cache synchronized, managing access to RAM, and so on. A lot of high performance software is aware of this, and most operating systems provide a mechanism to limit software to a single chiplet on request. On Windows they are called Processor Groups and apps can set affinity with them. The groups are based on NUMA groupings, which is basically which CPU cores share local memory (cache) and thus don't have to take extra steps to keep everything synchronized.

To reproduce, run ART on a similar system, basically any Zen 4 or Zen 5 Ryzen CPU with at least 12 cores, on an OS that does not limit apps to one processor group my default, such as Windows 11. Measure performance, and then limit ART to half the cores (on Windows, use Task Manager, Set Affinity, and select the first half of all the total cores), and then measure again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions