Difference between revisions of "Template:CPUOverClock/zh"
From FriendlyELEC WiKi
(updated by API) |
(updated by API) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | ===如何超频=== | |
+ | =====选择合格的电源===== | ||
+ | 超频使用'''{{{1}}}'''需要保证有稳定可靠的电源供应,这包括标称真实,质量可靠的电源适配器,以及低阻抗的Type-C连接线(通俗讲就是铜芯足够粗,旧款为MicroUSB连接线)。 | ||
+ | =====保证散热措施===== | ||
+ | 超频会令'''{{{1}}}'''发热增加,必须使用金属外壳进行散热,或DIY使用风扇进行主动散热。<br /> | ||
+ | 另外TF卡也建议使用能支持高温条件下正常工作的TF卡,可以选购行车记录仪专用的TF卡; <br /> | ||
+ | |||
+ | ====超频测试固件==== | ||
+ | {{#switch: {{{1}}} | ||
+ | | NanoPi-R2S = | ||
+ | 该FriendlyWrt固件已解锁1.51G的CPU频率,可从以下地址下载:https://pan.baidu.com/s/1qGf9LtNFzxrcDsIKHpRMlg 密码: 80gs<br /> | ||
+ | | NanoPi-R2C = | ||
+ | 暂时没有NanoPi-R2C固件,请自行参考以下内容,修改内核重新进行编译。 | ||
+ | | NanoPi-R2C-Plus = | ||
+ | 暂时没有NanoPi-R2C-Plus固件,请自行参考以下内容,修改内核重新进行编译。 | ||
+ | | NanoPi-R2S-Plus = | ||
+ | 暂时没有NanoPi-R2S-Plus固件,请自行参考以下内容,修改内核重新进行编译。 | ||
+ | | NanoPi-R4S = | ||
+ | 该FriendlyWrt固件已解锁 大核2.2g/小核1.8g的CPU频率,可从以下地址下载:链接: https://pan.baidu.com/s/1vlkH9iT4Uq-w9rAoxph1Ag 密码: 4899<br /> | ||
+ | | #default = | ||
+ | }} | ||
+ | 进入ssh终端,输入以下命令:<br /> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | cat /sys/devices/system/cpu/cpu[04]/cpufreq/scaling_max_freq | ||
+ | </syntaxhighlight> | ||
+ | {{#switch: {{{1}}} | ||
+ | | NanoPi-R2S | ||
+ | | NanoPi-R2C-Plus | ||
+ | | NanoPi-R2S-Plus | ||
+ | | NanoPi-R2C = | ||
+ | 就可以看到'''{{{1}}}'''已经运行在 1.51G:<br /> | ||
+ | [[File:Nanopir2s-wrt-overclock.png|frameless|600px]]<br /> | ||
+ | | NanoPi-R4S = | ||
+ | 就可以看到'''{{{1}}}'''的小核工作在1.8G以及大核工作在2.2G:<br /> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | # cat /sys/devices/system/cpu/cpu[04]/cpufreq/scaling_max_freq | ||
+ | 1800000 | ||
+ | 2208000 | ||
+ | </syntaxhighlight> | ||
+ | | #default = | ||
+ | }} | ||
+ | ====超频前后的性能测试==== | ||
+ | 测试命令: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | openssl speed -evp aes-256-gcm | ||
+ | </syntaxhighlight> | ||
+ | {{#switch: {{{1}}} | ||
+ | | NanoPi-R2S | ||
+ | | NanoPi-R2C-Plus | ||
+ | | NanoPi-R2S-Plus | ||
+ | | NanoPi-R2C = | ||
+ | 超频前的SSL性能(CPU主频:1.29G): | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | The 'numbers' are in 1000s of bytes per second processed. | ||
+ | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | ||
+ | aes-256-gcm 68976.85k 189985.39k 342481.66k 432472.75k 466349.46k 466414.25k | ||
+ | </syntaxhighlight> | ||
+ | 超频后的SSL性能(CPU主频:1.51G): | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | ||
+ | aes-256-gcm 80187.19k 222333.58k 399549.27k 504449.02k 542182.06k 545855.70k | ||
+ | </syntaxhighlight> | ||
+ | 可以看到aes-256-gcm该项的性能提升了16%。 | ||
+ | | NanoPi-R4S = | ||
+ | 超频前的SSL性能(CPU主频:1.8g/1.4g): | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | The 'numbers' are in 1000s of bytes per second processed. | ||
+ | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | ||
+ | aes-256-gcm 166999.46k 452247.87k 735436.37k 860289.02k 914623.15k 919312.27k | ||
+ | </syntaxhighlight> | ||
+ | 超频后的SSL性能(CPU主频:2.2g/1.8g): | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | ||
+ | aes-256-gcm 205776.21k 553278.42k 905867.01k 1056406.19k 1123145.05k 1114461.53k | ||
+ | </syntaxhighlight> | ||
+ | 可以看到aes-256-gcm该项的性能提升了23%。 | ||
+ | | #default = | ||
+ | }} | ||
+ | ====超频方法==== | ||
+ | =====修改内核解锁更高的CPU频率===== | ||
+ | {{#switch: {{{1}}} | ||
+ | | NanoPi-R2S | ||
+ | | NanoPi-R2C-Plus | ||
+ | | NanoPi-R2S-Plus | ||
+ | | NanoPi-R2C = | ||
+ | 在FriendlyWrt Repo源代码的目录下,用vim打开以下文件: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | vim kernel/arch/arm64/boot/dts/rockchip/rk3328.dtsi | ||
+ | </syntaxhighlight> | ||
+ | 在文件中搜索文本 opp-1296000000,在opp-1296000000定义后面,增加CPU频率1.51G的定义,修改后的内容如下所示: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | opp-1296000000 { | ||
+ | opp-hz = /bits/ 64 <1296000000>; | ||
+ | opp-microvolt = <1300000>; | ||
+ | clock-latency-ns = <40000>; | ||
+ | }; | ||
+ | opp-1512000000 { | ||
+ | opp-hz = /bits/ 64 <1512000000>; | ||
+ | opp-microvolt = <1450000>; | ||
+ | clock-latency-ns = <40000>; | ||
+ | }; | ||
+ | </syntaxhighlight> | ||
+ | | NanoPi-R4S = | ||
+ | 在FriendlyWrt Repo源代码的目录下,用vim打开以下文件: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | vim arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | ||
+ | </syntaxhighlight> | ||
+ | 参考以下patch进行修改: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | ||
+ | index d6f1095abb04..c714fce602a7 100644 | ||
+ | --- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | ||
+ | +++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | ||
+ | @@ -33,6 +33,18 @@ | ||
+ | opp-hz = /bits/ 64 <1416000000>; | ||
+ | opp-microvolt = <1125000>; | ||
+ | }; | ||
+ | + opp06 { | ||
+ | + opp-hz = /bits/ 64 <1512000000>; | ||
+ | + opp-microvolt = <1150000>; | ||
+ | + }; | ||
+ | + opp07 { | ||
+ | + opp-hz = /bits/ 64 <1608000000>; | ||
+ | + opp-microvolt = <1200000>; | ||
+ | + }; | ||
+ | + opp08 { | ||
+ | + opp-hz = /bits/ 64 <1800000000>; | ||
+ | + opp-microvolt = <1250000>; | ||
+ | + }; | ||
+ | }; | ||
+ | |||
+ | cluster1_opp: opp-table1 { | ||
+ | @@ -72,6 +84,14 @@ | ||
+ | opp-hz = /bits/ 64 <1800000000>; | ||
+ | opp-microvolt = <1200000>; | ||
+ | }; | ||
+ | + opp08 { | ||
+ | + opp-hz = /bits/ 64 <2016000000>; | ||
+ | + opp-microvolt = <1250000>; | ||
+ | + }; | ||
+ | + opp09 { | ||
+ | + opp-hz = /bits/ 64 <2208000000>; | ||
+ | + opp-microvolt = <1300000>; | ||
+ | + }; | ||
+ | }; | ||
+ | </syntaxhighlight> | ||
+ | | #default = | ||
+ | }} | ||
+ | 修改完成后,重新编译内核,并制作SD固件: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | ./build.sh kernel | ||
+ | ./build.sh sd-img | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | =====验证CPU是否超频成功===== | ||
+ | 执行以下命令让CPU产生负载: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | dd if=/dev/zero of=/dev/null bs=1& | ||
+ | dd if=/dev/zero of=/dev/null bs=1& | ||
+ | dd if=/dev/zero of=/dev/null bs=1& | ||
+ | dd if=/dev/zero of=/dev/null bs=1& | ||
+ | </syntaxhighlight> | ||
+ | {{#switch: {{{1}}} | ||
+ | | NanoPi-R2S | ||
+ | | NanoPi-R2C-Plus | ||
+ | | NanoPi-R2S-Plus | ||
+ | | NanoPi-R2C = | ||
+ | 再用如下命令查看当前的CPU频率,可以看到频率已经是1.5G: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | root@FriendlyWrt:~# cat /sys/devices/system/cpu/cpu[04]/cpufreq/cpuinfo_cur_freq | ||
+ | 1512000 | ||
+ | </syntaxhighlight> | ||
+ | | NanoPi-R4S = | ||
+ | 再用如下命令查看当前的CPU频率,可以看到频率小核工作在1.8G以及大核工作在2.2G: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | root@FriendlyWrt:~# cat /sys/devices/system/cpu/cpu[04]/cpufreq/cpuinfo_cur_freq | ||
+ | 1800000 | ||
+ | 2208000 | ||
+ | </syntaxhighlight> | ||
+ | | #default = | ||
+ | }} |
Latest revision as of 10:53, 4 December 2023
Contents
1 如何超频
1.1 选择合格的电源
超频使用{{{1}}}需要保证有稳定可靠的电源供应,这包括标称真实,质量可靠的电源适配器,以及低阻抗的Type-C连接线(通俗讲就是铜芯足够粗,旧款为MicroUSB连接线)。
1.2 保证散热措施
超频会令{{{1}}}发热增加,必须使用金属外壳进行散热,或DIY使用风扇进行主动散热。
另外TF卡也建议使用能支持高温条件下正常工作的TF卡,可以选购行车记录仪专用的TF卡;
1.3 超频测试固件
进入ssh终端,输入以下命令:
cat /sys/devices/system/cpu/cpu[04]/cpufreq/scaling_max_freq
1.4 超频前后的性能测试
测试命令:
openssl speed -evp aes-256-gcm
1.5 超频方法
1.5.1 修改内核解锁更高的CPU频率
修改完成后,重新编译内核,并制作SD固件:
./build.sh kernel ./build.sh sd-img
1.5.2 验证CPU是否超频成功
执行以下命令让CPU产生负载:
dd if=/dev/zero of=/dev/null bs=1& dd if=/dev/zero of=/dev/null bs=1& dd if=/dev/zero of=/dev/null bs=1& dd if=/dev/zero of=/dev/null bs=1&