Commit 2151f22
Stop tracking syncing live WAL for performance (facebook#10330)
Summary:
With facebook#10087, applications calling `SyncWAL()` or writing with `WriteOptions::sync=true` can suffer
from performance regression. This PR reverts to original behavior of tracking the syncing of closed WALs.
After we revert back to old behavior, recovery, whether kPointInTime or kAbsoluteConsistency, may fail to
detect corruption in synced WALs if the corruption is in the live WAL.
Pull Request resolved: facebook#10330
Test Plan:
make check
Before facebook#10087
```bash
fillsync : 750.269 micros/op 1332 ops/sec 75.027 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync : 776.492 micros/op 1287 ops/sec 77.649 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync [AVG 2 runs] : 1310 (± 44) ops/sec; 0.1 (± 0.0) MB/sec
fillsync : 805.625 micros/op 1241 ops/sec 80.563 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync [AVG 3 runs] : 1287 (± 51) ops/sec; 0.1 (± 0.0) MB/sec
fillsync [AVG 3 runs] : 1287 (± 51) ops/sec; 0.1 (± 0.0) MB/sec
fillsync [MEDIAN 3 runs] : 1287 ops/sec; 0.1 MB/sec
```
Before this PR and after facebook#10087
```bash
fillsync : 1479.601 micros/op 675 ops/sec 147.960 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync : 1626.080 micros/op 614 ops/sec 162.608 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync [AVG 2 runs] : 645 (± 59) ops/sec; 0.1 (± 0.0) MB/sec
fillsync : 1588.402 micros/op 629 ops/sec 158.840 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync [AVG 3 runs] : 640 (± 35) ops/sec; 0.1 (± 0.0) MB/sec
fillsync [AVG 3 runs] : 640 (± 35) ops/sec; 0.1 (± 0.0) MB/sec
fillsync [MEDIAN 3 runs] : 629 ops/sec; 0.1 MB/sec
```
After this PR
```bash
fillsync : 749.621 micros/op 1334 ops/sec 74.962 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync : 865.577 micros/op 1155 ops/sec 86.558 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync [AVG 2 runs] : 1244 (± 175) ops/sec; 0.1 (± 0.0) MB/sec
fillsync : 845.837 micros/op 1182 ops/sec 84.584 seconds 100000 operations; 0.1 MB/s (100 ops)
fillsync [AVG 3 runs] : 1223 (± 109) ops/sec; 0.1 (± 0.0) MB/sec
fillsync [AVG 3 runs] : 1223 (± 109) ops/sec; 0.1 (± 0.0) MB/sec
fillsync [MEDIAN 3 runs] : 1182 ops/sec; 0.1 MB/sec
```
Reviewed By: ajkr
Differential Revision: D37725212
Pulled By: riversand963
fbshipit-source-id: 8fa7d13b3c7662be5d56351c42caf3266af937ae
Signed-off-by: tabokie <[email protected]>1 parent 42543b6 commit 2151f22
File tree
5 files changed
+23
-6
lines changed- db
- db_impl
- include/rocksdb
- tools
5 files changed
+23
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3704 | 3704 | | |
3705 | 3705 | | |
3706 | 3706 | | |
3707 | | - | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
3708 | 3710 | | |
3709 | 3711 | | |
3710 | 3712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1443 | 1443 | | |
1444 | 1444 | | |
1445 | 1445 | | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | 1446 | | |
1451 | 1447 | | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1452 | 1452 | | |
1453 | 1453 | | |
1454 | 1454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
| 505 | + | |
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
509 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
510 | 516 | | |
511 | 517 | | |
512 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1569 | 1569 | | |
1570 | 1570 | | |
1571 | 1571 | | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
1572 | 1575 | | |
1573 | 1576 | | |
1574 | 1577 | | |
| |||
4445 | 4448 | | |
4446 | 4449 | | |
4447 | 4450 | | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
4448 | 4454 | | |
4449 | 4455 | | |
4450 | 4456 | | |
| |||
0 commit comments