Strona 1 z 1
Energooszczędność, a Linux
: 25 października 2010, 07:48
autor: c2h5oh
Witam wszystkich forumowiczów.
Jest to mój pierwszy post i pierwsza praca z Linuksem, nie ukrywam, że na razie ciężko mi się połapać, ale nie poddaję się.
Problem polega na tym, że planuję uruchomić domowy serwer 24/7 i chciałbym oszczędzić jak najwięcej energii. Mam na myśli funkcję ,,Cool'n'Quiet''. Czy jest możliwe użycie takiego oprogramowania? Czy są może inne rozwiązania?
Pozdrawiam.
: 25 października 2010, 07:52
autor: michnik
To co mówi na temat Cool'n'Quiet WIKIPEDIA:
Cool'n'Quiet is fully supported in Linux from 2.6.18 (using the powernow-k8 driver) and FreeBSD from 6.0-CURRENT onward.
: 25 października 2010, 08:08
autor: c2h5oh
Ale ja nie mam pojęcia jak do tego się zabrać, jakie komendy wpisać, co pobrać. Proszę o "łopatologiczne" wyjaśnienie.
: 25 października 2010, 08:54
autor: runcmd
Przede wszystkim sprawdź, czy masz zainstalowane następujące paczki:
Jeżeli masz to dobrze, a jeżeli nie to zainstaluj. Za pomocą polecenia:
Sprawdź, czy
procesor jest poprawni
e wykrywany. Ważna jest sekcja:
Jeżeli procesor jest poprawnie wykrywany to dobrze, a jeżeli nie to musisz załadować odpowiednie moduły. Poradnik znajdziesz na wiki Debiana.
W pliku:
albo:
(nie pamiętam piszę to z głowy) znajdziesz linijkę:
- ,,performance'', największa wydajność procesora i największe zużycie energii. Może wymagać załadowania modułu:
- ,,powersave'', najmniejsze zużycie energii ale i najmniejsza wydajność. Może wymagać załadowania modułu:
- ,,ondemand'', dynamiczne ustawienie. Najlepsze dla stacji roboczych. Wydajność i energia są przydzielane w zależności od zapotrzebowania. Może wymagać modułu:
- ,,conservative'', również dynamiczny ale z lekkim przechyłem w stronę ,,powersave''. Przeznaczony z myślą o laptopach. Może wymagać modułu:
Teraz tylko musisz edytować ,,GOVERNOR'' opcje w podanym pliku i sprawdzić, czy masz załadowany odpowiedni moduł. To powinno załatwić sprawę.
Pozdrawiam,
runcmd.
: 26 października 2010, 01:48
autor: c2h5oh
Po instalacji i wpisaniu
Kod: Zaznacz cały
cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@lists.linux.org.uk, please.
analyzing CPU 0:
driver: powernow-k8
CPUs which need to switch frequency at the same time: 0
hardware limits: 800 MHz - 2.90 GHz
available frequency steps: 2.90 GHz, 2.10 GHz, 1.50 GHz, 800 MHz
available cpufreq governors: userspace, ondemand, conservative, powersave, performance
current policy: frequency should be within 800 MHz and 2.90 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 2.90 GHz (asserted by call to hardware).
cpufreq stats: 2.90 GHz:100,00%, 2.10 GHz:0,00%, 1.50 GHz:0,00%, 800 MHz:0,00%analyzing CPU 1:
driver: powernow-k8
CPUs which need to switch frequency at the same time: 1
hardware limits: 800 MHz - 2.90 GHz
available frequency steps: 2.90 GHz, 2.10 GHz, 1.50 GHz, 800 MHz
available cpufreq governors: userspace, ondemand, conservative, powersave, performance
current policy: frequency should be within 800 MHz and 2.90 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 2.90 GHz (asserted by call to hardware).
cpufreq stats: 2.90 GHz:100,00%, 2.10 GHz:0,00%, 1.50 GHz:0,00%, 800 MHz:0,00%
Pliku:
nie znalazłem, za to znalazłem plik "cpufrequtils" w:
i edytowałem tak:
Kod: Zaznacz cały
#!/bin/sh
### BEGIN INIT INFO
# Provides: cpufrequtils
# Required-Start: $remote_fs loadcpufreq
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: set CPUFreq kernel parameters
# Description: utilities to deal with CPUFreq Linux
# kernel support
### END INIT INFO
#
DESC="CPUFreq Utilities"
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
CPUFREQ_SET=/usr/bin/cpufreq-set
CPUFREQ_INFO=/usr/bin/cpufreq-info
CPUFREQ_OPTIONS=""
# use lsb-base
. /lib/lsb/init-functions
# Which governor to use. Must be one of the governors listed in:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
#
# and which limits to set. Both MIN_SPEED and MAX_SPEED must be values
# listed in:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
# a value of 0 for any of the two variables will disabling the use of
# that limit variable.
#
# WARNING: the correct kernel module must already be loaded or compiled in.
#
# Set ENABLE to "true" to let the script run at boot time.
#
# eg: ENABLE="true"
# GOVERNOR="ondemand"
# MAX_SPEED=[B]2900000[/B]
# MIN_SPEED=[B]800000[/B]
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="[B]2900000[/B]"
MIN_SPEED="[B]800000[/B]"
check_governor_avail() {
info="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
if [ -f $info ] && grep -q "\<$GOVERNOR\>" $info ; then
return 0;
fi
return 1;
}
[ -x $CPUFREQ_SET ] || exit 0
if [ -f /etc/default/cpufrequtils ] ; then
. /etc/default/cpufrequtils
fi
# if not enabled then exit gracefully
[ "$ENABLE" = "true" ] || exit 0
if [ -n "$MAX_SPEED" ] && [ $MAX_SPEED != [B]29000000[/B]" ] ; then
CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --max $MAX_SPEED"
fi
if [ -n "$MIN_SPEED" ] && [ $MIN_SPEED != "[B]800000[/B]" ] ; then
CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --min $MIN_SPEED"
fi
if [ -n "$GOVERNOR" ] ; then
CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --governor $GOVERNOR"
fi
CPUS=$(cat /proc/stat|sed -ne 's/^cpu\([[:digit:]]\+\).*/\1/p')
RETVAL=0
case "$1" in
start|force-reload|restart|reload)
log_action_begin_msg "$DESC: Setting $GOVERNOR CPUFreq governor"
if check_governor_avail ; then
for cpu in $CPUS ; do
log_action_cont_msg "CPU${cpu}"
$CPUFREQ_SET --cpu $cpu $CPUFREQ_OPTIONS 2>&1 > /dev/null || \
RETVAL=$?
done
log_action_end_msg $RETVAL ""
else
log_action_cont_msg "disabled, governor not available"
log_action_end_msg $RETVAL
fi
;;
stop)
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 1
esac
exit 0
Po restarcie i wpisaniu:
wyświetla się:
i nie widać żadnych zmian w pracy procesora i wentylatora. Co źle robię?
: 26 października 2010, 13:38
autor: sector
Co do samego wentylatora to, zmień mu kolejność kabli i puść go na 5V. O ile oczywiście nie będzie się grzał jakoś specjalnie. Chyba, nie każdy BIOS a co za tym idzie (o ile się nie mylę) OS obsługuje zmianę prędkości obrotów wentylatora.