Home Database Mysql Tutorial Mysql InnoDB bufferpool_MySQL

Mysql InnoDB bufferpool_MySQL

Jun 01, 2016 pm 01:36 PM
insert update blog friend

bitsCN.com

Mysql InnoDB bufferpool

 

今博客一位朋友找到问这个问题,上网找出以下的解释,希望能帮到他使用

问题:

发现在bufferpool用完后,insert完成后提交,select和update操作时数据如果不在bufferpool里,就需要从磁盘读,这时insert或者update操作会执行1s以上,导致那段时间的insert操作减少

 

innoDB在内存中维护一个缓存池用于缓存数据和索引。缓存池管理一个数据块列表,该列表又分为2个字列表,一个子列表存放new blocks,另一个子列表存放old blocks。old blocks默认占整个列表大小的3/8(可通过innodb_old_blocks_pct改变默认值,该值范围在5-95之间,这是一个百分比),其余大小为new blocks占用。

 

当有新数据添加到缓存池中时,如果缓存池的空间不足,则根据LRU算法清除数据。

 

-----重点解释

新插入缓存池的数据插入到存放old blocks的子列表的头部,如果数据被用户访问,则将这个数据移至new blocks的头部。如果设置了innodb_old_blocks_time大于0,比如innodb_old_blocks_time=1000,当新数据插入缓存池后过1s之后被访问,才会把数据移至new blocks的头部,在刚插入的一秒之内被访问改数据不会被移动,仍然在old blocks的头部。

------

   www.bitsCN.com  

当访问old blocks中的数据时,该数据会被移至new blocks的头部,但是当访问new blocks中的数据时,只有在该数据离new blocks的头部有一定距离时才移动。

为了更好的并发性能,通过指定innodb_buffer_pool_instances(该值取值范围为1-64)创建多个缓存池,每个缓存池的大小为

innodb_buffer_pool_size/innodb_buffer_pool_instances,通常需要保持当个缓存池的大小大于1GB。
 

bitsCN.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Fix: Google Chrome update check failed with error code 3: 0x80040154 Fix: Google Chrome update check failed with error code 3: 0x80040154 Apr 13, 2023 pm 05:46 PM

Google Chrome is one of the most popular browsers in the world and many users prefer to use it as the default browser on their Windows PCs. Chrome offers a wide range of features that make the browsing experience enjoyable and effortless, and therefore, it remains one of the most trusted browsers. But just like any other browser, even Chrome has its own shortcomings, and it's equally prone to bugs and glitches when you need it most. One such error is Error Code 3: 0x80040154, which occurs while checking for Google Chrome updates. The error message reads "An error occurred while checking for updates. The update check failed to start (Error code 3: 0x80080005) or (Error

Start from scratch and guide you step by step to install Flask and quickly establish a personal blog Start from scratch and guide you step by step to install Flask and quickly establish a personal blog Feb 19, 2024 pm 04:01 PM

Starting from scratch, I will teach you step by step how to install Flask and quickly build a personal blog. As a person who likes writing, it is very important to have a personal blog. As a lightweight Python Web framework, Flask can help us quickly build a simple and fully functional personal blog. In this article, I will start from scratch and teach you step by step how to install Flask and quickly build a personal blog. Step 1: Install Python and pip Before starting, we need to install Python and pi first

What are the top ten open source PHP blog systems in 2022? 【recommend】 What are the top ten open source PHP blog systems in 2022? 【recommend】 Jul 27, 2022 pm 05:38 PM

Blog, also translated as web log, blog or blog, is a website that is usually managed by individuals and posts new articles from time to time. So how to set up a blog? What are the PHP blog systems? Which blogging system is best to use? Below, PHP Chinese website will summarize and share the top ten open source PHP blog systems with you. Let’s take a look!

How to enable/disable VS Code automatic updates How to enable/disable VS Code automatic updates Apr 28, 2023 am 09:28 AM

If you are using Visual Studio Code (VSCode) and thinking about how to disable its automatic software updates and how to disable the automatic updates of its extensions, then read this article. If you don't use VSCode often, open the editor after a long period of time and want to enable automatic updates, this article will also guide you in doing so. Let us discuss in detail the different ways to enable or disable VSCode automatic updates. Table of Contents Method One: Use Settings to Enable/Disable VSCode Automatic Updates Step 1: Open VS Code and click the gear-shaped symbol in the lower left corner. Step 2: Click Settings in the list that appears. Step 3: Type update in the search bar and hit enter. Find Updates: Pattern 4

What is the difference between TikTok fans and friends? How to increase fans? What is the difference between TikTok fans and friends? How to increase fans? Mar 07, 2024 pm 09:52 PM

As one of the most popular short video platforms in China, Douyin has attracted a large number of users and fans. On TikTok, we often hear about fans and friends, but do you know what the difference is between TikTok fans and friends? This question will be answered in detail below. 1. What is the difference between Douyin fans and friends? On TikTok, fans are people who are interested in your content and choose to follow you. They will interact with you through likes, comments, etc. to establish a virtual connection. Friends, on the other hand, are people who know each other in real life and have real social relationships with each other. On social platforms like Douyin, the methods and depth of interactions between fans and friends may vary, but they are all important elements in building and maintaining a social network. The number of fans refers to those who follow your account

Create a simple blog: using PHP and SQLite Create a simple blog: using PHP and SQLite Jun 21, 2023 pm 01:23 PM

With the development of the Internet, blogs have become a platform for more and more people to share their lives, knowledge and ideas. If you also want to create a blog of your own, then this article will introduce how to use PHP and SQLite to create a simple blog. Determine the needs Before starting to create a blog, we need to determine the functions we want to achieve. For example: Create a blog post Edit a blog post Delete a blog post Display a list of blog posts Display blog post details User authentication and permission control Install PHP and SQLite We need to install PHP and S

KDE Plasma 6.1 brings many enhancements to the popular Linux desktop KDE Plasma 6.1 brings many enhancements to the popular Linux desktop Jun 23, 2024 am 07:54 AM

After several pre-releases, the KDE Plasma development team unveiled version 6.0 of its desktop environment for Linux and BSD systems on 28 February, using the Qt6 framework for the first time. KDE Plasma 6.1 now comes with a number of new features t

Solution to high CPU usage of Microsoft compatibility telemetry Solution to high CPU usage of Microsoft compatibility telemetry Mar 16, 2024 pm 10:16 PM

When we use the win10 system, we sometimes encounter situations where the computer becomes stuck. Then when we check the background process, we find that a Microsoftcompatibilitytelemetry process takes up a particularly high amount of resources. So what is going on? Users can try to uninstall the third-party protection software and then try a clean boot to operate. Let this site carefully introduce to users the solution to the high CPU usage of Microsoftcompatibilitytelemetry. Solution to the high CPU usage of Microsoftcompatibilitytelemetry Method 1: Try after uninstalling the third-party protection software

See all articles