I set up a new server with 220G RAM and Ubuntu 22.04.1 LTS.
After installing MySQL I changed the mysql config to:
innodb_buffer_pool_size = 170G
innodb_buffer_pool_instances = 64
innodb_buffer_pool_chunk_size = 134217728
innodb_log_file_size = 13G
collation_server = utf8_unicode_ci
character_set_server = utf8
sql-mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,IGNORE_SPACE,NO_ENGINE_SUBSTITUTION"
user = mysql
datadir = /mnt/data/mysql/data
tmpdir = /mnt/data/mysql/tmp
key_buffer_size = 32M
thread_cache_size = 32
myisam-recover-options = BACKUP
log_error = /var/log/mysql/error.log
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 2
log_bin = /mnt/data/mysql/log/mysql-bin.log
max_binlog_size = 2G
/mnt/data
is a lvm partition with 400G.
I also installed MySQL-Exporter and node-exporter. Before I have installed both exporters, the database import worked without any problem, but if want to import the database (ca. 150G uncompressed) now, the SWAP partition gets fully occupied, but the RAM is only used up to 85%.
Now I want to find out which process is responsible for the SWAP load.
How can I list how much swap each process uses?
If possible I want to keep the swappiness value at default.
Edit:
- Increased the SWAP to 64 GiB
- For the import I reduced the swappiness to 10
- After the import I set the swappiness to 50
The server has been running for 2 months and after the import I did not have any issues with the swap partition.