AIX

From PostgreSQL wiki
Jump to navigationJump to search

Opportunities to improve AIX support in PostgreSQL

  • AIX support was in PostgreSQL since ancient times, but it was dropped from v17 and v18; there is an active proposal to bring it back in v19 from a team at IBM; probably with a narrower target on support AIX version (ie 7.3+) and tool chains (modern only)
  • based on experience with epoll and kqueue, large AIX systems would probably benefit from using pollset for latch.c (to reduce contention on eg the postmaster pipe in the poll set which otherwise gets locked with high frequency and concurrency across many processes via the poll() system call); here is an experimental patch that seems to work OK, but I have lost access to serious AIX equipment; if there is demand we could propose this and I bet it would speed up NUMA systems (because every network wait with ye olde poll() will do inter-socket locking ping pong on the postmaster pipe without this patch)
  • it's also possible to use AIX IOCP instead of pollset, but that's a bigger project that would only make sense if WaitEventSet eventually learns to drive completion-based asynchronous socket I/O (working proof-of-concept level prototypes exist, I'm just noting this as an eventual best option for AIX if it comes back)
  • PostgreSQL scales a lot better with huge memory pages; here is an experimental patch that needs to be finished and tested by someone with access to AIX + the ability to get the CAP_BYPASS_RAC_VMM privilege, to test
  • PostgreSQL is in the process of gaining optional direct I/O support; see debug_io_direct settings in PostgreSQL 16, with more support features (asynchronous I/O) to follow in 17+. Should we be using O_CIO instead of O_DIRECT on AIX to avoid per-file serialization, or should it be an option, and what does it all mean? (Experimental patches to use native asynchronous I/O on AIX seemed to show that O_CIO would allow true asynchronous I/O down to the driver, whereas without it you'd get a lot of "helper daemons" that run synchronous I/Os.)

And for the POWER architecture generally (ie would benefit Linux on POWER too):