# Persistent Media I/O in xSQL

> The eXtremeDB disk manager supports asynchronous I/O and different multi-file formats in xSQL as described in the following sections.

> ## Asynchronous file I/O

> By default, AIO is disabled. In order to use the asynchronous I/O mode, the xSQL configuration file indicates AIO mode in the `db_params` section:

>         db_params : {
>             mode_mask : use_aio,
>         }

> Optionally the value of `queue_length` can be changed. However, since xSQL can only open a single database, the number of worker threads is always one and can't be modified. To modify the `db_params.aio_queue_length` must be set. For example:

>         db_params : {
>             mode_mask : use_aio,

>             # Asynchronous I/O queue length (default is 10007)
>             aio_queue_length : 20000,
>         }

> ## Multi-file databases

> Multi-file devices are defined in the same manner as other persistent memory devices except that they are of type `multifile` or `raid`. For a `multifile` device the segment size must also be specified. For example:

>         devices : [
>         {
>             type : multifile,
>             assignment : database,
>             segment_size : 10m,
>         }
>         ...
>         \

> For a `raid` device the `offset` and `level` must also be specified. For example:

>         devices : [
>         {
>             type : raid,
>             assignment : database,
>             offset : 0,
>             level : 1,
>         }
>         ...
>         ]