I know CPU is faster at physics stuff than GPU but generally GPU is faster for most things.
GPUs are faster at data-parallel problems, which is not most things.
Then why are a lot of render farms using large 32 thread Xeon based systems rather than large GPU based systems?
There are many reasons:
Software:
Almost all software is written to run on CPUs, only a few specialized programs are written for GPUs. GPU programmers are harder to find, all the tools are worse and therefore those already expensive programmers will be less productive. Writing software for GPUs is a pain in the ass. Writing complex software for GPUs is a nightmare. Case in point: It’s been almost ten years since GPUs became general-purpose accelerators, but not a single existing rendering engine has been ported over to the GPU with all features intact.
Reliability:
GPUs usually run on proprietary drivers, which are black boxes. Especially the drivers by AMD have a poor reputation. If the drivers fail to run your code, you’re out of a luck as a programmer. The tools to inspect errors are worse, so you’ll run into situations where you don’t know if the driver fucked up or if the code is wrong. GPU code is much easier to get wrong, too. You have to test your code on multiple GPUs by multiple vendors, if you want to be cross-platform (in practice, often only NVIDIA GPUs are supported).
Scalability:
Dealing with memory on the GPU is much more constrained, many programs (like Cycles) will just fail outright if physical GPU memory is exceeded. Those GPUs with the most RAM (24GB as of today) are prohibitively expensive, yet fall short of what you can have for CPUs.
Is a 32 thread 16 core system faster than a top of the range GPU?
It depends. There are scenes that render much worse on GPUs than on CPUs. See the BI benchmarks for a broader comparison. Generally, scenes that are less complex (especially in terms of shaders) can have a significant speedup on the GPU. The best use case is probably tweaking materials in isolation from a bigger scene.
If you want to do serious work, go with the CPUs. They’re much less likely to fail you when it matters (assuming they’re intact). Besides budget, there’s no reason to not have a good GPU (or two) in your workstation, though.
DDR3 ECC RAM is actually cheaper than non-ECC RAM right now, but even DDR4 ECC is not that much more expensive.
Why would anybody assign memory per thread? It may make sense to assign memory per CPU due to NUMA, but I’m not aware of any renderer doing that, either. Cycles certainly doesn’t. CPUs are always more cost-effective when it comes to RAM (amount), because DDR ram is cheaper than GDDR ram.