You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This rack is very distressed. Some disks have gone into live-repair. That distress is being made even worse because 8% of the rack's CPU is being spent notifying nexus of live-repair status, and most of that is being spent creating Reqwest clients. this is the same class of problem as oxidecomputer/omicron#5717 which was fixed by oxidecomputer/omicron#5750, but we are having it over here too.
Fixing this requires caching the Reqwest client, but it does not require caching the nexus client. This is an important distinction because caching the nexus client would cause problems when nexus moves around. But caching the reqwest client is fine, because it's just the thing that does HTTP requests, it doesn't care where they're going.
In short, we want to be calling nexus_client::Client::new_with_client() instead of nexus_client::Client::new() here
Creating Reqwest clients is expensive, and creating them every time
Nexus is notified is therefore an awful idea. Reuse a single Reqwest
client instead.
Fixesoxidecomputer#1316.
This rack is very distressed. Some disks have gone into live-repair. That distress is being made even worse because 8% of the rack's CPU is being spent notifying nexus of live-repair status, and most of that is being spent creating Reqwest clients. this is the same class of problem as oxidecomputer/omicron#5717 which was fixed by oxidecomputer/omicron#5750, but we are having it over here too.
Fixing this requires caching the Reqwest client, but it does not require caching the nexus client. This is an important distinction because caching the nexus client would cause problems when nexus moves around. But caching the reqwest client is fine, because it's just the thing that does HTTP requests, it doesn't care where they're going.
In short, we want to be calling
nexus_client::Client::new_with_client()
instead ofnexus_client::Client::new()
herecrucible/upstairs/src/lib.rs
Lines 1816 to 1819 in da333e9
A Reqwest client is internally Arc'd, so we just need one laying around that we can clone every time we make a nexus client
@iliana tagging you to make sure I'm explaining this right
The text was updated successfully, but these errors were encountered: