News for hackers. Stuff that matters.
Re:You Don't Know Jack about Application Performance by ComputerGuru on Monday July 24, 2023 @02:53PM (#36852679)
This article seems like it was applicable circa 2006 but not in 2023. With asynchronous request handling (non-blocking request processing), you cannot reliably calculate the "processing time" of a single request since it is only actively being serviced (and therefore preventing another request from being serviced) for a tiny fraction of the total time.

(The exception being for a request that requires no asynchronous handling from the point the GET is received on the server to the point the first byte is written to the response, but that's rarely the kind of request that's ever a bottleneck in the first place since it's basically limited to just static html.)

Re:You Don't Know Jack about Application Performance by ndriscoll on Monday July 24, 2023 @09:57PM (#36856910)
You can pause your timer while awaiting an async block, or start a secondary timer/span and measure the async part too (which you can then subtract out).

You can also benchmark portions in isolation. E.g. measure your application with the database mocked, and measure the database without your application. I've found that for example if my application can handle ~100k requests/second with the db mocked, and the db can handle ~300k updates/second, then I might expect to handle 1/(1/100000+1/300000) = 75k requests/second (assuming the same machine so they contend for CPU time). In practice, I've measured ~70k/second for the combined system, so the linear scaling calculation is mostly accurate.

Re:You Don't Know Jack about Application Performance by ynniv on Tuesday July 25, 2023 @09:12AM (#36861697)
All systems respond the same way eventually. Keep multiplying your load by ten and you'll see them.
Re:You Don't Know Jack about Application Performance by ComputerGuru on Tuesday July 25, 2023 @02:35PM (#36867201)
Yes but the premise of the article is that you don’t need to test under load (i.e. benchmark) - only accurately measure the time it takes to fulfill a single request.
Re:You Don't Know Jack about Application Performance by ynniv on Tuesday July 25, 2023 @03:17PM (#36867883)
You measure the things that block, to predict when they will queue. Your async dispatcher still takes time per request. The resources that each request needs will eventually be exhausted. Your network interface isn't infinitely fast. Identify these, measure them, and you'll have a decent chance at predicting some of the problems you'll run into as things scale.