4 ms·
Matters for whom? For a lot of use cases (web servers, compiling, databases...) having lots of cores matters (and total = performance of core * number of cores
by ido 7y ago
Matters for whom? For a lot of use cases (web servers, compiling, databases...) having lots of cores matters (and total = performance of core * number of cores), for others it doesn't.
- globular-toast 7y agoNo, it does not matter. That's a common misconception. If you double your core count you can run double the number of threads in the same amount of time. That's it. If you double your single core speed you can still run double the number of threads in the same amount of time or the same amount of threads in half the time. Single core performance is always preferable for CPUs. The CPU manufacturers basically conned everyone into thinking multi-core was "good enough". Software people who knew what they were talking about back in the day called them out on it but nobody listened. Now here we are on Hacker News in 2020 and people still not understanding this.
- gpm 7y agoWe all know that a single core with twice the performance and twice the cache space is generally better than two cores (though a sibling comment does raise a good point that poorly written software can lock up an entire core regardless of it's Hz, also some VM scenarios would prefer extra cores over faster cores). We also all know that a single core with twice the performance and twice the cache space costs a lot more than two cores. It's a lot more expensive than even 3 cores. I'd rather have 3 4Ghz cores than 1 8Ghz core (except for the novelty value).
- yjftsjthsd-h 7y agoWe all know that a single core with twice the performance and twice the cache space is generally better than two cores I'm not sure that's actually true, even if you want performance (although it's dependent on whether your workload can use more than 1 thread, of course): A single core at a higher clock speed might be better if it can hold that clock speed. But the faster you run, the more power you use and the more heat you produce, and worse, the relationship isn't linear. So ex. 1 core at 4ghz won't stay at 4 ghz, where 2 cores at 2 ghz can hold that speed forever.
- gpm 7y agoRight, when I say an xGhz core I'm pretending to live in a simpler world where they can all hold that speed forever. Consider an 8Ghz core to be a core + cooling that can consistently hold a speed twice as fast as the 4Ghz core + cooling can hold.
- globular-toast 7y ago> We also all know that a single core with twice the performance and twice the cache space costs a lot more than two cores. It's a lot more expensive than even 3 cores. I'm a programmer, I don't care how much it costs the hardware manufacturer. I want a single core. Multi-threaded programming sucks. I don't care if that's implemented via multiple cores acting together and only presents itself as a single core. I just want a single core. > I'd rather have 3 4Ghz cores than 1 8Ghz core (except for the novelty value). I'd much rather avoid multi-threaded programming and get the 8GHz core. But your comment is missing the point, really, which is that single-core performance matters. If the 8GHz core existed then you'd still be able to get 3 8GHz cores. Still want the 3x4GHz?
- gpm 7y ago8Ghz cores do exist if you have enough money to hire someone to deal with the overclocking for you (or enough liquid nitrogen and time to do it yourself). I, on the other hand, care about the cost of my computers a bit more than that, not having infinite money. Which is why even if 8Ghz cores were commercially available I suspect I would still be buying 3 times as many 4Ghz ones.
- blattimwind 7y agoA Bulldozer FX barreling down the highway at over 8 GHz is actually still slower than any modern CPU at less than half the clock speed. The latter also doesn't require LN2 cooling and doesn't draw more than 100 W for a single core.
- zrm 7y ago> If the 8GHz core existed then you'd still be able to get 3 8GHz cores. Well no. Right now you can get ~5GHz cores and they draw close to 300 watts per core, which is why they can't run all cores at 5GHz on threaded programs. For the same amount of power as one core at 5GHz you can get 64 cores at almost 3GHz, e.g. ThreadRipper 3990X. An 8GHz core would presumably draw 500+ watts per core and maybe even a lot more than that. To get the same performance as the 3990X, you would either need a single 185GHz core (basically impossible) or >23 8GHz cores (expected power draw >11kW). That would cost thousands a year in electricity, but a normal 20 amp household circuit breaker would trip before you hit 2.5kW anyway. More than that, by the time you write code that can scale to 16+ threads, 64 isn't that much harder, and 256 isn't much harder than that. So get used to it, because in a few years there are going to be 256-core mobile devices and 1024+ core desktops and servers.
- sk0g 7y agoSo say I'm close to maxing out my 8c/16t CPU, would a better alternative be a 16*4; 64Ghz single core processor? Why? You wouldn't have true parallelism then, would you? So if you have something, for whatever reason, blocking further processing, the entire computer would lock up. Why is this a better scenario again?
- globular-toast 7y agoYou don't care about parallelism, you care about concurrency. Operating systems have handled that just fine for many decades now.
- paulmd 7y ago> You wouldn't have true parallelism then, would you? So if you have something, for whatever reason, blocking further processing, the entire computer would lock up That doesn't occur because the OS scheduler will eventually pre-empt your thread and swap to another task. You don't really have control over that. All modern OSs use pre-emptive multitasking and there's not a ton you can do to prevent it. (read: anything in the last 30 years, last cooperative multitasking I remember was MacOS Classic (probably like OS7 or so.) Single-core processors were the norm up until 15 years ago, and people routinely ran more than one process on them. Yes, we ran Discord (we called it Roger Wilco or Teamspeak back then) and played music in the background too, without 4 dedicated cores for the background tasks. Yes, in the abstract it would be preferable to have a 64 GHz processor instead of 16 4 GHz processors, because then you can have all that speed devoted to a single task. Context switching is not that expensive (particularly if you have hyperthreads/SMT to soak up the wasted cycles). The physics of transistors make that impossible, but we absolutely would not do any of this multithreading crap if we didn't have to. Single-threaded code is easier to write and usually faster (in terms of less total cycles - multithreaded programs waste extra cycles on synchronization, overhead, spinning for locks, etc that single-threaded programs don't have to).
- theandrewbailey 7y ago> (read: anything in the last 30 years, last cooperative multitasking I remember was MacOS Classic (probably like OS7 or so.) I remember reading about that a while ago. Wasn't everything up to and including Mac OS 9 cooperatively multitasked?
- ben-schaaf 7y agoTurns out this has been tested, and the results are clear: Running a single core 9900k is pretty bad in comparison to 8 heavily downclocked cores on the same CPU. While single threaded tasks are obviously slower, frame rates are much more stable, windows is more usable with 8 cores. Several games simply didn't work with a single core, or took ages to load. Reference: https://youtu.be/feO54CBUJCk https://youtu.be/feO54CBUJCk
- tylerhou 7y agoThe video you linked is pretty weak; there was (understandably) no performance tuning done on both configurations (Windows scheduler, game scheduling). https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/36448.pdf https://static.googleusercontent.com/media/research.google.c...
- SomeoneFromCA 7y agoThis is because for a fair comparison you need to scale the L1/L2 cache size as well. More cores - more cache. It is also important to not scale below 2 cores, because servicing interrupts causes performance hiccups. It is enough to have the second core heavily downclocked, and you'll still have better performance then with just a single core.
- madushan1000 7y ago> same amount of threads in half the time Sure, if you forget all the additional cache evictions, memory reads and writes and TLB flushes caused by all the competing threads on a single core. Not to mention that one shitty bit of code in one thread can poison the cache enough to re-read the data from memory every context switch.