forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1930035
Optimize xid/subxid searches in XidInMVCCSnapshot().
As reported by Yura Sokolov, scanning the snapshot->xip array hasnoticeable impact on scalability when there are a large number ofconcurrent writers. Use the optimized (on x86-64) routine fromb6ef167to speed up searches through the [sub]xip arrays. One benchmark showeda 5% increase in transaction throughput with 128 concurrent writers,and a 50% increase in a pathological case of 1024 writers. While a hashtable would have scaled even better, it was ultimately rejected becauseof concerns around code complexity and memory allocation. Credit to AndresFreund for the idea to optimize linear search using SIMD instructions.Nathan BossartReviewed by: Andres Freund, John Naylor, Bharath Rupireddy, Masahiko SawadaDiscussion:https://postgr.es/m/20220713170950.GA3116318%40nathanxps131 parent1190558 commit1930035
1 file changed
+7
-21
lines changedLines changed: 7 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
| 59 | + | |
59 | 60 |
| |
60 | 61 |
| |
61 | 62 |
| |
| |||
2284 | 2285 |
| |
2285 | 2286 |
| |
2286 | 2287 |
| |
2287 |
| - | |
2288 |
| - | |
2289 | 2288 |
| |
2290 | 2289 |
| |
2291 | 2290 |
| |
| |||
2317 | 2316 |
| |
2318 | 2317 |
| |
2319 | 2318 |
| |
2320 |
| - | |
2321 |
| - | |
2322 |
| - | |
2323 |
| - | |
2324 |
| - | |
2325 |
| - | |
2326 |
| - | |
| 2319 | + | |
| 2320 | + | |
2327 | 2321 |
| |
2328 | 2322 |
| |
2329 | 2323 |
| |
| |||
2344 | 2338 |
| |
2345 | 2339 |
| |
2346 | 2340 |
| |
2347 |
| - | |
2348 |
| - | |
2349 |
| - | |
2350 |
| - | |
2351 |
| - | |
| 2341 | + | |
| 2342 | + | |
2352 | 2343 |
| |
2353 | 2344 |
| |
2354 | 2345 |
| |
2355 |
| - | |
2356 |
| - | |
2357 | 2346 |
| |
2358 | 2347 |
| |
2359 | 2348 |
| |
| |||
2383 | 2372 |
| |
2384 | 2373 |
| |
2385 | 2374 |
| |
2386 |
| - | |
2387 |
| - | |
2388 |
| - | |
2389 |
| - | |
2390 |
| - | |
| 2375 | + | |
| 2376 | + | |
2391 | 2377 |
| |
2392 | 2378 |
| |
2393 | 2379 |
| |
|
0 commit comments
Comments
(0)