• Marko Mäkelä's avatar
    MDEV-33585 The maximum innodb_log_buffer_size is too large · 0892e6d0
    Marko Mäkelä authored
    On Microsoft Windows, ReadFile() as well as WriteFile() limit the size
    of the request to DWORD, which is 32 bits (at most 4 GiB - 1) also on
    64-bit systems.
    
    On FreeBSD, sysctl debug.iosize_max_clamp could limit the size of a
    write request to INT_MAX. The size of a read request is always limited
    to INT_MAX. This would allow the request size to be 4095 bytes more than
    the Linux limit (0x7ffff000 according to "man 2 read" and "man 2 write").
    
    On OpenBSD, Solaris and possibly NetBSD, the read request size is limited
    to SSIZE_T_MAX, which would be half the current maximum
    innodb_log_buffer_size. This should be not much of an issue anyway,
    because on contemporary 64-bit platforms, the virtual addresses are
    limited to 48 bits.
    
    IBM AIX documentation mentions OFF_MAX which would apply when
    a 64-bit application is running on a 32-bit kernel.
    
    Let us declare innodb_log_buffer_size as 32-bit unsigned and make the
    maximum 0x7ffff000, to be compatible with the least common
    denominator (Linux).
    
    The maximum innodb_sort_buffer_size already was 64 MiB,
    which is not a problem.
    
    SyncFileIO::execute(): Assert that the size of a synchronous read or
    write request is limited to the maximum.
    
    Reviewed by: Vladislav Vaintroub
    0892e6d0
sysvars_innodb.result 51.7 KB