Commit 83eb181
authored
perf(cs): make inputBuffer size progressive (#764)
The current implementation of the WriteHighLevelOp class always asks
for maxBlocksPerHddWriteJob_ blocks for its next inputBuffer_, i.e the
structure to land the upcoming data blocks to be written to the drive.
This can became a significant waste of memory when the write high level
operation only writes 1 block, but asks for 32, if the
MAX_BLOCKS_PER_HDD_WRITE_JOB is set to that number, for instance.
The change proposed targets asking for smaller initial input buffers,
to limit the memory wasted. Considering the previous case, the
write high level operation will ask for 4, 8, 16, 32 and continue
asking for input buffers of 32 blocks.
The main downside is a possible increase in the number of drive
operations in certain scenarios.
Signed-off-by: Dave <dave@leil.io>1 parent b6ebcdf commit 83eb181
File tree
2 files changed
+19
-4
lines changed- src/chunkserver
2 files changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
470 | 473 | | |
471 | 474 | | |
472 | 475 | | |
| |||
573 | 576 | | |
574 | 577 | | |
575 | 578 | | |
| 579 | + | |
| 580 | + | |
576 | 581 | | |
577 | 582 | | |
578 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
210 | 214 | | |
211 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
| |||
299 | 306 | | |
300 | 307 | | |
301 | 308 | | |
302 | | - | |
303 | | - | |
| 309 | + | |
| 310 | + | |
304 | 311 | | |
305 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
306 | 316 | | |
307 | 317 | | |
308 | 318 | | |
| |||
0 commit comments