The eXtremeDB disk manager supports asynchronous I/O as described in the following section.
Asynchronous file I/O
By default, AIO is disabled. In order to use the asynchronous I/O mode, the application specifies
DbParamsModeMask.USE_AIOin theopen_database()argumentdb_params_mode_mask. The default parameters for AIO aremax_queue_length=10007(the size of the asynchronous transaction buffer) andn_workers=1(the number of worker threads writing data to the persistent media.) If these parameters need to be altered theaio_start()API must be called beforeopen_database(). Theaio_start()API signature is as follows:aio_start(max_queue_length, n_workers);And when closing the database, AIO processing should be closed explicitly by calling Database method
aio_stop(). For example:exdb.aio_start(1000,2); db = exdb.open_database(dbname=’perfdb’, dictionary=dict, is_disk=true, db_segment_size=900*1024*1024, db_log_type = ‘UNDO_LOG’, log_params = log_params, db_params_mode_mask=exdb.DbParamsModeMask.USE_AIO ); ... // Database processing exdb.aio_stop();By default, one AIO thread is started for each database and the default queue size is set to 10007. Sometimes it could be beneficial to change the number of AIO threads (for example if the database is comprised of multiple physical IO devices, or is resided on a RAID) and/or the queue size. However note that the number of I/O threads won't exceed the number of databases created in a process, regardless of the value of worker threads passed by the application (the runtime does not allow more than one AIO thread to serve a database)
(Applications do not need to call either of these methods,
aio_start()oraio_stop(), if the default values are acceptable.)