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

Reduce malloc()/free() usage in InnoDB

    XMLWordPrintable

    Details

      Description

      I load backup to mariadb and break it. In processlist still present one killed thread:

      show processlist;
      +-----+--------+--------------------+-------------------+---------+------+------------------+------------------+----------+
      | Id  | User   | Host               | db                | Command | Time | State            | Info             | Progress |
      +-----+--------+--------------------+-------------------+---------+------+------------------+------------------+----------+
      |  85 | loader | 10.10.16.216:43971 | phonebook_storage | Killed  | 1845 | Unlocking tables | NULL             |    0.000 |
      | 184 | root   | localhost          | NULL              | Query   |    0 | init             | show processlist |    0.000 |
      +-----+--------+--------------------+-------------------+---------+------+------------------+------------------+----------+
      

      In same time I run strace for mysqld and see many calls to madvise:

      # strace -ff -p 33080
      ...
      [pid 60412] madvise(0x7f36cb638000, 331776, MADV_DONTNEED) = 0
      [pid 60412] madvise(0x7f36cb441000, 135168, MADV_DONTNEED) = 0
      [pid 60412] madvise(0x7f36cb638000, 335872, MADV_DONTNEED) = 0
      [pid 60412] madvise(0x7f36cb441000, 135168, MADV_DONTNEED) = 0
      [pid 60412] madvise(0x7f36cb638000, 335872, MADV_DONTNEED) = 0
      [pid 60412] madvise(0x7f36cb441000, 135168, MADV_DONTNEED) = 0
      [pid 60412] madvise(0x7f36cb638000, 335872, MADV_DONTNEED) = 0
      

      Table which been loading:

      /*!40101 SET @saved_cs_client     = @@character_set_client */;
      /*!40101 SET character_set_client = utf8 */;
      CREATE TABLE `contact` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `id_phonebook` int(10) unsigned NOT NULL DEFAULT '0',
        `id_user` int(10) unsigned NOT NULL DEFAULT '0',
        `firstname` varchar(255) NOT NULL DEFAULT '',
        `lastname` varchar(255) NOT NULL DEFAULT '',
        `local_key` varchar(255) NOT NULL DEFAULT '',
        PRIMARY KEY (`id`),
        KEY `id_phonebook` (`id_phonebook`) USING BTREE,
        KEY `id_user` (`id_user`) USING BTREE
      ) ENGINE=InnoDB AUTO_INCREMENT=133028725 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
      /*!40101 SET character_set_client = @saved_cs_client */;
      

        Attachments

        1. gdb.txt
          7 kB
          Sergey Chernomorets
        2. status.txt
          12 kB
          Sergey Chernomorets
        3. vars.txt
          16 kB
          Sergey Chernomorets

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              chernomorets Sergey Chernomorets
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: