MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
Marko Mäkelä a55b951e60 MDEV-26827 Make page flushing even faster
For more convenient monitoring of something that could greatly affect
the volume of page writes, we add the status variable
Innodb_buffer_pool_pages_split that was previously only available
via information_schema.innodb_metrics as "innodb_page_splits".
This was suggested by Axel Schwenke.

buf_flush_page_count: Replaced with buf_pool.stat.n_pages_written.
We protect buf_pool.stat (except n_page_gets) with buf_pool.mutex
and remove unnecessary export_vars indirection.

buf_pool.flush_list_bytes: Moved from buf_pool.stat.flush_list_bytes.
Protected by buf_pool.flush_list_mutex.

buf_pool_t::page_cleaner_status: Replaces buf_pool_t::n_flush_LRU_,
buf_pool_t::n_flush_list_, and buf_pool_t::page_cleaner_is_idle.
Protected by buf_pool.flush_list_mutex. We will exclusively broadcast
buf_pool.done_flush_list by the buf_flush_page_cleaner thread,
and only wait for it when communicating with buf_flush_page_cleaner.
There is no need to keep a count of pending writes by the
buf_pool.flush_list processing. A single flag suffices for that.

Waits for page write completion can be performed by
simply waiting on block->page.lock, or by invoking
buf_dblwr.wait_for_page_writes().

buf_LRU_block_free_non_file_page(): Broadcast buf_pool.done_free and
set buf_pool.try_LRU_scan when freeing a page. This would be
executed also as part of buf_page_write_complete().

buf_page_write_complete(): Do not broadcast buf_pool.done_flush_list,
and do not acquire buf_pool.mutex unless buf_pool.LRU eviction is needed.
Let buf_dblwr count all writes to persistent pages and broadcast a
condition variable when no outstanding writes remain.

buf_flush_page_cleaner(): Prioritize LRU flushing and eviction right after
"furious flushing" (lsn_limit). Simplify the conditions and reduce the
hold time of buf_pool.flush_list_mutex. Refuse to shut down
or sleep if buf_pool.ran_out(), that is, LRU eviction is needed.

buf_pool_t::page_cleaner_wakeup(): Add the optional parameter for_LRU.

buf_LRU_get_free_block(): Protect buf_lru_free_blocks_error_printed
with buf_pool.mutex. Invoke buf_pool.page_cleaner_wakeup(true) to
to ensure that buf_flush_page_cleaner() will process the LRU flush
request.

buf_do_LRU_batch(), buf_flush_list(), buf_flush_list_space():
Update buf_pool.stat.n_pages_written when submitting writes
(while holding buf_pool.mutex), not when completing them.

buf_page_t::flush(), buf_flush_discard_page(): Require that
the page U-latch be acquired upfront, and remove
buf_page_t::ready_for_flush().

buf_pool_t::delete_from_flush_list(): Remove the parameter "bool clear".

buf_flush_page(): Count pending page writes via buf_dblwr.

buf_flush_try_neighbors(): Take the block of page_id as a parameter.
If the tablespace is dropped before our page has been written out,
release the page U-latch.

buf_pool_invalidate(): Let the caller ensure that there are no
outstanding writes.

buf_flush_wait_batch_end(false),
buf_flush_wait_batch_end_acquiring_mutex(false):
Replaced with buf_dblwr.wait_for_page_writes().

buf_flush_wait_LRU_batch_end(): Replaces buf_flush_wait_batch_end(true).

buf_flush_list(): Remove some broadcast of buf_pool.done_flush_list.

buf_flush_buffer_pool(): Invoke also buf_dblwr.wait_for_page_writes().

buf_pool_t::io_pending(), buf_pool_t::n_flush_list(): Remove.
Outstanding writes are reflected by buf_dblwr.pending_writes().

buf_dblwr_t::init(): New function, to initialize the mutex and
the condition variables, but not the backing store.

buf_dblwr_t::is_created(): Replaces buf_dblwr_t::is_initialised().

buf_dblwr_t::pending_writes(), buf_dblwr_t::writes_pending:
Keeps track of writes of persistent data pages.

buf_flush_LRU(): Allow calls while LRU flushing may be in progress
in another thread.

Tested by Matthias Leich (correctness) and Axel Schwenke (performance)
2023-03-16 17:19:58 +02:00
.github Add Pull Request template file to the MariaDB/server repository 2021-05-27 16:28:28 +03:00
BUILD Added detection of memory overwrite with multi_malloc 2023-02-27 19:25:44 +02:00
client Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
cmake Merge branch '10.5' into 10.6 2023-01-31 09:31:42 +01:00
dbug Merge branch '10.6.12' into 10.6 2023-02-06 20:18:44 +01:00
debian Merge 10.5 into 10.6 2023-03-10 09:35:50 +02:00
Docs Merge 10.4 into 10.5 2022-09-26 13:34:38 +03:00
extra Merge 10.5 into 10.6 2023-03-16 15:48:08 +02:00
include Merge 10.5 into 10.6 2023-03-10 09:35:50 +02:00
libmariadb@12bd1d5511 CONC-637 Build fails when specifying -DPLUGIN_AUTH_GSSAPI_CLIENT=OFF 2023-02-28 20:15:56 +01:00
libmysqld Merge 10.5 into 10.6 2022-12-13 16:58:58 +02:00
libservices Add build on AIX 2020-12-16 08:07:04 +11:00
man Merge 10.5 into 10.6 2022-11-30 07:06:41 +02:00
mysql-test MDEV-26827 Make page flushing even faster 2023-03-16 17:19:58 +02:00
mysys Merge 10.5 into 10.6 2023-02-28 16:05:21 +02:00
mysys_ssl Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
plugin Merge 10.5 into 10.6 2023-03-10 09:35:50 +02:00
randgen/conf Group commit for maria engine. 2010-02-12 15:12:28 +02:00
scripts Update 10.5 HELP tables 2023-01-24 11:28:37 +11:00
sql Merge 10.5 into 10.6 2023-03-10 09:35:50 +02:00
sql-bench MDEV-24854: Change innodb_flush_method=O_DIRECT by default 2021-02-20 11:58:58 +02:00
sql-common Merge branch '10.5' into 10.6 2022-05-10 14:01:23 +02:00
storage MDEV-26827 Make page flushing even faster 2023-03-16 17:19:58 +02:00
strings Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
support-files Merge branch 10.5 into 10.6 2022-12-15 09:32:54 +11:00
tests Merge 10.5 into 10.6 2022-10-25 14:25:42 +03:00
tpool Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
unittest Merge 10.5 into 10.6 2022-12-05 18:04:23 +02:00
vio Merge branch '10.5' into 10.6 2022-11-02 14:33:20 +01:00
win Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
wsrep-lib@275a0af8c5 MDEV-30419 Fix unhandled exception thrown from wsrep-lib 2023-01-19 14:55:50 +02:00
zlib zlib: remove redundant and generated files 2022-07-26 16:46:27 +02:00
.clang-format Merge 10.4 into 10.5 2019-12-27 21:17:16 +02:00
.gitattributes Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
.gitignore Merge branch '10.5' into 10.6 2022-05-10 14:01:23 +02:00
.gitlab-ci.yml Fix build failure in sanitizer on GitLab-CI 2022-12-20 13:27:50 +00:00
.gitmodules Merge 10.4 into 10.5 2023-01-03 17:08:42 +02:00
appveyor.yml Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
BUILD-CMAKE Minor spelling fixes in code comments, docs and output 2018-01-12 16:49:02 +02:00
CMakeLists.txt Merge 10.5 into 10.6 2023-01-03 18:13:11 +02:00
config.h.cmake Merge 10.5 into 10.6 2022-10-12 12:14:13 +03:00
configure.cmake Merge 10.5 into 10.6 2022-10-06 09:22:39 +03:00
CONTRIBUTING.md Remove mention of Freenode 2021-09-22 07:15:08 +02:00
COPYING Update FSF Address 2019-05-11 21:29:06 +03:00
CREDITS CREDITS: re-instate Tencent Cloud 2023-01-25 16:44:26 +11:00
INSTALL-SOURCE Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
INSTALL-WIN-SOURCE Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
KNOWN_BUGS.txt Changed some MySQL names in messages to MariaDB 2018-12-09 20:49:05 +02:00
README.md Remove mention of Freenode 2021-09-22 07:15:08 +02:00
THIRDPARTY Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
VERSION bump the VERSION 2023-02-06 10:24:21 -05:00

Code status:

  • Appveyor CI status ci.appveyor.com

MariaDB: The open source relational database

MariaDB was designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.

MariaDB is brought to you by the MariaDB Foundation and the MariaDB Corporation. Please read the CREDITS file for details about the MariaDB Foundation, and who is developing MariaDB.

MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Corporation, the MariaDB Foundation and by many people in the community.

MySQL, which is the base of MariaDB, is a product and trademark of Oracle Corporation, Inc. For a list of developers and other contributors, see the Credits appendix. You can also run 'SHOW authors' to get a list of active contributors.

A description of the MariaDB project and a manual can be found at:

https://mariadb.org

https://mariadb.com/kb/en/

https://mariadb.com/kb/en/mariadb-vs-mysql-features/

https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/

https://mariadb.com/kb/en/new-and-old-releases/

Help

More help is available from the Maria Discuss mailing list https://launchpad.net/~maria-discuss, MariaDB's Zulip instance, https://mariadb.zulipchat.com/

Live QA for beginner contributors

MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip. From 8:00 to 10:00 UTC on Mondays, and 10:00 to 12:00 UTC on Thursdays, anyone can ask any questions theyd like, and a live developer will be available to assist.

New contributors can ask questions any time, but we will provide immediate feedback during that interval.

Licensing


NOTE:

MariaDB is specifically available only under version 2 of the GNU General Public License (GPLv2). (I.e. Without the "any later version" clause.) This is inherited from MySQL. Please see the README file in the MySQL distribution for more information.

License information can be found in the COPYING file. Third party license information can be found in the THIRDPARTY file.


Bug Reports

Bug and/or error reports regarding MariaDB should be submitted at: https://jira.mariadb.org

For reporting security vulnerabilities see: https://mariadb.org/about/security-policy/

The code for MariaDB, including all revision history, can be found at: https://github.com/MariaDB/server