5 ms·
(FB employee, tangentially related to this stuff) Everyone, including myself, casually uses the term "CPU-bound", "I/O bound", "Memory-bound" for convenience bu
by aristus 14y ago
(FB employee, tangentially related to this stuff) Everyone, including myself, casually uses the term "CPU-bound", "I/O bound", "Memory-bound" for convenience but the truth is usually more complex. You might actually be CPU-instruction-cache-bound or memory-latency-bound. One app I worked on a long time ago turned out to be random-numbers-bound. :)
In this context boundedness means roughly "the thing that would increase throughput if we had relatively more of it". A pizza shop is going to be fundamentally "oven-bound", because everything else from employees to counter space can be increased more easily than the size of the oven.
Waiting on outside I/O (databases) does not mean that a webserver is I/O bound. The system as a whole might be I/O bound, but not the web layer. Threads stuck waiting for dataz are just put to sleep and others take over the CPU.
- voltagex_ 14y agoWere you running out of entropy? If so, how did you solve it? (If you're allowed to divulge that)
- aristus 14y agoWith a Heisenberg Compensator! No. Like with any bottlenecked resource, you first measure how much you are using per "transaction", whatever that may be. Then you see whether you can use what you have more efficiently. Maybe you don't need it at all. Or maybe you can cut corners by using /dev/urandom or something. But suppose you are generating tons of SSL certificates. You can't --or shouldn't-- cut corners. For example, see https://freedom-to-tinker.com/blog/nadiah/new-research-theres-no-need-panic-over-factorable-keys-just-mind-your-ps-and-qs/ https://freedom-to-tinker.com/blog/nadiah/new-research-there... So... what do you do? The problem, like almost any bottleneck problem, isn't that you don't have "enough" of the resource, it's that the resource is out of balance with the other resources like CPU or RAM. When you think about it that way a lot of possibilities open up, like installing special cards or dongles that generate entropy, or by buying lots of lower-powered devices that have more entropy relative to their CPU throughput.