Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39142

InnoDB fails to start up with CONFIG_ARM64_VA_BITS_39=y

    XMLWordPrintable

Details

    • Related to install and upgrade

    Description

      MDEV-38671 changed the default value of the parameter innodb_buffer_pool_size_max to 8 TiB (8 << 40 or 1 << 43 or 2⁴³ bytes) on 64-bit systems.

      The assumption was that on every 64-bit system, the size of the virtual address space would be close to 48 bits. However, on ARMv8, the Linux kernel can be configured with a 39-bit virtual address space (512 GiB). In such environments, we should limit the default innodb_buffer_pool_size_max to 256 GiB.

      Note: This is independent of MDEV-39139, which is about RLIMIT_AS.

      It is yet to be determined how this configuration can be best detected from the user space. Perhaps simply like this:

      diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
      index cb264e788e9..877350ec6cd 100644
      --- a/storage/innobase/buf/buf0buf.cc
      +++ b/storage/innobase/buf/buf0buf.cc
      @@ -1343,7 +1343,16 @@ bool buf_pool_t::create() noexcept
       #endif
         }
       
      -  if (!memory_unaligned)
      +  if (memory_unaligned);
      +#ifdef __aarch64__
      +  else if (size_in_bytes_max == innodb_buffer_pool_size_max_default)
      +  {
      +    /* Accommodate CONFIG_ARM64_VA_BITS_39 */
      +    size_in_bytes_max= 1 << 37; /* a quarter of the available address space */
      +    goto init;
      +  }
      +#endif
      +  else
           goto oom;
       
         const size_t alignment_waste=
      

      We may need a similar adjustment for other platforms where the virtual address space may be narrower than 44 bits (16 TiB).

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.