6 ms·
> Modern CPUs and ram are obscenely, incomprehensibly fast. With the exception of a few very specific tasks, you should never be waiting for a modern computer t
by bob1029 5y ago
> Modern CPUs and ram are obscenely, incomprehensibly fast. With the exception of a few very specific tasks, you should never be waiting for a modern computer to do anything.
I really wish we could drive this point home for everyone. The amount of work you can get out of 1 x86 core is insane if you know how to feed it properly. The upper bound is somewhere around 500 million transactions per second per core. I have personally built systems that can achieve somewhere around 14 million per second.
If you can reliably handle the entire serialized workload on a single thread you start to retool for the idea that you can fit the entire business in 1 box.
Being able to run everything out of a single computer is an incredible virtue, not some curse that must be cast to the clouds.
- DaiPlusPlus 5y ago> 500 million transactions per second per core. An instruction is not a transaction. Commodity x86/x64 systems do not implement transactional memory or any model of computation that could be reasonably described as transactional as far as I'm aware.
- bob1029 5y agoI'm not referring to individual instructions. I'm talking about actual useful changes to business state.
- ben-schaaf 5y ago500 million instructions per second can be achieved on a pentium pro from 1995, modern CPUs run many orders of magnitude faster than that.
- sdevonoes 5y ago> Being able to run everything out of a single computer is an incredible virtue, not some curse that must be cast to the clouds. Isn't the problem then: what happens when take computer goes down? I'm also on the side of "know your hardware", but the topic of resilience is a different one. Also, perhaps you didn't mean "single computer" in the literal way: it's not incompatible with avoid the cloud, though.
- withinboredom 5y agoI built a production grade cluster for fun. It’s only three nodes… without anything installed on my 40 core cluster, except k8s and longhorn, it’s idling at 30% cpu usage. When I started up a managed cluster on Azure, I was throwing hundreds of euros at their logging storage just idling, so I noped to bare metal.
- KronisLV 5y agoThis mirrors my experience with K8s, though one can suggest that the software running on the cluster also played a part in it. Have you looked into K3s or other lightweight distros of Kubernetes, though? https://k3s.io/ https://k3s.io/ That's what i turned to when i needed to learn the Kubernetes API and explore running clusters, but didn't like my small VPSes (~4 GB of RAM) failing to launch anything because of the frankly insane resource usage of full K8s clusters.
- bob1029 5y agoI did mean single computer in terms of 1 active primary machine at any given time. Negotiate the advantages of this architecture with the business. For the systems I've built, synchronous log replication is a natural extension of the performance abstraction, and provides fairly robust protection when some manual intervention is allowed.
- gjulianm 5y agoA good thing with "single computer" is that you have less complexity going into it so failures will be less frequent. For a lot of cases, that will be enough. It's also easier to build a resilient system starting from a single machine than from a cluster: less components to replicate to ensure they're redundant.
- jiggawatts 5y agoSomething I've been telling customers for years is: I would rather have a standalone SQL Server Standard Edition instance on VMware than an Enterprise Edition cluster on anything. Simple means that there's less things to break. This isn't just academic. My experience with clusters is that the clustering itself causes more problems than it solves. (Don't think this is somehow isolated to Windows. ZooKeeper will refuse to start after a power outage for no discernible reason. Etc...)
- moeris 5y agoMost applications are IO bound, not CPU bound. So wasted cycles aren't always that big of a deal.
- BeefWellington 5y agoWhile this is most certainly true, I'm willing to bet the ratio between them has dropped substantially in recent years.
- NohatCoder 5y agoMost applications do far more IO than what is necessary for the task. Anyway with a modern SSD I don't think you are right. My disk can do something like 3 GB/s and 100k random accesses per second. At that rate most desktop programs should have the binary and all dependencies loaded to memory in approximately 0.1s. That seemingly doesn't stop a lot of them from taking several seconds to boot. Likewise games, despite usually consuming less than 10 GB of video and main memory combined, can take much longer than 3.3s to load.
- kaba0 5y agoThough that includes possibly decompression, parsing, and more importantly loading data to the GPU and even compiling shaders.
- NohatCoder 5y agoDecompression is fast if you do it right (using anything from the Oodle pack is a good first step towards doing it right). Hopefully a game doesn't need to parse a whole lot of things, however stuff needs to appear in memory, it can be stored that way on disk, possibly compressed with aforementioned fast compression libraries. There is nothing special about loading data onto the graphics card, if you know what you are doing it is just copying data, and no point on the path is slower than disk. I know there are games that somehow rely on thousands of shaders. Like most games you can just not do that, or you can store the compiled shaders so that the compilation only needs to be done on first run.
- 5y ago
- sokoloff 5y ago> The upper bound is somewhere around 500 million transactions per second per core. What’s the definition of transaction here? That’s a transaction for every ~6 (peak ~10) clock cycles. https://www.agner.org/optimize/instruction_tables.pdf https://www.agner.org/optimize/instruction_tables.pdf
- bob1029 5y agoTransaction in this context being "Place order", "Cancel order", "Update user settings", etc. We need to remember there isn't a 1:1 relationship between instruction/clock rate and the number of actual instructions that are retired per unit time. Pipelining and ILP allow for speedups that range anywhere from 1-100x depending on the specific flavor of application.