0

We are in process of replacing our CentOS 7 boxes to run using Debian 12 and have noticed that the overall disk activity on the same server with the same processes running is significantly higher with Debian than when running on CentOS, nearly double. I've used iotop to track the disk activity and there is roughly double the disk read and write activity from the same usage.

These servers are running our own proprietary Java application and also MySQL servers.

Is this a normal thing to expect from Debian?

UPDATE as per comments: So far to troubleshoot we have ensured both machines are the same, identical blades, and we have tried to configure them the same. We have also been through a lot of sysctl config options to try and match them. We also tried running with ext4 and xfs to see if there was any difference. This was our first thought, as CentOS defaults to xfs and Debian to ext4, but changing debian to xfs made no difference.

VMSTAT outputs. CentOS Machine:

[CENTOS ~]# vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
0  0 762040 229876      0 22152976    0    1   560   336    3    4  3  1 95  1  0
0  0 762040 230928      0 22153008    0    0     0     0 1545 2617  0  0 100  0  0
0  0 762040 230892      0 22153008    0    0     0     0 1329 2520  0  0 98  1  0
0  0 762040 230892      0 22153008    0    0     0     0 1527 2618  0  0 99  0  0
0  0 762040 230892      0 22153008    0    0     0     0 1468 2570  0  0 99  0  0

Debian Machine:

DEBIAN:~# vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
2  0      0 226980      0 19532532    0    0  1910   617  406  401  3  1 95  1  0
1  0      0 226980      0 19532532    0    0     0     0 1961 2441  0  0 99  0  0
1  0      0 226980      0 19532532    0    0     0     0 2207 2621  1  0 99  0  0
1  0      0 226980      0 19532532    0    0     0     0 1896 2418  0  0 99  0  0
1  0      0 226980      0 19532532    0    0     0     0 2305 2696  0  0 99  0  0
7
  • Can you provide result from vmstat 1 5 for both OS? Commented Feb 20 at 9:57
  • 1
    What have you done already to identify the cause? What have you ruled out? Why?
    – symcbean
    Commented Feb 20 at 10:38
  • You're not comparing Debian and CentOS: you are comparing software that is ten years apart for all major components.
    – vidarlo
    Commented Feb 20 at 10:49
  • 1
    I note that CentOS uses swap and Debian doesn't: is there swap on Debian? Not having any swap prevents non-used code/data to be swapped out (and then as can be seen with 0 in "si" and "so" not having any adverse effect), leaving less RAM available for cache, thus increasing disk use.
    – A.B
    Commented Feb 20 at 12:01
  • 1
    swappiness setting?
    – AlexD
    Commented Feb 20 at 12:54

2 Answers 2

0

I would suggest to let atop run in the background and review the capture atop makes in an Interval and see if that gives any insight

You could also make a script and let that run in the background to make a capture with atop when there is high disk activity

#!/bin/bash

# Threshold for disk activity (in percentage)
threshold=80

while true; do
    # Get disk utilization percentage
    disk_util=$(iostat -d -x 1 1 | awk '/^[hsv]d[a-z]? / {print $NF}')

    # Check if disk activity exceeds threshold
    if [[ $(echo "$disk_util > $threshold" | bc) -eq 1 ]]; then
        echo "Disk activity is high. Starting atop..."
        atop -d 1
    fi

    # Sleep for a short duration before checking again
    sleep 10
done

Save this script as disk-monitor.sh and let it run in the background with nohup ./disk_monitor.sh &

0

If running MySQL, try replacing it with MariaDB. I noticed vastly lower IO with the latter (which is the default on CentOS 7).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .