forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbc7fcab
committed
Read from the same worker repeatedly until it returns no tuple.
The original coding read tuples from workers in round-robin fashion,but performance testing shows that it works much better to read enoughto empty one queue before moving on to the next. I believe thereason for this is that, with the old approach, we could easily wakeup a worker repeatedly to write only one new tuple into the shm_mqeach time. With this approach, by the time the process gets scheduled,it has a decent chance of being able to fill the entire buffer inone go.Patch by me. Dilip Kumar helped with performance testing.1 parent51d152f commitbc7fcab
1 file changed
+10
-4
lines changedLines changed: 10 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
359 | 359 |
| |
360 | 360 |
| |
361 | 361 |
| |
362 |
| - | |
363 |
| - | |
364 |
| - | |
365 |
| - | |
366 | 362 |
| |
367 | 363 |
| |
368 | 364 |
| |
369 | 365 |
| |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
370 | 376 |
| |
371 | 377 |
| |
372 | 378 |
| |
|
0 commit comments
Comments
(0)