Ubuntu 22.04 - Disk I/O Performance implementing ext4 Filesystem on LVM Setup
I'm working on a project and hit a roadblock... Hey everyone, I'm running into an issue that's driving me crazy. I'm experiencing important disk I/O performance optimization on my Ubuntu 22.04 server that uses an ext4 filesystem on an LVM setup. The server is hosting a web application, and during peak usage, the response time for database queries increases dramatically. I have a logical volume that's allocated 100GB for MySQL data storage, and I'm noticing that disk operations are causing bottlenecks. When I run `iostat -x 1`, I observe that both the `%util` and `await` values are frequently peaking at 100% and over several milliseconds, respectively. To troubleshoot, I've already done the following: - Checked for any running processes that may be causing excessive I/O using `iotop` and found that most loads are from MySQL during high traffic. - Verified that there's sufficient free space in the volume group with `vgs` and `lvs` commands. - Analyzed MySQL's configuration and ensured that `innodb_flush_log_at_trx_commit` is set to `1` for durability, but this may be contributing to the high disk writes. I've also considered changing the filesystem to xfs for better performance, but I'm unsure if this would solve the question entirely. Hereโs how I currently mount the logical volume: ```bash /dev/mapper/vg_name-lv_name /var/lib/mysql ext4 defaults,noatime,nosuid 0 2 ``` Could the options Iโm using be contributing to the high I/O wait? Would switching to `xfs` or adjusting MySQLโs settings help alleviate these performance optimization, or are there other optimizations I should consider? For context: I'm using Bash on macOS. Any ideas what could be causing this? I'm working on a API that needs to handle this. Any help would be greatly appreciated!