Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

backup: --ratelimit doesn't work as intended #1007

Closed
YuJuncen opened this issue Apr 14, 2021 · 5 comments
Closed

backup: --ratelimit doesn't work as intended #1007

YuJuncen opened this issue Apr 14, 2021 · 5 comments

Comments

@YuJuncen
Copy link
Collaborator

YuJuncen commented Apr 14, 2021

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    Backup with --ratelimit 8 in a cluster with one TiKV.

  2. What did you expect to see?
    The speed should less than 8MB/s.

  3. What did you see instead?
    The speed is 28.30MB/s. And the table below shows the relation among ratelimit, concurrency and real speed.
    Workload: TPCC 10 warehouses(about 1GB).

ratelimit concurrency speed(MB/s)
32 4 55.66
32 1 31.28
8 4 28.30
8 1 14.24
4 4 16.94
4 1 8.37
2 4 9.30
2 1 4.50
  1. What version of BR and TiDB/TiKV/PD are you using?
    tiup v5.0.0
@YuJuncen YuJuncen added type/bug Something isn't working component/backup labels Apr 14, 2021
@kennytm
Copy link
Collaborator

kennytm commented Apr 14, 2021

The documentation states that

--ratelimit: specifies the maximum speed at which a backup operation is performed (MiB/s) on each TiKV node.

So we either fix TiKV or the doc.

@3pointer
Copy link
Collaborator

If we set ratelimit to ratelimit/concurrency, can we solve this problem?🤔️

@kennytm
Copy link
Collaborator

kennytm commented Apr 14, 2021

it is solved only if the ranges are distributed evenly, otherwise we'll get a slow long-tail.

@3pointer
Copy link
Collaborator

it is solved only if the ranges are distributed evenly, otherwise we'll get a slow long-tail.

Then how about we set concurrency to 1, if we found ratelimit not nil? @kennytm

@ryangao0513
Copy link

ryangao0513 commented Sep 12, 2022

v4.0.14
A customer wants to limit the speed of a single tikv node to 240MB/s, but because the concurrency is forced to be 1, the speed cannot go up. A single tikv node is less than 20MB/s. It takes 18h to back up three 22T copies of the database, while mydumper only takes 10h. So is it better not to force concurrency to 1, but to set ratelimit / concurrency as the limit?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants