Commit 6d8dfd3
feat(Nimble): New Flush Policy Implementation With Chunking (facebookincubator#240)
Summary:
X-link: facebookincubator/velox#14846
Pull Request resolved: facebookincubator#240
This is an implementation of the new chunking policy described in this [doc](https://fburl.com/gdoc/gkdwwju1). It has two phases:
**Phase 1 - Memory Pressure Management (shouldChunk)**
The policy monitors total in-memory data size:
* When memory usage exceeds the maximum threshold, initiates chunking to reduce memory footprint while continuing data ingestion
* When previous chunking attempts succeeded and memory remains above the minimum threshold, continues chunking to further reduce memory usage
**Phase 2 - Storage Size Optimization (shouldFlush)**
Implements compression-aware stripe size prediction:
* When chunking fails to reduce memory usage effectively and memory stays above the minimum threshold, forces a full stripe flush to guarantee memory relief
* Calculates the anticipated final compressed stripe size by applying the estimated compression ratio to unencoded data
* Triggers stripe flush when the predicted compressed size reaches the target stripe size threshold
`shouldChunk` is also now a separate method required by all flush policies. We updated all previous tests and code references
NOTE: The Velox repo change here is just test copied into an experimental directory that references the flush policy.
Differential Revision: D815166971 parent b6c1c2a commit 6d8dfd3
File tree
8 files changed
+403
-68
lines changed- dwio/nimble/velox
- selective/tests
- tests
8 files changed
+403
-68
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
26 | 76 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
23 | 46 | | |
24 | 47 | | |
25 | 48 | | |
26 | 49 | | |
27 | 50 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 51 | + | |
| 52 | + | |
34 | 53 | | |
35 | 54 | | |
36 | 55 | | |
37 | 56 | | |
38 | 57 | | |
39 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
40 | 62 | | |
41 | 63 | | |
42 | 64 | | |
| |||
53 | 75 | | |
54 | 76 | | |
55 | 77 | | |
56 | | - | |
57 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
58 | 84 | | |
59 | 85 | | |
60 | | - | |
| 86 | + | |
61 | 87 | | |
62 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
63 | 112 | | |
64 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
65 | 116 | | |
66 | 117 | | |
67 | 118 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
853 | 854 | | |
854 | 855 | | |
855 | 856 | | |
856 | | - | |
| 857 | + | |
| 858 | + | |
857 | 859 | | |
858 | | - | |
859 | 860 | | |
860 | 861 | | |
| 862 | + | |
861 | 863 | | |
862 | 864 | | |
863 | 865 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
132 | 133 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
| 569 | + | |
| 570 | + | |
570 | 571 | | |
571 | 572 | | |
572 | 573 | | |
| |||
612 | 613 | | |
613 | 614 | | |
614 | 615 | | |
615 | | - | |
| 616 | + | |
| 617 | + | |
616 | 618 | | |
617 | 619 | | |
618 | 620 | | |
| |||
0 commit comments