4 ms·
That's not how it works, Amdahl's law is about the execution speedup you get by splitting a task across multiple cores, it is not about how many tasks you can r
by ajnin 6y ago
That's not how it works, Amdahl's law is about the execution speedup you get by splitting a task across multiple cores, it is not about how many tasks you can run simultaneously on those cores, usually when we're talking about horizontal scaling what is meant is multiple servers executing tasks independently, not parallelizing the execution of individual tasks, which is a much harder problem with the issues you describe.
- smarx007 6y agoSo what you are saying is that because Fugaku supercomputer has 158,976 nodes, it's "horizontally distributed" and Amdahl's law does not apply to it but only to the 48 cores on each node? A task that we have (if we want to formalize it for analysis via Amdahl's law) is to process 1MM requests on 1000 web servers and a single SQL server behind them. What we are after is how much faster can this setup process 1MM requests compared to a setup with 1 web server and 1 SQL server (1 SQL server is used here to exemplify the sequential part of the request handling). Indirectly from this calculation you can derive the increase in overall system RPS after you run a benchmark actually pushing 1MM requests through 1000 servers vs 1 server. If you have a line of code `sqlUpdateTransaction.commitBlockingWait()`, and it takes 1% of your request handler execution time, then even if you add 1000 web servers but have only 1 SQL server machine behind them (a little bit oversimplifying here as contention is likely to degrade performance further, assume we are able to scale the SQL vertically just so that the call above always takes 1% of the request handler time for the sake of simplicity), your system will not process 1MM requests more than 91x faster than a setup with a single web server and a single SQL server. See https://www.wolframalpha.com/input/?i=1%2F%28%281-0.99%29%2B0.99%2F1000%29 https://www.wolframalpha.com/input/?i=1%2F%28%281-0.99%29%2B.... And no amount of green threads will allow you to outsmart the Amdahl's law. The only thing you can do is to return 200 OK before the transaction is committed, which would bring sequential part of the handler code from 1% to (nearly) 0% (and arguably be an unacceptable method of performance optimisation).
- CyberDildonics 6y ago> And no amount of green threads will allow you to outsmart the Amdahl's law. The only thing you can do is to return 200 OK before the transaction is committed, Ignoring all the wild assumptions and made up numbers here, this again has nothing to do with Amdahl's law because the "serial" part is unnecessary synchronization and waiting, not unavoidable serial computation. If you have a thousand web servers, having all of them wait to sync would be the exact thing anyone spending millions on servers would work to avoid. To start at the obvious bare basics, if only one computer can sync at one time, you might as well just use one computer. Computers are queues and buffers all the way down and all the way up to the network level. A single computer or core merging data is not Amdahl's law. There is no reason computation resources have to wait on some other resource synchronizing, and this is not serial computation, which is what Amdahl's law is about.