http://mailinator.blogspot.com/2012/08/your-bottleneck-is-de...
Is that a fact? I'm not sure anyone has ever shown numbers to back it up. It would be an interesting piece of work to do. I can imagine it's true, but I'm not certain.
I think Rap Genius did a blog post ages ago about being hosted on Heroku, and they said that something like 70% of time was spent inside the Ruby interpreter, not waiting on IO. So modest improvements in the speed of Ruby will have an impact on their bottom line.
What? I've seen tons of profiling posts and articles showing just that thing, and it's the same thing I've also seen forever on my servers' stats. I'm obviously talking about the majority of web apps that are using DBs and doing some kind of CRUD work -- not video processing services et al...
Is that non-typical? Or am I mis-interpreting the graph? (Genuine questions, I've never done any web app operations.)
From the article the slowness is when "a dyno is tied up due to a long-running request" -- so, we they are probably still talking about slow IO operations, and servers running on the dyno that are not async to free it up in between.
From Heroku's one optimization page: "Most applications are not CPU-bound on the web server".
https://devcenter.heroku.com/articles/optimizing-dyno-usage
(And Heroku might be an outlier in having high real-cpu use too, as they tend to over-provision).
So if the IO isn't web requests, cache, database or waiting in a queue, what can the interpreter be waiting on? Local files?
In general it's a useful idea that you're likely to be IO bound, because most of the time when something in a new webapp is too slow, it will be database (it may be a small fraction of overall requests, but the ones that hurt) until you have optimized/cached away your database request and are trying to scale further.
Basically once you've solved the "naive"/early database bottleneck, then CPU and memory very quickly becomes more likely to be a cost factor.
For example, there's a painfully slow web application at my company that puts data on a page by doing a straightforward select from a database, and then running lots of nested loops over the data to render the page. It's definitely CPU-bound. If it was written to use a more powerful query, or to use more sophisticated algorithms, it would be a lot faster, and would probably be IO-bound. But it isn't.
That said, in my experience this has been the case when it comes to handling HTTP requests.
This can speed requests up but more importantly it allows you to more easily scale out horizontally.