- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit06fb561
committed
Increase io_combine_limit range to 1MB.
The default of 128kB is unchanged, but the upper limit is changed from32 blocks to 128 blocks, unless the operating system's IOV_MAX is toolow. Some other RDBMSes seem to cap their multi-block buffer pool I/Oaround this number, and it seems useful to allow experimentation.The concrete change is to our definition of PG_IOV_MAX, which providesthe maximum for io_combine_limit and io_max_combine_limit. It alsoaffects a couple of other places that work with arrays of struct iovecor smaller objects on the stack, so we still don't want to use thesystem IOV_MAX directly without a clamp: it is not under our control andlikely to be 1024. 128 seems acceptable for our current usage.For Windows, we can't use real scatter/gather yet, so we continue todefine our own IOV_MAX value of 16 and emulate preadv()/pwritev() withloops. Someone would need to research the trade-offs of raising thatnumber.NB if trying to see this working: you might temporarily need to hackBAS_BULKREAD to be bigger, since otherwise the obvious way of "a verybig SELECT" is limited by that for now.Suggested-by: Tomas Vondra <tomas@vondra.me>Discussion:https://postgr.es/m/CA%2BhUKG%2B2T9p-%2BzM6Eeou-RAJjTML6eit1qn26f9twznX59qtCA%40mail.gmail.com1 parent10f6646 commit06fb561
File tree
4 files changed
+16
-7
lines changed- doc/src/sgml
- src
- backend
- storage/aio
- utils/misc
- include/port
4 files changed
+16
-7
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2638 | 2638 |
| |
2639 | 2639 |
| |
2640 | 2640 |
| |
| 2641 | + | |
| 2642 | + | |
2641 | 2643 |
| |
2642 | 2644 |
| |
2643 | 2645 |
| |
| |||
2655 | 2657 |
| |
2656 | 2658 |
| |
2657 | 2659 |
| |
| 2660 | + | |
| 2661 | + | |
2658 | 2662 |
| |
2659 | 2663 |
| |
2660 | 2664 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
515 | 515 |
| |
516 | 516 |
| |
517 | 517 |
| |
518 |
| - | |
519 |
| - | |
520 |
| - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
521 | 522 |
| |
522 | 523 |
| |
523 | 524 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
203 |
| - | |
| 203 | + | |
204 | 204 |
| |
205 |
| - | |
| 205 | + | |
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
37 |
| - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 |
| |
39 | 43 |
| |
40 | 44 |
| |
|
0 commit comments
Comments
(0)