Xen und Powersave Governor
Xen und Powersave Governor
Bei meinem Xen Server hab ich immer irgendwie das Problem gehabt das sich die CPU nicht schlafen gelegt hat. Und ich den Powersave Governor nicht an den Start bekommen hab.
Heute hab ich mich mit dem Thema etwas beschäftigt und die Lösung gefunden. Sie war schon immer da aber man Sieht den Wald vor lauter Bäumen halt nicht.
Ein paar Wochen darüber schlafen und schon kommt die Lösung ganz von allein.
Als erstes laden wir das Richtige Powersave Modul
[stextbox id=“bash“]modprobe xen_acpi_processor[/stextbox]
Und damit das auch beim Booten gemacht wird packen wir es noch in die /etc/modules
[stextbox id=“bash“]nano /etc/modules[/stextbox]
# Xen Cpufreq xen_acpi_processor
Die /etc/default/grub passen wir auch noch an damit der Xen Hypervisor auch die Kontrolle übernehmen kann.
Hier fügen wir die Zeile GRUB_CMDLINE_XEN=“cpufreq=xen cpuidle“ ein
[stextbox id=“bash“]nano /etc/default/grub[/stextbox]
GRUB_CMDLINE_XEN="cpufreq=xen cpuidle"
Anschließend lassen wir Grub seine Config neu erstellen.
[stextbox id=“bash“]update-grub[/stextbox]
Jetzt sollte nach einem Neustart des Systems bei dem Befehl xenpm get-cpufreq-states so was erscheinen.
[stextbox id=“bash“]xenpm get-cpufreq-states[/stextbox]
cpu id : 0 total P-states : 8 usable P-states : 8 current frequency : 800 MHz P0 [2600 MHz]: transition [ 821] residency [ 10885 ms] P1 [2300 MHz]: transition [ 39] residency [ 285 ms] P2 [2000 MHz]: transition [ 41] residency [ 190 ms] P3 [1800 MHz]: transition [ 70] residency [ 209 ms] P4 [1600 MHz]: transition [ 293] residency [ 829 ms] P5 [1300 MHz]: transition [ 152] residency [ 1058 ms] P6 [1000 MHz]: transition [ 114] residency [ 927 ms] *P7 [ 800 MHz]: transition [ 774] residency [ 42235 ms] cpu id : 1 total P-states : 8 usable P-states : 8 current frequency : 800 MHz P0 [2600 MHz]: transition [ 821] residency [ 7996 ms] P1 [2300 MHz]: transition [ 39] residency [ 239 ms] P2 [2000 MHz]: transition [ 41] residency [ 170 ms] P3 [1800 MHz]: transition [ 70] residency [ 172 ms] P4 [1600 MHz]: transition [ 293] residency [ 430 ms] P5 [1300 MHz]: transition [ 152] residency [ 740 ms] P6 [1000 MHz]: transition [ 114] residency [ 589 ms] *P7 [ 800 MHz]: transition [ 774] residency [ 16558 ms] cpu id : 2 total P-states : 8 usable P-states : 8 current frequency : 800 MHz P0 [2600 MHz]: transition [ 821] residency [ 5715 ms] P1 [2300 MHz]: transition [ 39] residency [ 142 ms] P2 [2000 MHz]: transition [ 41] residency [ 168 ms] P3 [1800 MHz]: transition [ 70] residency [ 129 ms] P4 [1600 MHz]: transition [ 293] residency [ 412 ms] P5 [1300 MHz]: transition [ 152] residency [ 378 ms] P6 [1000 MHz]: transition [ 114] residency [ 311 ms] *P7 [ 800 MHz]: transition [ 774] residency [ 16356 ms] cpu id : 3 total P-states : 8 usable P-states : 8 current frequency : 800 MHz P0 [2600 MHz]: transition [ 821] residency [ 15699 ms] P1 [2300 MHz]: transition [ 39] residency [ 128 ms] P2 [2000 MHz]: transition [ 41] residency [ 108 ms] P3 [1800 MHz]: transition [ 70] residency [ 126 ms] P4 [1600 MHz]: transition [ 293] residency [ 445 ms] P5 [1300 MHz]: transition [ 152] residency [ 380 ms] P6 [1000 MHz]: transition [ 114] residency [ 446 ms] *P7 [ 800 MHz]: transition [ 774] residency [ 16650 ms]
Mit xenpm get-cpufreq-para bekommen wir das ganze noch etwas kompakter und wir haben auch die Info welcher Powersave Governor geladen ist.
[stextbox id=“bash“]xenpm get-cpufreq-para[/stextbox]
cpu id : 0 affected_cpus : 0 1 2 3 cpuinfo frequency : max [2600000] min [800000] cur [800000] scaling_driver : scaling_avail_gov : userspace performance powersave ondemand current_governor : ondemand ondemand specific : sampling_rate : max [10000000] min [10000] cur [20000] up_threshold : 80 scaling_avail_freq : 2600000 2300000 2000000 1800000 1600000 1300000 1000000 *800000 scaling frequency : max [2600000] min [800000] cur [800000] cpu id : 1 affected_cpus : 0 1 2 3 cpuinfo frequency : max [2600000] min [800000] cur [800000] scaling_driver : scaling_avail_gov : userspace performance powersave ondemand current_governor : ondemand ondemand specific : sampling_rate : max [10000000] min [10000] cur [20000] up_threshold : 80 scaling_avail_freq : 2600000 2300000 2000000 1800000 1600000 1300000 1000000 *800000 scaling frequency : max [2600000] min [800000] cur [800000] cpu id : 2 affected_cpus : 0 1 2 3 cpuinfo frequency : max [2600000] min [800000] cur [800000] scaling_driver : scaling_avail_gov : userspace performance powersave ondemand current_governor : ondemand ondemand specific : sampling_rate : max [10000000] min [10000] cur [20000] up_threshold : 80 scaling_avail_freq : 2600000 2300000 2000000 1800000 1600000 1300000 1000000 *800000 scaling frequency : max [2600000] min [800000] cur [800000] cpu id : 3 affected_cpus : 0 1 2 3 cpuinfo frequency : max [2600000] min [800000] cur [800000] scaling_driver : scaling_avail_gov : userspace performance powersave ondemand current_governor : ondemand ondemand specific : sampling_rate : max [10000000] min [10000] cur [20000] up_threshold : 80 scaling_avail_freq : 2600000 2300000 2000000 1800000 1600000 1300000 1000000 *800000 scaling frequency : max [2600000] min [800000] cur [800000]
Mit xenpm set-scaling-governor userspace/performance/powersave/ondemand können wir diesen auch noch beliebig setzen.
Zb:
[stextbox id=“bash“]xenpm set-scaling-governor ondemand[/stextbox]
Da ich Persönlich immer gerne den Befehl cpufreq-info hergenommen hab lege ich mir noch einen Alias in der /root/.bashrc an.
[stextbox id=“bash“]nano /root/.bashrc[/stextbox]
alias cpufreq-info='xenpm get-cpufreq-para'
Schreibe einen Kommentar