-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow backup because of the little QPS and burst numbers #7806
Comments
Nice. We'd probably want to use the same settings from the main velero process if possible -- so if a user changes those from 100 to some higher or lower value via the server param, we should use the same here. |
@sseago or do we want to decouple the qps and burst settings for client used in plugins i.e. add separate configurable params for plugin client configuration ? |
@shubham-pampattiwar as long as it's configurable, I'm not sure I have a strong opinion on whether we use the same settings for both or different ones -- but bumping it up from 10 to 100 without providing an option to change it could result in problems for clusters with slow APIServers. |
Plugins on startup could perhaps read the velero deployment container arguments once so it can try use the same settings. |
I think it makes more sense if we can figure out how to make settings in velero pod visible to plugins. |
Pass Velero server command args to the plugins Fixes vmware-tanzu#7806 Signed-off-by: Wenkai Yin(尹文开) <[email protected]>
Pass Velero server command args to the plugins Fixes vmware-tanzu#7806 Signed-off-by: Wenkai Yin(尹文开) <[email protected]>
Pass Velero server command args to the plugins Fixes vmware-tanzu#7806 Signed-off-by: Wenkai Yin(尹文开) <[email protected]>
What steps did you take and what happened:
A Velero process is setting up the Factory settings if a user is passing client burst and client qps parameters, so that later on if a KubeClient is requested from the Factory instance, KubeClient will have client burst and client qps parameters as intended. So if a user pass a
client-burst
orclient-qps
parameters those parameters will be added in the Factory settings of a main Velero process.velero/pkg/cmd/server/server.go
Lines 298 to 304 in f654188
Also Velero have 5 minutes cache of a discovered resources, but all of that is not used in the plugin section of a code.
In
pkg/cmd/server/plugin/plugin.go
there is a multiple creation of instance discoveryHelper so when velero-plugin process is running it does discovery multiple times (newServiceAccountBackupItemAction
function,newRemapCRDVersionAction
function).velero/pkg/cmd/server/plugin/plugin.go
Lines 202 to 207 in f654188
velero/pkg/cmd/server/plugin/plugin.go
Lines 236 to 243 in f654188
Also velero-plugin is running in a seperate process so factory settings like clientQPS or clientBurst are not passed. So KubeClient that is being created in the Plugin section are using default values of client-go library which are around 10 qps. By simply running only discovery in the plugin section only once and adding default values in the Factory instance, Velero backups can actually end up in only a couple of seconds, instead of 10-40 seconds.
To prove that we try adding default values in the Factory instance as you can see down there and our backups were around 10* times faster. We suggest to add default values of a clientBurst and clientQPS parameters direct into the Factory creation function.(
newFactory
) or passing the client-burst and client-qps parameters to the velero-plugin process by using flags, the same way as the Velero main process is using.Suggestion
I did a presentation about that on DORS/CLUC conference in Zagreb. You can check details here.
The text was updated successfully, but these errors were encountered: