BR Backup Performance

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: BR 备份性能

| username: Hacker_wV92qfW3

BR: 5.4.2
TiDB cluster version: 5.4.2
Node information:
Machine A: 10 Gigabit network, one PD, TiDB, TiKV
Machine B: 10 Gigabit network, one PD, TiDB, TiKV
Machine C: 10 Gigabit network, one PD, TiDB, TiKV
Machine D: 10 Gigabit network, installed with a MinIO service.

During testing, it was found that the speed printed by BR and the data volume divided by the total time have a significant discrepancy. How can this be explained?

| username: 长安是只喵 | Original post link

I manually calculated and found that the difference is not significant.
Data volume: 4.072TB
Speed: 325MB/s
Time: 3h28min

Calculation time: (4.072x1024x1024)/325=13137s
Printed time: (3x60+28)x60=12480s
The printed time is 11 minutes less than the calculated time. Compared to 3.5 hours, I think the difference is not significant.

PS: Using the decimal system results in an even smaller difference (I thought of this because of the different systems when buying a USB drive).
Calculation time: (4.072x1000x1000)/325=12529s
This way, the time difference is 49s, which is almost the same. :wink:

| username: banana_jian | Original post link

There is also a compression process after the backup.

| username: Hacker_wV92qfW3 | Original post link

Can it be understood this way?
4.072T is the data size before compression, and BR is based on this.
backup-data-size(after-compressed) is the size after compression.
What does Size=1731651606559 mean?

| username: 长安是只喵 | Original post link

:flushed: This confirms the use of the decimal system (base-1000) rather than the binary system (base-1024). It’s clear that this is the compressed size, backup-data-size.

| username: Hacker_wV92qfW3 | Original post link

Is compression necessary during BR backup? Is there a way to disable compression?

| username: HACK | Original post link

Is BR backup compressed by default? It seems like I haven’t seen any related parameters.

| username: 长安是只喵 | Original post link

It should be the default, right? Physical backups are not compressed, what business scenarios is this for?

| username: cs58_dba | Original post link

The size in the backup output log is the actual size of the backup archive on the disk after compression.

| username: banana_jian | Original post link

You can set these.

| username: 长安是只喵 | Original post link

:call_me_hand::call_me_hand::call_me_hand:

| username: Hacker_wV92qfW3 | Original post link

What is the range of values for this compression level?

| username: HACK | Original post link

You can learn about zstd compression.

| username: cs58_dba | Original post link

zstd compression

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.