zoukankan      html  css  js  c++  java
  • Mariadb 解决 The total number of locks exceeds the lock table size

    进行一个很大数据量的insert 语句,执行了大概10分钟左右报错 The total number of locks exceeds the lock table size ;删除的话也会报错。

    InnoDB Buffer Pool

    The XtraDB/InnoDB buffer pool is a key component for optimizing MariaDB. It stores data and indexes, and you usually want it as large as possible so as to keep as much of the data and indexes in memory, reducing disk IO, as main bottleneck.
    https://mariadb.com/kb/en/innodb-buffer-pool/

    innodb_buffer_pool_size

    The most important server system variable is innodb_buffer_pool_size, which you can set from 70-80% of the total available memory on a dedicated database server with only or primarily XtraDB/InnoDB tables.
    Be aware that the total memory allocated is about 10% more than the specified size as extra space is also reserved for control structures and buffers. The space must also be contiguous. If you're running a Windows system that loads DLL's at specific addresses, this may cause difficulties.
    The larger the size, the longer it will take to initialize. On a modern 64-bit server with a 10GB memory pool, this can take five seconds or more.
    Make sure that the size is not too large, causing swapping. The benefit of a larger buffer pool size is more than undone if your operating system is regularly swapping.
    Since MariaDB 10.2.2, the buffer pool can be set dynamically, and new variables are introduced that may affect the size and performance. See Setting Innodb Buffer Pool Size Dynamically.

    由于我得mariadb 版本是10.0 的,所以只能重启修改参数。

    [Mariadb]
    innodb_buffer_pool_size=8G

  • 相关阅读:
    Line of Sight 计算几何基础
    Hash算法详解
    高效mysql的习惯(程序员版本)
    thymeleaf初步使用
    @Transactional注解事务不起作用
    泛型的理解
    Git&GitHun 命令合集
    springboot引入thymeleaf
    springboot静态资源映射
    springboot的配置文件
  • 原文地址:https://www.cnblogs.com/Leo-Cjh/p/13729009.html
Copyright © 2011-2022 走看看