Hi Otto, On Sun, Dec 29, 2024 at 9:04 PM Otto Kekäläinen via developers <developers@lists.mariadb.org> wrote:
The documentation at https://mariadb.com/kb/en/innodb-system-variables/#innodb_log_file_mmap says this is supposed to be enabled by default on Linux, regardless of the architecture. However, in my testing it is not available on all architectures.
The documentation seems to be inaccurate. It does not make sense to implement memory-mapped access to the log on systems where the virtual address space is already scarce. On 32-bit architectures, the size of the physical RAM tends to be close to the maximum usable virtual address space. For good performance, most of the physical memory would have to be allocated to innodb_buffer_pool_size, and on 32-bit systems there may not be enough virtual address space available for mapping the ib_logfile0.
Can somebody help me read the code path of innodb-log-file-mmap to figure out why the visibility/availability of this option it is currently architecture-dependent?
It is not strictly architecture-dependent, but its usefulness will be limited on 32-bit architectures.
https://ci.debian.net/packages/m/mariadb/unstable/armel/55869348/ https://ci.debian.net/packages/m/mariadb/unstable/armhf/55869349/ https://ci.debian.net/packages/m/mariadb/unstable/i386/55869350/
These are 32-bit. By the way, "i386" is misleading, because MariaDB Server does depend on -march=i686 in order to have 64-bit atomic operations.
https://ci.debian.net/packages/m/mariadb/unstable/loong64/55869351/ https://ci.debian.net/packages/m/mariadb/unstable/s390x/55869354/
These should actually be 64-bit and therefore enable innodb_log_file_mmap. Is your configuration check tripping because of the following? static constexpr const char *innodb_log_file_mmap_description= "Whether ib_logfile0" # ifdef HAVE_PMEM " resides in persistent memory or" # endif " should initially be memory-mapped";
On systems where it isn't available, shouldn't the option still show up (but as permanently disabled)?
In my opinion, a smaller footprint is better. To name another example: On Microsoft Windows, WITH_WSREP will not be defined.
It seems odd to have system variables appear or disappear depending on the Linux architecture.
For persistent memory, which might live on as CXL.mem, the instructions to control the cache flushing are architecture dependent. Best regards, Marko -- Marko Mäkelä, Lead Developer InnoDB MariaDB plc