diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-14 15:27:03 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-14 15:27:03 +0200 |
commit | f24b7383188b920e74aa697003edfb29d8f01ede (patch) | |
tree | 743b06ce425a2b60b16176609815320d76bec188 /storage/innobase/srv | |
parent | 17d3f8560bf6680074924d0ca2cf42d4706ea741 (diff) | |
download | mariadb-git-f24b7383188b920e74aa697003edfb29d8f01ede.tar.gz |
MDEV-24313 (2 of 2): Silently ignored innodb_use_native_aio=1bb-10.5-MDEV-24313
In commit 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02 (MDEV-16264)
the logic of os_aio_init() was changed so that it will never fail,
but instead automatically disable innodb_use_native_aio (which is
enabled by default) if the io_setup() system call would fail due
to resource limits being exceeded. This is questionable, especially
because falling back to simulated AIO may lead to significantly
reduced performance.
srv_n_file_io_threads, srv_n_read_io_threads, srv_n_write_io_threads:
Change the data type from ulong to uint.
os_aio_init(): Remove the parameters, and actually return an error code.
thread_pool::configure_aio(): Do not silently fall back to simulated AIO.
Reviewed by: Vladislav Vaintroub
Diffstat (limited to 'storage/innobase/srv')
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 4 | ||||
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 17 |
2 files changed, 11 insertions, 10 deletions
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 71ae6e04881..42cb76dcf76 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -228,9 +228,9 @@ ulint srv_lock_table_size = ULINT_MAX; ulong srv_idle_flush_pct; /** innodb_read_io_threads */ -ulong srv_n_read_io_threads; +uint srv_n_read_io_threads; /** innodb_write_io_threads */ -ulong srv_n_write_io_threads; +uint srv_n_write_io_threads; /** innodb_random_read_ahead */ my_bool srv_random_read_ahead; diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index a25335eba84..b7c4baa0ef7 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -111,7 +111,7 @@ lsn_t srv_shutdown_lsn; ibool srv_start_raw_disk_in_use; /** Number of IO threads to use */ -ulint srv_n_file_io_threads; +uint srv_n_file_io_threads; /** UNDO tablespaces starts with space id. */ ulint srv_undo_space_id_start; @@ -1192,9 +1192,7 @@ dberr_t srv_start(bool create_new_db) return(srv_init_abort(err)); } - srv_n_file_io_threads = srv_n_read_io_threads; - - srv_n_file_io_threads += srv_n_write_io_threads; + srv_n_file_io_threads = srv_n_read_io_threads + srv_n_write_io_threads; if (!srv_read_only_mode) { /* Add the log and ibuf IO threads. */ @@ -1206,15 +1204,18 @@ dberr_t srv_start(bool create_new_db) ut_a(srv_n_file_io_threads <= SRV_MAX_N_IO_THREADS); - if (!os_aio_init(srv_n_read_io_threads, - srv_n_write_io_threads, - SRV_MAX_N_PENDING_SYNC_IOS)) { - + if (os_aio_init()) { ib::error() << "Cannot initialize AIO sub-system"; return(srv_init_abort(DB_ERROR)); } +#ifdef LINUX_NATIVE_AIO + if (srv_use_native_aio) { + ib::info() << "Using Linux native AIO"; + } +#endif + fil_system.create(srv_file_per_table ? 50000 : 5000); ib::info() << "Initializing buffer pool, total size = " |