File: faq.html

package info (click to toggle)
cpudyn 1.0-2.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 184 kB
  • ctags: 118
  • sloc: ansic: 1,114; sh: 203; makefile: 122
file content (151 lines) | stat: -rw-r--r-- 7,488 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<html>
<head>
<title>cpudyn FAQ</title>
</head>
<body>
<h1><a href="http://mnm.uib.es/~gallir/cpudyn/">cpudyn</a> FAQ</h1>

<h3>1. What are the supported architectures?</h3>

<p>Any architecture supported by the kernel cpufreq drivers. Currently tested with x86 (Pentium and AMD),
PowerPC and ARM too.</p>

<h3>2. Which kernel versions do I need?</h3>

<p>You need a kernel 2.6 or 2.4 plus cpufreq <a href="http://www.brodo.de/cpufreq_old/">patch</a>, Alan Cox already included it in the -ac branch. If you use kernel 2.6.0 or higher, everything is already in the kernel, check you have <a href="http://mnm.uib.es/~gallir/cpudyn/powersave.png">selected the right cpufreq drivers</a>, see also #3. If you own a PowerPC (i.e. Apple) computer, and you use kernel 2.4 and have problems, then upgrade to <a href="http://penguinppc.org/~benh/">benh kernel</a>, cpudynd does work very well with his kernel.
</p>


<h3>3. How do I know that cpufreq is enabled in the kernel?</h3>

<p>Check that one of the following files or directory exist and return values with a <tt>cat</tt>:</p>

<ol>
<li><tt>/proc/cpufreq</tt> (2.4 with new API or 2.5 with "old API enabled") and/or</li>
<li><tt> cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor</tt> (new API in 2.6, see also #20)</li>
</ol>

<p>Check also that you have enabled <a href="http://mnm.uib.es/~gallir/cpudyn/powersave.png">powersave and performance governor in the kernel</a>. If they are enabled, you should see:</p>

<pre>
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
<font color="red">powersave</font> userspace <font color="red">performance</font>
</pre>

<p>cpudyn also support ACPI CPU throttling, but it doesn't work in every machine. It is recommended to use cpufreq drivers, it <b>will work</b> if the kernel supports your processor. Although I've already got additional
patches for ACPI support, they will be included as soon as I can test them (I didn't ger any machine that works correctly with ACPI).
</p>

<h3>4. The above files don't exist. What can I do?</h3>
<p>You should <a href="http://mnm.uib.es/~gallir/cpudyn/powersave.png">re-compile</a> your kernel (see question #2) enabling cpufreq support.</p>


<h3>5. My kernel supports cpufreq but it still doesn't work.</h3>

<p>I've learned that some kernels distributed by SuSE are not compatible with the standard (nevertheless, we added CPU ACPI power control for those kernels). If none of the files mentioned in #3 doesn't exist, cpudyn can do nothing.
</p>
<p>On the other hand, check if CPU ACPI throttling works by starting cpudyn manually and reading its messages. </p>

<h3>6. Why did you write cpudyn?</h3>

<p>Because I have several laptops, and I was tired of struggling with scripts based in hdparm (for APM and/or ACPI) to spindown the disk, and lastly due to the lack of userspace support for changing the CPU frequency in the new laptops, but at the same time exploit the speed of the processor when I really needed it.</p>

<h3>7. Whay does it have just two states: powersave and performance? Why don't you allow to specify other frequencies.</h3>

<p>Basically because I dont need it. I just need these two states, go to the maximum when it's needed it. Go to the minimum if it's not needed. cpudynd is very good at reacting interactively to the CPU load.
</p>

<h3>8. Why cpudynd is not started at boot time?</h3>

<p>If you did a <tt>make install</tt>, cpudyn is installed in <tt>/etc/init.d</tt>. If you wan it to be executed at boot time, you should add the corresponding links in <tt>/etc/rcX.d</tt>. Check the programn and SysV editors provided by your distro.
</p>
<p>In case you use Debian, the links are automatically created if you do <tt>make install-debian</tt></p>

<h3>9. I don't have a laptop, is still worth to use it?</h3>

<p>Many desktops hace CPUs that can change CPU frequency, if you want to lower the temperature of the CPU, the answer is yes.
</p>
<p>It is also useful if you want to spindown your disk. cpudynd is able to spindown all IDE disks.
</p>


<h3>10. How can I force cpudynd to put the CPU at maximum or minimum frequency?</h3>

<p>If you send the signal USR1, cpudynd puts the CPU at maximum speed. USR2 bring it to the minimum, HUP reset to the DYNAMIC (i.e. automatic) behaviour.</p>

<p>Ej: </p>
<pre>
   killall -USR1 cpudynd
</pre>
<p>will put the CPU at the maximum frequency.</p>

<h3>11. How can I check the current CPU frequency?</h3>

<pre>
  cat /proc/cpufreq
</pre>

<p>or</p>

<pre>
 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
</pre>

<p>in 2.6 kernels.</p>

<h3>12. Do you plan to support different frequencies or parameters when the laptop is connected to AC or is working with battery?</h3>

<p>Yes. I will do it, once APM and ACPI become more stable and they support more laptops. Currently, none of the kernel versions supports entirely my laptops, being the exception the powerpc 2.4 benh branch for PowerPC. </p>

<h3>13. My disk never stops. I compiled cpudynd with DEBUG activated and it shows there is disk activity every few seconds.</h3>

<p>Check the processes that can be writing to disks, especially syslogd, cupsd, crond, exim.</p>

<h3>14. I run cupds and it writes to disk every 5 minutes.</h3>

<p>Last versions of cupds renew its own certficate every five minutes by default and write it to <tt>/var/log/cupsd/certs/</tt>. Change that default period to a longer period, for example a day, in <tt><b>cpusd.conf</b></tt>:</p>

<pre>
RootCertDuration 86400
</pre>


<h3>15. Do I need to install apmd if I have cpudynd running?</h3>

<p>If you use apmd only for spinning down you disk (through hdparm), the answer es NO.</p>

<h3>16. Do I have to install hdparm to be able to spindown the disks?</h3>

<p>No, cpudynd has the same hdparm's "standby features" already included.</p>

<h3>17. Can I change the minimum or maximum frequency?</h3>

<p><strong>NOTE, NOTE:</strong> Since version 0.6.0 and with Linux 2.6 you can do it with <em>-minf num</em> option, where num is <em>0.0 < num < 1.0</em> .</p>

<p>Yes, by doing an <ii>echo frequency_in_KHz</i> to  <tt>/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq</tt>
or <tt>/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq</tt> respectively. Check out the available frequencies in <tt>/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies</tt>
before.</p>

<h3>18. Does it work in Hyperthreading (HT) Processors?</h3>

<p>Yes, although the stats are collected for the two processors toghether (i.e. the measured cpu idle/load is half,
if one CPU is at 100%, cpudyn will "see" 0.5). Future versions, hopefully 0.5, will fully support HT, SMP and per CPU stats and frequency.</p>

<h3>19. If a launch a niced process, CPU's frequency doesn't increase. How can I make cpudyn to take in account also the CPU time for niced processes?</h3>

<p>Niced processes are ignored by default, it's not a bug, but a feature. Normally you don't want your overnight Vorbis encoder to heat so much the CPU, so just nice it ;-). But if you want to run in performance mode even for those processes, add the command line option "-nice" and you will get it.
</p>


<h3>20. What? I use kernel 2.6 but don't any mounted at /sys.</h3>

<p>
You should mount the new sysfs in <tt>/sys</tt>. So check you have created the <tt>/sys</tt> directory and then added the following line to <tt>/etc/fstab</tt>.
</p>
<pre>
sysfs           /sys    sysfs   defaults        0       0
</pre>


</body>
</html>