rust-lang / rustc-perf

Website for graphing performance of rustc
https://perf.rust-lang.org
632 stars 148 forks source link

Website performance #1725

Open theotherphil opened 1 year ago

theotherphil commented 1 year ago

Viewing graphs on perf.rust-lang.org often takes a long time, seemingly mainly spent waiting for a response from the server when loading data:

image

Are the current bottlenecks here already well understood?

Kobzol commented 1 year ago

Well, I expect that the bottleneck is clear, it's the database :) So I guess that the way to make it faster would be to use the classic tricks: adding indices, caching etc. The DB has been acting a bit strangely recently. It contains relatively large amounts of data, and there may be dragons.

We don't have any telemetry nor profiling setup at the moment, so that would also be useful to confirm my "hypothesis" :)

Mark-Simulacrum commented 1 year ago

Can you say more about the specific request you were making? 30 seconds feels like it's on the high side to me. I'm general, the graph page processes a lot of data, and does so generally through lots of point queries to the database which isn't super fast.

theotherphil commented 1 year ago

The homepage took around this long to load. The 30s wait time in the screenshoot came from leaving the start and end dates empty and choosing "context-switches" as the desired metric.

https://perf.rust-lang.org/?kind=raw&stat=context-switches