xen-orchestra icon indicating copy to clipboard operation
xen-orchestra copied to clipboard

[Backup] Limit bandwith utilisation of a backup run

Open ghost opened this issue 6 years ago • 18 comments

It would be very useful if it was possible to set a limit on the transfer speeds for specific backup schedules. The limit could also be scheduled so that during "hot times" it could be a low limit and high or no limit on "cold" times.

Some examples:

  • remote outside company premises and a limited bandwidth on the external line. Limiting in XO would avoid saturating the internet connection
  • Disk I/O. Limiting backup would make less strain on I/O limited SR's and remotes.
  • Network performance. During certain times a limitation on transfer speeds could improve network performance for other applications or office users.

ghost avatar Apr 04 '19 08:04 ghost

@julien-f @olivierlambert I would like to second this request. Any thoughts on a timeline for this issue? I was going to open a new issue but found this one from a year ago.

I have just 5 VMs in one location that are running nightly Continuous Replication jobs over a 100/100 mbit connection and it saturates it completely making nothing else work (i.e. VPN, Website access, etc).

lancefogle avatar May 15 '20 12:05 lancefogle

Shouldn't be difficult to implement, I'm adding this to the June release roadmap.

julien-f avatar May 15 '20 12:05 julien-f

Awesome! Thank you. It would be a great help.

lancefogle avatar May 15 '20 12:05 lancefogle

Any updates on this issue? I really need this because my backups are throttling my line since I use a remote site for backups.

antonlindgren avatar Dec 06 '20 02:12 antonlindgren

Hi!

No update because it's not a priority right now (improving backup perfs is a priority, but by doing that we might be able to do the opposite too, as requested here). But as usual, contributions are welcome :+1: Also, a support ticket might help to raise the priority.

Until then, take a look at iptables + tc combo to do some network limitations (example here)

olivierlambert avatar Dec 06 '20 12:12 olivierlambert

Any updates? We have a remote site where the connection is shared with others, so it would be great if we could make sure not to use 100% during backups.

nikade87 avatar Jun 14 '22 17:06 nikade87

@julien-f maybe it's a simple modification for @fbeauchamp to implement this summer?

olivierlambert avatar Jun 15 '22 07:06 olivierlambert

I don't see any easy way to implement this.

The more I think about it, the more I believe the best answer is at OS level.

julien-f avatar Jun 15 '22 07:06 julien-f

maybe we can change _outputStream to read chunk manually instead of using pipeline and make a pause if the speed is greater than the max allowed speed. It won't be exact given the various buffering, but it should respect the order of magnitude. It will probably have a performance cost . @nikade87 what are the order of magnitude of the limit you want to set : is it in KBps, Mbps , Gbps, 10Gbps , more ?

fbeauchamp avatar Jun 15 '22 08:06 fbeauchamp

Also what's the restriction perimeter? Overall backup speed per XOA/Proxy or per backup job? Or per disk?

olivierlambert avatar Jun 15 '22 08:06 olivierlambert

For me the limit would be specified in Mbit/s if possible.

nikade87 avatar Jun 15 '22 11:06 nikade87

And by what? (cf my previous comment)

olivierlambert avatar Jun 15 '22 11:06 olivierlambert

In our case we would need to set this at the job, we have a specific job backing up all the VM's on this offsite xcp-ng server.

nikade87 avatar Jun 15 '22 12:06 nikade87

the easiest to implement will be by backup transfer. then by backup job execution. By remote from the same xo / proxy is harder but not off limit By remote from any combination of proxy/xo/xoa will take much more time

fbeauchamp avatar Jun 15 '22 12:06 fbeauchamp

Yeah that sounds about right, that should do it. Then we'll be able to set like 500Mbit limit on that job and we'll make sure the others still have half the bandwidth available.

nikade87 avatar Jun 15 '22 12:06 nikade87

This needs to be per job for the most part. The reasoning is that when a backup job runs it doesn't eat all available bandwidth. Limiting per disk isn't really helpful as you could be transfering multiple disks. Same for VMs as multiples vould be transferred thus eating more than the requested bamdwidth. If it is limited per job, bandwidth can be predictably controlled while transferring the data over the network during business operations.

On Wed, Jun 15, 2022, 4:41 AM Olivier Lambert @.***> wrote:

Also what's the restriction perimeter? Overall backup speed per XOA/Proxy or per backup job? Or per disk?

— Reply to this email directly, view it on GitHub https://github.com/vatesfr/xen-orchestra/issues/4119#issuecomment-1156174257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFVAGWZQEWTEBSQK6GW6NFTVPGJMDANCNFSM4HDQXYQA . You are receiving this because you commented.Message ID: @.***>

lancefogle avatar Jun 15 '22 14:06 lancefogle

Ok, we will work on implementing a transfer speed limitation inside a backup run.

All other use cases (global limit, global limit for a specific remote, global limit for a specific pool) will not be implemented, and if needed, should be looked at the OS level.

julien-f avatar Jun 16 '22 09:06 julien-f

That sounds perfect, thanks guys!

nikade87 avatar Jun 16 '22 10:06 nikade87

Bumping this as another customer has requested it.

Fohdeesha avatar Mar 10 '23 09:03 Fohdeesha

@julien-f why it's reopened?

olivierlambert avatar May 16 '23 10:05 olivierlambert