I'm confused. What is the difference between FCLK, UCLK, and infinity fabric frequency? What is the optimal memory speed for Ryzen 7000 and 9000?
FCLK is the infinity fabric clock. It's the frequency of the bus between the cores and the memory interface. MCLK is the actual memory clock speed. UCLK is the "uncore" clock (I think that's the correct term) or the clock of the memory interface, not the clock of the memory or the cpu cores. You want to keep MCLK and UCLK 1:1, assuming you're not chasing DDR5-8000. In the case of 8000, you want 2:1 MCLK:UCLK because you would never be able to hit 4000 UCLK. I think in 2:1 mode the infinity fabric is synchronized with UCLK, so if UCLK is 2000 then FCLK has to be 2000, which is not the case in 1:1 mode.
The buildzoid video above that I linked is a good explainer of what the clocks are and what good target fclk is for each. It seems like 3:2 UCLK:FCLK is a good ratio and if you want to push FCLK even higher it'll probably have to be 100MHz higher to get any real benefit.
So for:
DDR5-6000 - 3000:3000:2000 MCLK:UCLK:FCLK, or 3000:3000:2100
DDR5-6200 - 3100:3100:2066 MCLK:UCLK:FCLK, or 3100:3100:2166 (fclk 2166 is not necessarily going to work)
DDR5-6400 - 3200:3200:2133 MCLK:UCLK:FCLK or 3200:3200:2233 (fclk 2233 is pretty rare, so 2133 is a better target)
DDR5-7x00 - these are not really worth it because UCLK is less than 2000, which will increase latency over just going with 6x00 speeds
DDR5-8000 - 4000:2000:2000 MCLK:UCLK:FCLK ... no alternative for FCLK here that won't kill latency
DDR5-8200 - 4100:2050(?):2050(?) MCLK:UCLK:FCLK ... no alternative for FCLK here that won't kill latency
DDR5-8400 - you're dreaming
DDR5-6400 is not easy to hit, because 3200 UCLK is not necessarily going to work for your CPU. DDR5-6000 should be rock solid with a DDR5-6000 kit for Ryzen. 6200 is maybe the sweet spot overclock that should be achievable with a good 6000 memory kit.
MCLK is easy at 3000, 3100, 3200. At 4000 you start hitting MCLK issues and motherboard quality matters a lot.
UCLK gets unstable at 3200. UCLK requires increasing Vsoc.
FCLK is probably stable up to 2100 (usually) and seems to not like high Vsoc.
UCLK is more important than FCLK. So it's better to try for say DDR5-6200 with 2066 FCLK than DDR5-6000 with 2100 FCLK.
Seems like the order is MCLK:UCLK with FCLK at 3:2 ratio to UCLK. Get that stable. Tighten memory timings. Make sure that's stable. Try for FCLK at +100 MHz (likely won't work over 2200) and get that stable, or fall back to 3:2. Then undervolt/overclock cpu cores. And do final stability.