{"id":20179590,"url":"https://github.com/lrf141/innodb_buffer_page_underuse","last_synced_at":"2026-06-11T14:32:08.719Z","repository":{"id":129947682,"uuid":"268701445","full_name":"lrf141/innodb_buffer_page_underuse","owner":"lrf141","description":"INFORMATION_SCHEMA plugin to aggregate unreferenced page information in the InnoDB Old Sublist","archived":false,"fork":false,"pushed_at":"2020-06-06T04:32:16.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T05:42:22.966Z","etag":null,"topics":["buffer-pool","information-schema","innodb","lru-cache","mysql-plugin","mysql8"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lrf141.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-02T04:34:09.000Z","updated_at":"2022-03-19T04:06:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4f65451-ef4f-427c-a0c4-e68abb785aec","html_url":"https://github.com/lrf141/innodb_buffer_page_underuse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lrf141/innodb_buffer_page_underuse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrf141%2Finnodb_buffer_page_underuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrf141%2Finnodb_buffer_page_underuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrf141%2Finnodb_buffer_page_underuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrf141%2Finnodb_buffer_page_underuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lrf141","download_url":"https://codeload.github.com/lrf141/innodb_buffer_page_underuse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrf141%2Finnodb_buffer_page_underuse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34204179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buffer-pool","information-schema","innodb","lru-cache","mysql-plugin","mysql8"],"created_at":"2024-11-14T02:27:24.077Z","updated_at":"2026-06-11T14:32:08.695Z","avatar_url":"https://github.com/lrf141.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# innodb_buffer_page_underuse\n\nINFORMATION_SCHEMA plugin to aggregate unreferenced page information in the InnoDB Old Sublist.\n\n# Details\nINFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU to It is possible to use a buffer pool to obtain detailed information about a page in the buffer pool.  \nHowever, SELECTing the table would only free up 64 bytes of memory to Required. Therefore, it is not recommended to run it even in the official documentation.  \n\nDifficult to hit the table to see how long a never-used file in the buffer pool, especially in Old Sublist, has existed.  \nSo I developed the INFORMATION_SCHEMA Plugin to get only records with IS_OLD = 'YES' and OLDEST_MODIFICATION = 0, with minimal information.  \nThe memory usage is roughly less than 16 bytes * 3/8 * ActivePage.  \n\n# INNODB_BUFFER_PAGE_UNDERUSE column desc\n\n```\nmysql\u003e desc information_schema.innodb_buffer_page_underuse;\n+-----------+--------------+------+-----+---------+-------+\n| Field     | Type         | Null | Key | Default | Extra |\n+-----------+--------------+------+-----+---------+-------+\n| POOL_ID   | int unsigned | NO   |     |         |       |\n| SPACE_ID  | int unsigned | NO   |     |         |       |\n| PAGE_TYPE | varchar(28)  | NO   |     |         |       |\n| TIMESTAMP | int unsigned | NO   |     |         |       |\n+-----------+--------------+------+-----+---------+-------+\n4 rows in set (0.01 sec)\n\n```\n(TIMESTAMP: unix time (sec))\n\n# Example\n```\nmysql\u003e select pool_id, space_id, page_type, FROM_UNIXTIME(timestamp) from information_schema.innodb_buffer_page_underuse where timestamp != 0 limit 10;\n+---------+------------+------------+--------------------------+\n| pool_id | space_id   | page_type  | FROM_UNIXTIME(timestamp) |\n+---------+------------+------------+--------------------------+\n|       0 |          0 | SYSTEM     | 2020-06-05 09:21:32      |\n|       0 |          0 | INODE      | 2020-06-05 09:21:32      |\n|       0 |          0 | INODE      | 2020-06-05 09:21:32      |\n|       0 |          0 | SYSTEM     | 2020-06-05 09:21:32      |\n|       0 | 4294967279 | RSEG_ARRAY | 2020-06-05 09:21:32      |\n|       0 | 4294967279 | UNDO_LOG   | 2020-06-05 09:21:32      |\n|       0 | 4294967279 | UNDO_LOG   | 2020-06-05 09:21:32      |\n|       0 | 4294967279 | UNDO_LOG   | 2020-06-05 09:21:32      |\n|       0 | 4294967279 | UNDO_LOG   | 2020-06-05 09:21:32      |\n|       0 | 4294967279 | UNDO_LOG   | 2020-06-05 09:21:32      |\n+---------+------------+------------+--------------------------+\n10 rows in set (0.00 sec)\n```\n\n# How To Build\nMust be built with the target mysql-server.\n\n1. Download MySQL-Server source code\n```bash\n$ wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-8.0.19.tar.gz\n$ tar xzvf mysql-boost-8.0.19.tar.gz\n$ cd mysql-8.0.19\n```\n2. Clone this repo clone under the plugin directory\n```bash\n$ cd plugin/\n$ git clone git@github.com:lrf141/innodb_buffer_page_underuse.git\n```\n3. Build MySQL-Server\n```bash\n// move to mysql-server root dir\n$ cd ../../\n$ cmake . -DWITH_BOOST=./boost -DFORCE_INSOURCE_BUILD=1\n$ make\n```\n\n# How To Install\n\n1. Check MySQL Plugin Dir\n\n```\nmysql\u003e show variables like 'plugin_dir';\n+---------------+----------------------------------------------+\n| Variable_name | Value                                        |\n+---------------+----------------------------------------------+\n| plugin_dir    | /path/to/plugin/dir/                         |\n+---------------+----------------------------------------------+\n1 row in set (0.01 sec)\n```\n\n2. Move Plugin Shared-Object File\n\n```\n$ cp path/to/mysql-server/plugin_output_directory/innodb_buffer_page_underuse.so /path/to/plugin/dir/innodb_buffer_page_underuse.so\n```\n\n3. Install Plugin\n```\nmysql\u003e install plugin innodb_buffer_page_underuse soname 'innodb_buffer_page_underuse.so';\n```\n\n4. Check INFORMATION_SCHEMA table\n```\nmysql\u003e use INFORMATION_SCHEMA;\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\nmysql\u003e show tables like 'innodb_buffer_page_underuse';\n+------------------------------------------------------------+\n| Tables_in_information_schema (INNODB_BUFFER_PAGE_UNDERUSE) |\n+------------------------------------------------------------+\n| INNODB_BUFFER_PAGE_UNDERUSE                                |\n+------------------------------------------------------------+\n1 row in set (0.00 sec)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrf141%2Finnodb_buffer_page_underuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flrf141%2Finnodb_buffer_page_underuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrf141%2Finnodb_buffer_page_underuse/lists"}