News for hackers. Stuff that matters.
Re:Time Series and FoundationDB (2019) by foobiekr on Saturday May 28, 2022 @12:33PM (#31541643)
Basically in an ideal system you are only bound by hardware limits.

memory bandwidth bound

memory size bound

cache hit rate and bandwidth bound

TLB size bound

CPU decode and issue logic bound

CPU renaming / OOO buffer bound

kernel implementation bound (esp. locks, interrupts,...)

network physical layer bound

GPU/TPU bound (which are variations of the above, though mostly memory)

power and cooling bound

...

... so basically unless you're running out of functional units, you're hopefully I/O bound depending on where you consider i/o.

But in reality, most SW is just "crappy SW making poor use of resources bound." That's where we mostly are now as an industry. Bad language choices, terrible design, no cross-layer comprehension.

Re:Time Series and FoundationDB (2019) by legulere on Saturday May 28, 2022 @02:10PM (#31542433)
Having enough computing power to be able to write crappy software is an enormous productivity boost. Writing software with crappy performance is way easier than writing software with good performance and takes less time and less experienced developers. Writing crappy software is often better at achieving business goals as cheap as possible.
Re:Time Series and FoundationDB (2019) by jiggawatts on Saturday May 28, 2022 @05:27PM (#31544032)
There was a post (here?) about how Netflix uses NICs that offload TLS encryption because that’s literally the only way to hit 200 Gbps. It’s not that the CPUs can’t encrypt that fast — the limit is the memory bandwidth.

I see some clouds deploying servers with 100 Gbps NICs and I wonder what percentage of deployed applications could get anywhere near that…

Re:Time Series and FoundationDB (2019) by javajosh on Saturday May 28, 2022 @12:47PM (#31541766)
>But in reality, most SW is just "crappy SW making poor use of resources bound."

I agree, but the number one culprit is premature distribution, thanks to the widely pervasive cargo culting Amazon-style microservices.

Re:Time Series and FoundationDB (2019) by aserafini on Sunday May 29, 2022 @01:09AM (#31546583)
I often think about this. We have 100s of services running on 1000s of servers and 10,000s of containers but I wonder how much of that is ‘waste’ in the sense that we are running 10,000x Operating Systems, 100s of load balancers, database per service/region etc.

Seems possible that horizontal scaling at every layer can be wasteful, but the alternatives are hard for me to even conceive.

Re:Time Series and FoundationDB (2019) by javajosh on Sunday May 29, 2022 @12:27PM (#31550385)
Regarding container processes, it depends on how your containers are written. In the best case, each process is not so much an OS as a kernel instance - a kind of poor man's unikernel. It's an extremely stateless process that requires the bare minimum of the physical host.

The overhead that concerns me more is messaging. A network of N nodes has N! paths. In the general case it doesn't take long before the overhead of internal messaging absolutely dominates all other processing in the steady-state. Most people take a brute force approach of partitioning the network on purpose, or even intentionally bottle-necking (again) all the traffic. What's really hilarious is when you see people architecting microservices with kafka and apogee with all the uservice trimmings, only to deploy everything to a single physical rack, or even a single beefy machine.

I feel like the proper path to scalability goes through repeated breakage, because then you get to see how things actually break under load, and what can be done to fix it. For example, you can do a lot by moving logic to stored procs, or equivalently, moving your db into your application process. But people seem to think these are non-starters, for some reason, probably because the notion of stateless app servers as the key to horizontal scalability has become a Law, even though there are alternatives. But good luck questioning foundational assumptions - the risk is just too damn high.

Re:Time Series and FoundationDB (2019) by DSingularity on Saturday May 28, 2022 @02:14PM (#31542454)
“Cross layer comprehension” - what is that? Wanna move computation to the NIC ?
Re:Time Series and FoundationDB (2019) by foobiekr on Saturday May 28, 2022 @05:49PM (#31544182)
It is useful to understand the underlying layers so as to take advantage of what they are good at and not end up in the position of relying on operations where they perform badly.

"What is are the natural, performant operations for the layer below me? How can I construct my solution from these operations instead of pretending the layers are orthogonal?"

A good example would be the linear read/write performance of harddisks. If you had the option to avoid random access and take advantage of read-ahead and other methods you'd have seen much better performance than an approach that ignored this behavior.

There are many, many examples of this.

Re:Time Series and FoundationDB (2019) by astrange on Saturday May 28, 2022 @05:55PM (#31544224)
That is a good idea and we do that. (TSO/LRO/TLS offload)