juicedata / juicefs

JuiceFS is a distributed POSIX file system built on top of Redis and S3.
https://juicefs.com
Apache License 2.0
10.95k stars 967 forks source link

meta: backup #5263

Open jiefenghuang opened 3 weeks ago

jiefenghuang commented 3 weeks ago

Goal

A new binary backup method enables more efficient and memory-saving dump and load operations, producing smaller backups. It is designed for large-scale file system backups and migrations.

Limited

Performance

data set: 1m files goos: linux goarch: amd64 cpu: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics

BenchmarkLoadDumpV2/Load_redis-16 1 7307923118 ns/op 2062659712 B/op 27617610 allocs/op BenchmarkLoadDumpV2/Dump_non-fast_mode_redis-16 1 4528533637 ns/op 2303354744 B/op 41546163 allocs/op BenchmarkLoadDumpV2/Dump_fast_mode_redis-16 1 3967532937 ns/op 2299847272 B/op 41513331 allocs/op BenchmarkLoadDumpV2/DumpV2_CoNum=1_redis-16 1 3659069323 ns/op 712397208 B/op 9024910 allocs/op BenchmarkLoadDumpV2/DumpV2_CoNum=10_redis-16 1 3456428554 ns/op 713347296 B/op 9033111 allocs/op BenchmarkLoadDumpV2/LoadV2_redis-16 1 1323064794 ns/op 1063459224 B/op 15249467 allocs/op

BenchmarkLoadDumpV2/Load_tikv-16 1 9644265753 ns/op 2708921496 B/op 28191080 allocs/op BenchmarkLoadDumpV2/Dump_non-fast_mode_tikv-16 1 54607733112 ns/op 14235384304 B/op 256777839 allocs/op BenchmarkLoadDumpV2/Dump_fast_mode_tikv-16 1 7169758572 ns/op 2514788216 B/op 34111266 allocs/op BenchmarkLoadDumpV2/DumpV2_CoNum=1_tikv-16 1 1812321521 ns/op 846469264 B/op 8966257 allocs/op BenchmarkLoadDumpV2/LoadV2_tikv-16 1 5420456001 ns/op 991102312 B/op 10047605 allocs/op



## Memory

- mysql (TODO: optimise)
<img width="1096" alt="image" src="https://github.com/user-attachments/assets/a19b8723-3cb1-4504-a822-0cc276d66d74">

- redis
<img width="1028" alt="image" src="https://github.com/user-attachments/assets/bdcf2e3c-818a-40ab-bae9-65d3977efbe6">

- tikv
<img width="771" alt="image" src="https://github.com/user-attachments/assets/c8846059-5068-4a8b-ada2-192b5bc62f1f">