D
D
Dmitry Luponos2013-08-01 05:04:28
linux
Dmitry Luponos, 2013-08-01 05:04:28

CentOS: constant load on sda disk. How to determine the cause

Good time of the day. Please do not call me a lamer, for the first time I encountered a problem. Server on CentOS. Software RAID 4 HDD: sda, sdb.
There is a system on sda, directory /var. Site files and database are on sdb (hardlinks from /var/www to sdb and /var/lib/mysql to sdb).
However, sda is constantly loaded with something by 80 percent. In short, the write / read speed for services is low. Everything has to be crammed into memory (mysql: 11G, apache 4G). nginx is not offered yet. So, until search bots come or the scripts start, everything moves, but as soon as something other than the two services voiced starts, for example rsync (sdb-> sdb-> to the cloud). death comes to everything, loading sda 100% for hours.

Question: how to determine what sda is loaded with.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
T
t_q_l, 2013-08-01
@Bessome

Try the iotop utility to analyze disk activity:
image

P
Puma Thailand, 2013-08-01
@opium

well, determine which process by iotop, and guessing by lsof which file is not difficult.

K
kenny_opennix, 2013-08-01
@kenny_opennix

Look at the dstat software.
dstat -c --top-cpu -d --top-bio --top-latency
Looks like this
image

N
Nikolai Turnaviotov, 2013-08-01
@foxmuldercp

Maybe your SSD is dying or the controller on the motherboard / raid. Also, it could be a broken cable.
Even from a regular desktop SSD, files are usually transferred at space speed.

M
miragenn, 2013-08-01
@miragenn

atop, iotop will show which process is loading.
strace will show which files this process is working on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question