Building a Linux server with an Asus Tinker Board

Using an Asus Tinker Board to build a small low power Linux server

Building a Linux server with an Asus Tinker Board

For several years, we have been using a Raspberry Pi as a small Linux server for monitoring our solar heating system and power usage throughout the house.  While the Raspberry Pi has been perfectly suitable for the tasks it has been given, we needed something a bit more powerful for some of our other projects. 

Asus recently released the Tinker Board, an ARM based computer in the same format as the Raspberry Pi but using a more powerful Rockchip RK3288 CPU.  It has gigabit ethernet and separate controllers for the ethernet and USB so the network performance should be faster compared to the Raspberry Pi.  We ordered a Tinker Board when it was first released in the UK in February 2017 with the intention of using it to test compatibility with the Raspberry Pi expansion boards we make and sell but after using it for a while we decided it might make a good small Linux server to run alongside our existing Raspberry Pi server.

The server would be used mainly for hosting several websites including the Partkeepr inventory manager which we use to keep a database of the thousands of electronic components we have collected over the years.  As well as a web server, we also need a local GIT server for storing backups of our development work.  A DNS server for adblocking on our computers and tablets would also be useful.  We had a spare 120GB SSD with a USB to SATA adapter that would be suitable for file and database storage so we decided to use a 32GB SD card for the OS installation and the SSD as the storage drive. 

To mount the Tinker Board and the SSD together we used a WD PiDrive 6x6 enclosure from Western Digital.  The PiDrive enclosure has space to mount the Tinker Board and SSD alongside each other with a short USB cable used to connect them together.  We had to make a few small modifications to the enclosure to make everything fit.  The PiDrive enclosure is designed to be used with Western Digital’s USB drives which have the USB connector in a different place to our SSD so we had to remove a piece of curved plastic which would normally be used for cable routing.  A pair of slots we cut into the side of the lid to add some extra airflow as the Tinker Board runs hotter than a Raspberry Pi.  Western Digital supply three magnets and washers to join the lid to the enclosure but the kit did not include any way of sticking the magnets and washers to the plastic so we had to use some epoxy resin to glue everything in place.  Two holes were drilled in the base so we could mount the enclosure vertically on a wall next to our network switch.

The case with the SDD and Asus Tinker Board fitted with SATA to USB adapter.

The case with the SDD and Asus Tinker Board fitted with SATA to USB 3 adapter.

The server will be powered through our solar monitoring system which has several 12V outputs.  This way we can monitor the amount of current the Tinker Board uses.  The Tinker Board with the external SSD uses between 500mA and 1300mA depending on the CPU load so we needed a small switching power supply to drop the 12V down to 5V.  A PTN78060 3A regulator from Texas Instruments was salvaged from our old Pick and Place machine controller and a sticky pad was used to fit it to the top of the SSD.

With the hardware complete the next stage was to install Linux onto the SD card and format the SSD.  Asus provides a version of Debian Linux on their support website but at the time of writing the rest of their support is very limited with just a couple of FAQs and some libraries for setting up the GPIO pins.  As the Tinker Board would be used as a headless server there was little point having a GUI running in the background using up memory and resources so the first job was to remove and the other associated GUI libraries.  Webmin was installed so the server could be remotely administered through a web browser and samba was set up so our Windows machines could access the system.   The SSD was formatted and mounted as a folder in the root.

Next apache, php and MySQL were installed and configured to use the SSD as the database and web folder and PartKeepr was set up.  The DNS and Git servers will be installed later.

Keeping It Cool

A few basic stress tests were performed to see how well the Tinker Board coped with high CPU loads and it quickly became apparent that a fan would be needed as after a minute of 100% usage the CPU would rise to 75°C and begin throttling.  A 12V 55mm radial fan was found in our box of PC parts.  It was originally designed to be fitted in a PCI slot on the back of a computer but with a few modifications it was fitted on top of the SSD pointing at the CPU heatsink.  A cut-out was made on the plastic lid using our CNC mill to allow airflow into the fan and a simple transistor based control circuit was built onto some stripboard to control the fan using PWM from a GPIO pin.

To manage the fan speed, we wrote a simple program which gets the CPU temperature from /sys/class/thermal/thermal_zone1/temp and uses that to set the fan speed by adjusting the PWM output.  According to ASUS the PWM functions were not enabled on the version of Linux we were using but their GPIO C API, available on their support website, included an example for controlling the PWM pin using WiringPi so we tried modifying the example and found that it worked.  The code and schematic for the fan controller can be found on our GitHub account.

With the fan fitted we tried running the CPU at 100% load and found that even with the fan only running at 50% the temperature would not rise above 55°C and with no load the fan would stay off with a CPU temperature of between 35°C and 40°C.

Case with SSD, Fan, Power supply, fan controller and Asus Tinker Board.

Case with SSD, Fan, Power supply, fan controller and Asus Tinker Board

The completed case with fan cutout.

The completed case with fan cutout


Fan controller circuit

Speed Tests

A benchmark was run using sysbench to compare the performance of the Tinker Board against a Raspberry Pi 3.  As both systems use quad core CPUs a 4 thread test was run with the following command: 

sysbench --test=cpu --num-threads=4 --cpu-max-prime=20000 run

The results for the Asus Tinker Board are as follows:

Maximum prime number checked in CPU test: 20000

Test execution summary:  
total time: 82.2044s
total number of events:   10000
total time taken by event execution: 328.7541
per-request statistics:  
min: 32.63ms
avg:  32.88ms
max: 72.21ms
approx.  95 percentile:  33.41ms
Threads fairness:  
events (avg/stddev): 2500.0000/26.05
execution time (avg/stddev): 82.1885/0.01


The Raspberry Pi 3 gave the following results:

Test execution summary:  
total time: 122.8869s
total number of events: 10000
total time taken by event execution: 491.4391
per-request statistics:  
min:  47.69ms
avg:   49.14ms
max: 115.54ms
approx.  95 percentile: 47.94ms
Threads fairness:  
events (avg/stddev): 2500.0000/4.06
execution time (avg/stddev): 122.8598/0.02

As you can see from the results the Tinker Board is approximately 30% faster than the Raspberry Pi 3.  We did not try a GPU benchmark as the tasks we are running on the server will not make use of the GPU.
With the hardware and software ready we installed the server in the cupboard alongside the wireless router and network switch.



26 September 2018 at 2:58 pm
Nice build!

Could you tell me how tall the fan you used is (and if there is room for a taller one)?

26 September 2018 at 3:56 pm
It was one of these
I am not sure of the height as I dont have access to the box at the moment as it is being used by someone else.
Adam Downer
23 October 2018 at 3:35 pm
Nice. Am so grateful for sharing this with me. Definitely going be very helpful in our build. Thanks and regards to the team. Cheers.
04 November 2018 at 4:21 pm
This is great! I was inspired to go get a Tinker Board. However, I'm having trouble getting Apache onto it. How did you go about that step? Did you use a copy of XAMPP or LAMPP, manual install from Apache Friends or self compile?
04 November 2018 at 6:05 pm
It was installed using sudo apt-get install apache2
05 November 2018 at 7:00 pm
Thank you! I was over thinking it. All is well.
30 November 2018 at 8:35 am
Hi, Thank for sharing your experience. I am trying to create a server for my websites but I don't know how to create a server. After reading your article, I kinda understand how to do it but I am stuck how to use my tinker remotely. Would you mind me sharing that how to do it? I saw you have used samba for file sharing. What was the config for that?
30 November 2018 at 9:08 am
Shoaib, We used SSH to login to the server to manage it. I dont have the box running at the moment but we used the default samba config for the shares.
kevin walker
21 December 2018 at 6:33 pm
Hi, could you tell me if pins 1 3 5 are connected on the tinker board it seems so in the photo or is the connection a blank to prevent shorting to pins 2 4 6, if they are why and where are they connected to. nice build though Im having to adapt some of the hardware but that's what its all about
22 December 2018 at 9:53 am
kevin, Pins 2 and 4 are linked as the 5V output and pin 6 is the Ground connecton to power the board and the SSD
22 December 2018 at 10:39 am
ok thanks for the reply I had seen that the pins 2 and 4 were connected it was pins 1 3 and 5 that Im interested in ie: the 3.3v i2c1-sda and i2c1-scl pins just wanted to know if I need to connect them
22 December 2018 at 11:17 am
kevin, I didnt connect anything to pins 1, 3 and 5, I only used a 2x3 pin head as it was one i already had available.
22 December 2018 at 2:02 pm
ok thanks for the help,
04 March 2019 at 6:09 pm
Could you tell me what USB to SATA adapter you used, and whether you had to disassemble it at all to make it fit in the case. Most of the ones I'm finding have large plastic housings around the SATA connector, in the pictures it looks like yours is just a board with no housing.
04 March 2019 at 8:15 pm
Thomas, the USB-SATA adapter was from a 2.5" usb enclosure, I dont remember the brand we used but it was one of the cheaper models which cost less than £15.
15 March 2019 at 7:15 pm
Hi Brian, It is a really nice project. Thank you for sharing. Could you please tell me what is the performance of the mysql?, How many transaction do you do at day?, How about the write and read performance for the mysql?. Thank you.
15 March 2019 at 7:41 pm
Guillermo, I am sorry but i dont know the performance of the mysql instance. We only used the system to read data and so it wasnt getting many writes to the database. We are not using the Tinker board now as we have changed to a intel based system.
rhys tippings
17 June 2021 at 1:32 pm
What wonderfully consise artificial, thank you.

Leave a reply

Your email address will not be published. Required fields are marked *

Share this post

Support the blog

AB Electronics Raspberry Pi shop