please choosego to mobile | Continue to access the PC version
View: 46665|Reply: 22

Fix thermal issues

[Copy link]
Published in 2015-11-30 13:15:53 | Show all floors |Read mode
Edited by bronco at 2015-12-14 04:19

I've written a script that does the following:

  • Installs sunxi-tools if not available
  • Converts script.bin to a temporary file
  • Replaces therein the dvfs table settings with more sane values
  • Makes a backup script.bin.bak before overwriting script.bin with the new settings

EDIT: In the meantime I adopted the official linux-sunxi dvfs/thermal settings -- compare with the thread on the linux-sunxi mailing list.

The script can be found here: http://kaiser-edv.de/tmp/H9rWPf/fix-thermal-problems.sh

Install it as eg. /usr/local/bin/fix-thermal-problems.sh, make it executable and check stability afterwards using the usual approach: http://linux-sunxi.org/Hardware_Reliability_Tests#CPU
  1. wget -O /usr/local/bin/fix-thermal-problems.sh "http://kaiser-edv.de/tmp/H9rWPf/fix-thermal-problems.sh"
  2. chmod 755 /usr/local/bin/fix-thermal-problems.sh
Copy code

Feedback welcome.



1

threads

116

posts

707

credits

Senior member

Rank: 4

credits
707
Published in 2015-12-1 04:49:59 | Show all floors
Cortex a7 running over 2ghz ? i have a hard time believing this...

besides, this thing just looks like more cores slapped together.... it would be more interesting if it used something like 4 a53 cores with 2 a72 fast ones.
 Author| Published in 2015-11-30 16:49:22 | Show all floors
Running 4 threads sysbench, 4 threads cpuburn-a7 in parallel while letting walk cpufreq-ljt-stress-test through all available cpufrequencies. No fan used, just a 0.5$ heatsink:
Temperature when idle 39°C (16°C above ambient temperature), under full load at maximum speed 65°C (42°C above ambient temperature), no stability issues. When a display is connected then the H3 switches on its display engine so temperatures increase by approx. 4°C.







  1. root@OrangePI:~# cpufreq-ljt-stress-test
  2. The cjpeg and djpeg tools from libjpeg-turbo are not found.
  3. Trying to download and compile them.
  4. CPU stress test, which is doing JPEG decoding by libjpeg-turbo
  5. at different cpufreq operating points.

  6. Testing CPU 0
  7. 1536 MHz SKIPPED
  8. 1440 MHz SKIPPED
  9. 1344 MHz SKIPPED
  10. 1200 MHz ............................................................ OK
  11. 1104 MHz ............................................................ OK
  12. 1008 MHz ............................................................ OK
  13.   912 MHz ............................................................ OK
  14.   816 MHz ............................................................ OK
  15.   720 MHz ............................................................ OK
  16.   648 MHz ............................................................ OK
  17.   600 MHz ............................................................ OK
  18.   504 MHz ............................................................ OK
  19.   480 MHz ............................................................ OK
  20.   408 MHz SKIPPED
  21.   312 MHz SKIPPED
  22.   240 MHz SKIPPED
  23.   120 MHz SKIPPED
  24.    60 MHz SKIPPED

  25. Testing CPU 1
  26. 1536 MHz SKIPPED
  27. 1440 MHz SKIPPED
  28. 1344 MHz SKIPPED
  29. 1200 MHz ............................................................ OK
  30. 1104 MHz ............................................................ OK
  31. 1008 MHz ............................................................ OK
  32.   912 MHz ............................................................ OK
  33.   816 MHz ............................................................ OK
  34.   720 MHz ............................................................ OK
  35.   648 MHz ............................................................ OK
  36.   600 MHz ............................................................ OK
  37.   504 MHz ............................................................ OK
  38.   480 MHz ............................................................ OK
  39.   408 MHz SKIPPED
  40.   312 MHz SKIPPED
  41.   240 MHz SKIPPED
  42.   120 MHz SKIPPED
  43.    60 MHz SKIPPED

  44. Testing CPU 2
  45. 1536 MHz SKIPPED
  46. 1440 MHz SKIPPED
  47. 1344 MHz SKIPPED
  48. 1200 MHz ............................................................ OK
  49. 1104 MHz ............................................................ OK
  50. 1008 MHz ............................................................ OK
  51.   912 MHz ............................................................ OK
  52.   816 MHz ............................................................ OK
  53.   720 MHz ............................................................ OK
  54.   648 MHz ............................................................ OK
  55.   600 MHz ............................................................ OK
  56.   504 MHz ............................................................ OK
  57.   480 MHz ............................................................ OK
  58.   408 MHz SKIPPED
  59.   312 MHz SKIPPED
  60.   240 MHz SKIPPED
  61.   120 MHz SKIPPED
  62.    60 MHz SKIPPED

  63. Testing CPU 3
  64. 1536 MHz SKIPPED
  65. 1440 MHz SKIPPED
  66. 1344 MHz SKIPPED
  67. 1200 MHz ............................................................ OK
  68. 1104 MHz ............................................................ OK
  69. 1008 MHz ............................................................ OK
  70.   912 MHz ............................................................ OK
  71.   816 MHz ............................................................ OK
  72.   720 MHz ............................................................ OK
  73.   648 MHz ............................................................ OK
  74.   600 MHz ............................................................ OK
  75.   504 MHz ............................................................ OK
  76.   480 MHz ............................................................ OK
  77.   408 MHz SKIPPED
  78.   312 MHz SKIPPED
  79.   240 MHz SKIPPED
  80.   120 MHz SKIPPED
  81.    60 MHz SKIPPED

  82. Overall result : PASSED
Copy code


1

threads

116

posts

707

credits

Senior member

Rank: 4

credits
707
Published in 2015-12-1 03:09:39 | Show all floors
Great stuff. Should be included in every distro from now on

Btw, how is auto undervolting script coming along ?
 Author| Published in 2015-12-1 03:36:43 | Show all floors
Edited by bronco at 2015-12-1 03:45
hojnikb replied at 2015-12-1 03:09
how is auto undervolting script coming along ?

Maybe I drop the whole efforts since measurements have shown that you don't win that much by further decreasing voltages while risking stability issues. These settings seem sane to me for normal use cases: http://linux-sunxi.org/User_talk ... and_USB_peripherals
On the other hand SinoVoip sent me a review (or reward?) sample I'm currently playing with. BPi-M3 with A83T SoC. It was a bit hard to get this thing booting (since SinoVoip provides 4 OS images, one useless -- Android -- and the three Linux images all corrupted).

Thx to loboris I now use his image on the BPi-M3 and started with first tests: Without a heatsink it overheats really fast and throttling occurs at 75°C-80°C. I then applied the same $0.5 heatsink I already put on the H3 and this helped a lot: Left is without heatsink, higher temperatures and lower clockspeeds, on the right while running the benchmarks -- see below:



And this SoC is not an ultra-slow one like the H3 but fast instead. Just a heatsink, no fan and no overclocking and it's already twice as fast as Orange Pis. Seems like that with improved cooling the A83T will dynamically clock up to 2.1 GHz and remains there still without overvolting/overclocking

  1. root@OrangePI:~# sysbench --test=cpu --cpu-max-prime=20000 run --num-threads=8
  2. sysbench 0.4.12:  multi-threaded system evaluation benchmark

  3. Running the test with following options:
  4. Number of threads: 8

  5. Doing CPU performance benchmark

  6. Threads started!
  7. Done.

  8. Maximum prime number checked in CPU test: 20000


  9. Test execution summary:
  10.     total time:                          66.9015s
  11.     total number of events:              10000
  12.     total time taken by event execution: 535.0102
  13.     per-request statistics:
  14.          min:                                 41.86ms
  15.          avg:                                 53.50ms
  16.          max:                                162.34ms
  17.          approx.  95 percentile:              63.01ms

  18. Threads fairness:
  19.     events (avg/stddev):           1250.0000/3.32
  20.     execution time (avg/stddev):   66.8763/0.02

  21. root@OrangePI:~# 7z
  22. 7z   7za  
  23. root@OrangePI:~# 7za b

  24. 7-Zip (A) 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
  25. p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,8 CPUs)

  26. RAM size:    2012 MB,  # CPU hardware threads:   8
  27. RAM usage:   1701 MB,  # Benchmark threads:      8

  28. Dict        Compressing          |        Decompressing
  29.       Speed Usage    R/U Rating  |    Speed Usage    R/U Rating
  30.        KB/s     %   MIPS   MIPS  |     KB/s     %   MIPS   MIPS

  31. 22:    3155   674    455   3069  |    82575   786    947   7447
  32. 23:    3060   681    458   3118  |    81850   788    949   7488
  33. 24:    2347   585    431   2524  |    77849   782    923   7221
  34. 25:    1712   454    430   1955  |    77531   779    935   7290
  35. ----------------------------------------------------------------
  36. Avr:          598    443   2666               784    939   7362
  37. Tot:          691    691   5014
  38. root@OrangePI:~# mbw -t0 256
  39. Long uses 4 bytes. Allocating 2*67108864 elements = 536870912 bytes of memory.
  40. Getting down to business... Doing 10 runs per test.
  41. 0        Method: MEMCPY        Elapsed: 0.51003        MiB: 256.00000        Copy: 501.932 MiB/s
  42. 1        Method: MEMCPY        Elapsed: 0.52706        MiB: 256.00000        Copy: 485.713 MiB/s
  43. 2        Method: MEMCPY        Elapsed: 0.51487        MiB: 256.00000        Copy: 497.210 MiB/s
  44. 3        Method: MEMCPY        Elapsed: 0.50704        MiB: 256.00000        Copy: 504.895 MiB/s
  45. 4        Method: MEMCPY        Elapsed: 0.50709        MiB: 256.00000        Copy: 504.837 MiB/s
  46. 5        Method: MEMCPY        Elapsed: 0.50694        MiB: 256.00000        Copy: 504.989 MiB/s
  47. 6        Method: MEMCPY        Elapsed: 0.50748        MiB: 256.00000        Copy: 504.448 MiB/s
  48. 7        Method: MEMCPY        Elapsed: 0.50718        MiB: 256.00000        Copy: 504.750 MiB/s
  49. 8        Method: MEMCPY        Elapsed: 0.50719        MiB: 256.00000        Copy: 504.746 MiB/s
  50. 9        Method: MEMCPY        Elapsed: 0.50771        MiB: 256.00000        Copy: 504.222 MiB/s
  51. AVG        Method: MEMCPY        Elapsed: 0.51026        MiB: 256.00000        Copy: 501.705 MiB/s
  52. root@OrangePI:~# mbw -t1 256
  53. Long uses 4 bytes. Allocating 2*67108864 elements = 536870912 bytes of memory.
  54. Getting down to business... Doing 10 runs per test.
  55. 0        Method: DUMB        Elapsed: 0.57809        MiB: 256.00000        Copy: 442.839 MiB/s
  56. 1        Method: DUMB        Elapsed: 0.57037        MiB: 256.00000        Copy: 448.831 MiB/s
  57. 2        Method: DUMB        Elapsed: 0.57013        MiB: 256.00000        Copy: 449.016 MiB/s
  58. 3        Method: DUMB        Elapsed: 0.56990        MiB: 256.00000        Copy: 449.201 MiB/s
  59. 4        Method: DUMB        Elapsed: 0.56987        MiB: 256.00000        Copy: 449.224 MiB/s
  60. 5        Method: DUMB        Elapsed: 0.57000        MiB: 256.00000        Copy: 449.120 MiB/s
  61. 6        Method: DUMB        Elapsed: 0.56974        MiB: 256.00000        Copy: 449.324 MiB/s
  62. 7        Method: DUMB        Elapsed: 0.57053        MiB: 256.00000        Copy: 448.705 MiB/s
  63. 8        Method: DUMB        Elapsed: 0.56992        MiB: 256.00000        Copy: 449.187 MiB/s
  64. 9        Method: DUMB        Elapsed: 0.57001        MiB: 256.00000        Copy: 449.116 MiB/s
  65. AVG        Method: DUMB        Elapsed: 0.57086        MiB: 256.00000        Copy: 448.448 MiB/s
  66. root@OrangePI:~# mbw -t2 256
  67. Long uses 4 bytes. Allocating 2*67108864 elements = 536870912 bytes of memory.
  68. Using 262144 bytes as blocks for memcpy block copy test.
  69. Getting down to business... Doing 10 runs per test.
  70. 0        Method: MCBLOCK        Elapsed: 0.50565        MiB: 256.00000        Copy: 506.275 MiB/s
  71. 1        Method: MCBLOCK        Elapsed: 0.50830        MiB: 256.00000        Copy: 503.641 MiB/s
  72. 2        Method: MCBLOCK        Elapsed: 0.49063        MiB: 256.00000        Copy: 521.775 MiB/s
  73. 3        Method: MCBLOCK        Elapsed: 0.49140        MiB: 256.00000        Copy: 520.961 MiB/s
  74. 4        Method: MCBLOCK        Elapsed: 0.49059        MiB: 256.00000        Copy: 521.822 MiB/s
  75. 5        Method: MCBLOCK        Elapsed: 0.49041        MiB: 256.00000        Copy: 522.007 MiB/s
  76. 6        Method: MCBLOCK        Elapsed: 0.48987        MiB: 256.00000        Copy: 522.583 MiB/s
  77. 7        Method: MCBLOCK        Elapsed: 0.49092        MiB: 256.00000        Copy: 521.468 MiB/s
  78. 8        Method: MCBLOCK        Elapsed: 0.49066        MiB: 256.00000        Copy: 521.742 MiB/s
  79. 9        Method: MCBLOCK        Elapsed: 0.49010        MiB: 256.00000        Copy: 522.348 MiB/s
  80. AVG        Method: MCBLOCK        Elapsed: 0.49385        MiB: 256.00000        Copy: 518.371 MiB/s
Copy code


7

threads

100

posts

647

credits

Senior member

Rank: 4

credits
647
Published in 2015-12-1 04:49:30 | Show all floors
OPI 2 get crazy with this script.

Sorry
 Author| Published in 2015-12-1 05:09:09 | Show all floors
hojnikb replied at 2015-12-1 04:49
Cortex a7 running over 2ghz ? i have a hard time believing this...

besides, this thing just looks l ...

I thought the same and am still sceptical. More testing has to be done and then we'll see.

For many use cases (file server for example) CPU performance is close to irrelevant. And if it's about I/O performance the M3 really sucks: pseudo-SATA performance 3.5-10 times slower than compared to an A20 based Banana Pi or Orange Pi: http://www.orangepi.org/orangepi ... 8&fromuid=29411
 Author| Published in 2015-12-1 06:44:29 | Show all floors
hojnikb replied at 2015-12-1 04:49
Cortex a7 running over 2ghz ? i have a hard time believing this...

besides, this thing just looks l ...

A few last words to A83T since it affects somewhat H3 (performance expectations)

When being clocked identical then the single core performance of H3 and A83T are identical. I tried it with 4 threads at 1008 MHz and 1200 MHz and they perform on par.

The difference is the process, the H3 being made in a cheaper process whereas the A83T as a 'tablet SoC' is produced in the more energy efficient HPC process. That means drastically less voltage needed and higher clockspeeds possible. At the moment 1.8 GHz are configured as maximum and I just tried to adjust the /sys/devices/virtual/thermal/thermal_zone0/trip_point* values. Normally they start at 65°C and increase up to 105° but I adjusted them all up to 95°C except of the last one.

Result: When configured to run at 1.8 GHz max. the A83T remains at this speed on the first run an finished the sysbench test in 52.5 seconds. The next run led to 4 CPU cores being disabled

While it's interesting to see how performant the A83T is during peak performance periods it makes definitely more sense to configure throttling correctly than to accept dropped CPU cores. With increased  thermal_zone0/trip_point* values also idle consumption increased a lot. Fortunately CPU peak performance doesn't matter that much in most situations...

1

threads

116

posts

707

credits

Senior member

Rank: 4

credits
707
Published in 2015-12-2 02:30:37 | Show all floors
I see. That makes sense actually.

Too bad we won't get the undervolt script though
It would be great to squeeze every last bit of efficiency out of these boards
 Author| Published in 2015-12-2 06:18:15 | Show all floors
hojnikb replied at 2015-12-2 02:30
I see. That makes sense actually.

Too bad we won't get the undervolt script though

We'll see. I'll focus back on H3 since I'm already done with 'Banana Pi M3'. Its SoC is somewhat limited (I/O bandwidth) and the design decisions made by the manufacturer strange (limit bandwidth even more).

http://forum.armbian.com/index.p ... ew-of-banana-pi-m3/

I'm still waiting for the 2nd OPi PC and camera module, then it gets interesting...
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list