I want to install linux on my new computer that has dual Intel Xeon processors. I would like to have a distro that can help optimise the performance and the use of both of the cpus. Some of the candidates that I have looked at are cachy os which seems to have more out of the box performance optimisations, and gentoo which allows you to compile programs for two cpus with a flag. What would be the most daily driver friendly way to use the two cpus with linux. I have been using linux for around 2 years so I am comfortable with the terminal and more complicated distributions.
The linux kernel has had SMP support since the 90s. Any distribution you pick will have this support. You might try playing with the various scheduler options by compiling your own kernel. Having used both gentoo and archlinux in the past, I’d recommend starting with something with prebuilt packages and look at the documentation on recompiling the kernel for your needs. Look at the various optional schedulers. This archwiki entry will be pretty close to what you need on Cachy https://wiki.archlinux.org/title/Kernel/Traditional_compilation . These are the scheduler options https://docs.kernel.org/scheduler/index.html . I think that most kernels use the CFS scheduler these days, but I could be misremembering.
Optimize performance for what?
Seriously. This is the question you need to answer.
Dual xeon sounds like you have some kind of server motherboard with two distinct multicore xeon processors. Which would make your question partially make sense because your memory would be split into two NUMA nodes and cause all kinds of weird issues for generic workloads.
Usually these servers run specialized software that is implemented to handle this case, but generic software (browsers, games) does not. Just recompiling and choosing a distro will not solve your issues. You are probably better off disabling one cpu and numa node or configuring them to not run, to avoid the data split.
If you want to optimize for server workloads for server software (webserver, db software) then a good and stable server distro is all you need (debian, almalinux).

