High load during restore

Ehsan

Verified User
Joined
Jul 13, 2011
Messages
30
I restored a backup which it's size was 4G,
During the restore , server's load reached 200.
Why the load goes such high during the restore?
What should I do to avoid it?

Any help would be much appreciated.
 
Hello,

Is it a VPS? I guess your disk subsystem is very busy there, and that makes slow all other processes... What does top show in the moment of restoring and before it?
 
No, It's dedicated with 8G Memory and 4 core cpu, I restored the file again to see what the top is showing,
The system is not busy before and after the restore and average load is about 0.5 ,
This time server's load reached to 370!
The top command shows "gzip -d" as most active process during the high load period.
Doesn't DA support cpuwatch as cPanel does?
 
If you want to get help on these forums, you'd better follow the recommendations, and give the output of the top. As without that with the same certainty of a success you can Google. The first 5 lines of top might help us to help you.
 
You've got 85% wa (wa = Waiting for I/O), your HDD is too busy, and that makes slow all the other processes. You might need to check your HDD(s) with smartmontools, and/or replace them.
 
I've the same issue but during the backup,
I got many clients with more than 25 GB of files,
Doesn't DirectAdmin support something like cpuwatch of cPanel?
 
By default no, it does not support anything like cpuwatch. Though all tasks are being done with nice. So you might want to suggest it as feature.

Here I found a script, which can be modified a little to consider current LA and "pause tar`ing"

Code:
#!/bin/bash

# Usage:
# slowcmd.sh tar cf ~/backup.tar /usr/src/linux-2.6.25

"$@" &
PID=$!
echo "PID is $PID"
TOGGLE='Resume'
RUN_SECONDS=2
PAUSE_SECONDS=10

function procnumber () {
    echo `ps ax | awk -v var=$1 '{if($1==var){printf("%d", $1)}}'`
}

while [ "$PID" != "" ]; do
    if [ "$TOGGLE" = "Pause" ]; then
	echo "Stopping PID $PID"
	kill -s STOP $PID
	sleep "$PAUSE_SECONDS"
	TOGGLE='Resume'
    else
	echo "Resuming PID $PID"
	kill -s CONT $PID
	sleep "$RUN_SECONDS"
	PID=$(procnumber $PID)
	TOGGLE='Pause'
    fi
done

Anyway on this bases one can try to write a wrapper to tar binary, and use it on directadmin powered server
 
Back
Top