# The basic structure of a TRX_SYS page is: FIL header, TRX_SYS header,
# empty space, master binary log information, empty space, local binary
# log information, empty space, doublewrite information (repeated twice),
# empty space, and FIL trailer.
So, there is plenty of empty space between TRX_SYS header, as suggested earlier UNIV_PAGE_SIZE - 3500 should be good enough. (for total XID size of about 150 bytes)
From trx_sys.rb:
# The basic structure of a TRX_SYS page is: FIL header, TRX_SYS header,
# empty space, master binary log information, empty space, local binary
# log information, empty space, doublewrite information (repeated twice),
# empty space, and FIL trailer.
So, there is plenty of empty space between TRX_SYS header, as suggested earlier UNIV_PAGE_SIZE - 3500 should be good enough. (for total XID size of about 150 bytes)