Applies to: SQL Server 2022 on Linux, SQL Server 2019 on Linux
Introduction
This article describes the SQLIOSim tool. You can use this tool to perform reliability and integrity tests on disk subsystems for SQL Server on Linux and container platforms. These tests simulate read, write, checkpoint, backup, sort, and read-ahead activities for SQL Server on Linux.
The SQLIOSim tool was first written for and released on the Windows platform. SQLIOSim has a dependency on the SQLPAL platform, which enables the execution of the Windows SQLIOSim utility on Linux.
Supported platforms
| Platform | File system | Installation guide |
|---|---|---|
| Red Hat Enterprise Linux 7.9, or 8.x Server | XFS or EXT4 | Red Hat installation guide |
| SUSE Enterprise Linux Server v12 (SP4 - SP5), or v15 (SP1 - SP4) | XFS or EXT4 | SUSE Linux Enterprise Server installation guide |
| Ubuntu 18.04 LTS, 20.04 LTS | XFS or EXT4 | Ubuntu installation guide |
| Docker Engine 1.8+ on Windows, macOS, or Linux | N/A | Run SQL Server container images with Docker guide |
SQLIOSim on Linux installation instructions
To install SQLIOSim, follow the steps relevant to the Linux distribution the host machine is running.
Red Hat Enterprise Linux (RHEL)
-
Use the following commands to add the repository:
-
For RHEL 7:
-
SQL Server 2019:
sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2019.repo
-
-
For RHEL 8:
-
SQL Server 2019:
sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo -
SQL Server 2022:
sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2022.repo
-
-
-
After you've added the repository, run the installation with the following commands:
-
Switch to the root user:
sudo su -
Set the environment variable
ACCEPT_EULAtoy, to accept the End-User License Agreement:export ACCEPT_SQLIOSIM_EULA=y -
Install SQLIOSim:
yum install mssql-server-sqliosim
-
SUSE Linux Enterprise Server (SLES)
-
Add the repository:
-
For SLES v12:
-
SQL Server 2019:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/12/mssql-server-2019.repo
-
-
For SLES v15:
-
SQL Server 2019:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/15/mssql-server-2019.repo -
SQL Server 2022:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/15/mssql-server-2022.repo
-
-
-
Refresh the repository:
sudo zypper --gpg-auto-import-keys refresh -
Download Microsoft signing key:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc -
Now, run the installation using the following commands:
-
Switch to the root user:
sudo su -
Set the environment variable
ACCEPT_EULAtoy, to accept the End-User License Agreement:export ACCEPT_SQLIOSIM_EULA=y -
Install SQLIOSim:
zypper install mssql-server-sqliosim
-
Ubuntu
-
Import the public repository GPG keys:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Add the repository:
-
For Ubuntu 18.04:
-
SQL Server 2019:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list)"
-
-
For Ubuntu 20.04:
-
SQL Server 2019:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)" -
SQL Server 2022:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2022.list)"
-
-
-
Run the installation using the following commands:
-
Switch to the root user:
sudo su -
Set the environment variable
ACCEPT_EULAtoy, to accept the End-User License Agreement:export ACCEPT_SQLIOSIM_EULA=y -
Install SQLIOSim:
apt-get install mssql-server-sqliosim
-
Run SQLIOSim as a non-root user across all distributions
Non-root users can't install SQLIOSim but can run it. To run SQLIOSim as a non-root user, add the non-root user to the "sqliosim" group. In this example, replace <account_to_add> with the account you wish to add.
sudo usermod -a -G sqliosim <account_to_add>
Sign out and sign back in with the same user credentials to ensure that group permissions take effect.
Now, you're ready to run SQLIOSim:
/opt/mssql-sqliosim/bin/sqliosim -cfg /tmp/sqliosim.default.cfg.ini -dir /tmp -log /tmp/sqliosim_log.xml
SQLIOSim configuration file
Sample configuration files for various tests can be downloaded from SQL Server support team's GitHub repository.
wget https://raw.githubusercontent.com/microsoft/mssql-support/master/sqliosim/sqliosim.cfg.linux/sqliosim.default.cfg.ini -P /tmp
wget https://raw.githubusercontent.com/microsoft/mssql-support/master/sqliosim/sqliosim.cfg.linux/sqliosim.hwcache.cfg.ini -P /tmp
wget https://raw.githubusercontent.com/microsoft/mssql-support/master/sqliosim/sqliosim.cfg.linux/sqliosim.nothrottle.cfg.ini -P /tmp
wget https://raw.githubusercontent.com/microsoft/mssql-support/master/sqliosim/sqliosim.cfg.linux/sqliosim.seqwrites.cfg.ini -P /tmp
wget https://raw.githubusercontent.com/microsoft/mssql-support/master/sqliosim/sqliosim.cfg.linux/sqliosim.sparse.cfg.ini -P /tmp
Note:
/tmpis an example path. Change it to your own path.
Sample command to run SQLIOSim with the default.ini file
/opt/mssql-sqliosim/bin/sqliosim -cfg /tmp/sqliosim.default.cfg.ini -dir /tmp -log /tmp/sqliosim_log.xml
For more information about various configuration parameters for configuration files and how to run SQLIOSim, see Use the SQLIOSim utility to simulate SQL Server activity on a disk subsystem. The article applies to SQLIOSim for Linux ecosystems as well.
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors (upstream author metadata: aartig13). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
