#1 Le 21/02/2011, à 20:56
- eternal404
Utilisation du disque -> Système très lent
Coucou tout le monde !
Voilà mon problème: lorsque mon disque dur est intensément sollicité, Ubuntu rame à mort, au point d'être inutilisable !
exemple: copie de 40Go de photos, d'un disque NTFS USB vers ma partition NTFS SATA.
Ma config: i7, 4go de ram...
Les disques sont tous les deux récents, à moitié pleins et à peu près défragmentés.
Par contre, j'ai pas mis de swap.
Lors de la copie, le CPU est sollicité à moins de 15%, la RAM reste remplie à moins des 2/3...
Le système redevient très fluide une fois la copie terminée, pas besoin de redémarrer.
Ce problème a déjà été rencontré sur ces deux topics:
http://forum.ubuntu-fr.org/viewtopic.php?id=402720
http://forum.ubuntu-fr.org/viewtopic.php?id=399350
Mais aucun n'a apporté de solution...
Merci d'avance pour vos conseils
Hors ligne
#2 Le 23/02/2011, à 21:42
- eternal404
Re : Utilisation du disque -> Système très lent
Petit up
Hors ligne
#3 Le 23/02/2011, à 23:02
- kyncani
Re : Utilisation du disque -> Système très lent
Perso je donne des priorités faibles pour avoir un système réactif : nice -n 20 ionice -c3 schedtool -D -e cp -a SOURCE... REPERTOIRE
Ou alors avec le petit script "supernice" que je me suis fait : supernice cp -a SOURCE... REPERTOIRE
#! /usr/bin/env bash
######################################################################
## Program usage
usage() {
cat <<EOF
NAME
supernice - execute a program with the lowest available priority
superstrong - execute a program with the highest available priority
SYNOPSIS
$prog COMMAND ...
$prog PID ...
DESCRIPTION
supernice will execute a program with the lowest available priority.
superstrong will execute a program with the highest available priority.
It can start a new command or alter running processes, if given
their pids.
AUTHOR
Yannick Le Saint (kyncani) <y.lesaint@gmail.com>
VERSION
$version
EOF
}
######################################################################
## Give a message if some binary is missing, like which package to
## install. Only give a warning once per tool.
missing_tool() {
local t
local p
for t in "$@"; do
echo " $SUPERNICE_WARN_MISSING " | grep -q " $t " && continue
if type apt-file &>/dev/null; then
p=`
apt-file search "bin/$t" \
| grep "bin/$t\$" \
| sed "s/:.*//" \
| sort \
| uniq \
| tr '\n' ':' \
| sed 's/:::*/:/g; s/^://; s/:$//; s/:/ or /g' \
`
else
p=
fi
if test "$p" = ""; then
echo "$prog: $t is missing." >&2
else
echo "$prog: $t is missing, you may need to install $p." >&2
fi
if test "$SUPERNICE_WARN_MISSING" = ""; then
export SUPERNICE_WARN_MISSING=" $t "
else
export SUPERNICE_WARN_MISSING="$SUPERNICE_WARN_MISSING$t "
fi
done
}
## Supernice a running process, given its pid
supernice_this() {
local ret=true
local foundtool=false
if ! echo "$1" | grep -q '^[[:digit:]][[:digit:]]*$'; then
echo "$prog: not a pid: $1" >&2
return 1
fi
if type renice &>/dev/null; then
foundtool=true
if $supernicemode; then
renice 20 "$1" >/dev/null
else
renice -20 "$1" >/dev/null
fi || ret=false
else
missing_tool renice
fi
if type ionice &>/dev/null; then
foundtool=true
if $supernicemode; then
ionice -c3 -p"$1"
else
ionice -c1 -p"$1"
fi || ret=false
else
missing_tool ionice
fi
if type schedtool &>/dev/null; then
foundtool=true
if $supernicemode; then
schedtool -D "$1"
else
schedtool -F -p 20 "$1"
fi || ret=false
else
missing_tool schedtool
fi
if ! $foundtool; then
echo "$prog: cannot find neither renice, schedtool nor ionice." >&1
ret=false
fi
$ret
}
######################################################################
## Program name
prog=`basename "$0"`
## Program version
version="1.0.3"
## Supernice mode, false means we're in superstrong mode
supernicemode=
######################################################################
if test $# -lt 1; then
usage >&2
exit 1
fi
if test "$1" = "-h" || test "$1" = "--help"; then
usage && exit || exit 1
fi
case "$prog" in
supernice) supernicemode=true;;
superstrong) supernicemode=false;;
*)
echo "$prog: should be named supernice or superstrong." >&2
supernicemode=
;;
esac
if echo "$1" | grep -q '^[[:digit:]][[:digit:]]*$'; then
test "$supernicemode" = "" && exit 1
ret=true
for pid in "$@"; do
supernice_this "$pid" || ret=false
done
$ret
else
test "$supernicemode" = "" || supernice_this $$
exec "$@"
fi
######################################################################
##
## CHANGELOG
##
## - 02/02/2009,21:59 (version 1.0.3)
## - Added superstrong mode.
## - 31/01/2009,21:10 (version 1.0.2)
## - Debian: Nicely tell which packages to install using apt-file.
## - Change cpu priority before io priority.
## - 26/01/2009,21:28 (version 1.0.1)
## - Added --help option.
## - Can now supernice running processes.
## - Added some documentation.
## - Added some error message in case no basic tools are found.
## - 26/01/2009,21:11 (version 1.0.0)
## - Added version and changelog.
##
######################################################################
Hors ligne