This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NAS (Samba) performance observation
#1
Hi!

Tinkerboard works great as low budget home file server for me. 
I'm using portable 2,5" Maxtor M3 HDD over Y-USB cable. Not the best power solution because of voltage drop in some cases, but mostly it works for me.
USB2 interface provides enough bandwidth for video/audio/pictures storage/consumption use cases even in multi user scenarios.

When I was stress testing my setup with sysbench I noticed performance boost which kind of goes against logic.
As you can see on pic below I  got respectable 230Mbps (~27MB/s) when I started to copy file from TB to PC.
Then in the middle of coping I fired up sysbenc with 4 thread stress test completely redlining all 4 cores. 
I was expecting performance drop since samaba daemon had to share CPU resources with sysbench, but instead of slowdown I got respectable 15-20% performance increase up to 34MB/s.
[Image: zneCRZB.jpg]

Obviously it's down to CPU frequency. Samba server by it's own will not push CPU clock beyond 1 GHz.
I wonder if there is a way to force higher CPU clock when samba server reaches 25MB/s+ network activity.

I found this performance tibit interesting enough to share.
Reply
#2
(04-08-2018, 12:22 PM)TB_User Wrote: Hi!

Tinkerboard works great as low budget home file server for me. 
I'm using portable 2,5" Maxtor M3 HDD over Y-USB cable. Not the best power solution because of voltage drop in some cases, but mostly it works for me.
USB2 interface provides enough bandwidth for video/audio/pictures storage/consumption use cases even in multi user scenarios.

When I was stress testing my setup with sysbench I noticed performance boost which kind of goes against logic.
As you can see on pic below I  got respectable 230Mbps (~27MB/s) when I started to copy file from TB to PC.
Then in the middle of coping I fired up sysbenc with 4 thread stress test completely redlining all 4 cores. 
I was expecting performance drop since samaba daemon had to share CPU resources with sysbench, but instead of slowdown I got respectable 15-20% performance increase up to 34MB/s.
[Image: zneCRZB.jpg]

Obviously it's down to CPU frequency. Samba server by it's own will not push CPU clock beyond 1 GHz.
I wonder if there is a way to force higher CPU clock when samba server reaches 25MB/s+ network activity.

I found this performance tibit interesting enough to share.


Some tweaks here may improve speeds.  Need to find how to increase that 1ghz limit.
https://www.samba.org/samba/docs/old/Sam...speed.html
Reply
#3
(04-08-2018, 12:22 PM)TB_User Wrote: Hi!

Tinkerboard works great as low budget home file server for me. 
I'm using portable 2,5" Maxtor M3 HDD over Y-USB cable. Not the best power solution because of voltage drop in some cases, but mostly it works for me.
USB2 interface provides enough bandwidth for video/audio/pictures storage/consumption use cases even in multi user scenarios.

When I was stress testing my setup with sysbench I noticed performance boost which kind of goes against logic.
As you can see on pic below I  got respectable 230Mbps (~27MB/s) when I started to copy file from TB to PC.
Then in the middle of coping I fired up sysbenc with 4 thread stress test completely redlining all 4 cores. 
I was expecting performance drop since samaba daemon had to share CPU resources with sysbench, but instead of slowdown I got respectable 15-20% performance increase up to 34MB/s.
[Image: zneCRZB.jpg]

Obviously it's down to CPU frequency. Samba server by it's own will not push CPU clock beyond 1 GHz.
I wonder if there is a way to force higher CPU clock when samba server reaches 25MB/s+ network activity.

I found this performance tibit interesting enough to share.

Hi,

Try this, it can keep CPU at the performance mode (1.8GHz)
Code:
echo performance | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

But need to make sure the temperature, because if when higher than 70C, would start throttling to keep safe?

Or you can just change MIN and MAX freq at CPU scaling range.
e.g. MAX 1.8GHz
Code:
echo 1800000 | sudo tee sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
e.g. MIN 1.2GHz
Code:
echo 1200000 | sudo tee sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
Reply
#4
(04-09-2018, 03:13 AM)Craz_tyle Wrote:
(04-08-2018, 12:22 PM)TB_User Wrote: Hi!

Tinkerboard works great as low budget home file server for me. 
I'm using portable 2,5" Maxtor M3 HDD over Y-USB cable. Not the best power solution because of voltage drop in some cases, but mostly it works for me.
USB2 interface provides enough bandwidth for video/audio/pictures storage/consumption use cases even in multi user scenarios.

When I was stress testing my setup with sysbench I noticed performance boost which kind of goes against logic.
As you can see on pic below I  got respectable 230Mbps (~27MB/s) when I started to copy file from TB to PC.
Then in the middle of coping I fired up sysbenc with 4 thread stress test completely redlining all 4 cores. 
I was expecting performance drop since samaba daemon had to share CPU resources with sysbench, but instead of slowdown I got respectable 15-20% performance increase up to 34MB/s.
[Image: zneCRZB.jpg]

Obviously it's down to CPU frequency. Samba server by it's own will not push CPU clock beyond 1 GHz.
I wonder if there is a way to force higher CPU clock when samba server reaches 25MB/s+ network activity.

I found this performance tibit interesting enough to share.

Hi,

Try this, it can keep CPU at the performance mode (1.8GHz)
Code:
echo performance | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

But need to make sure the temperature, because if when higher than 70C, would start throttling to keep safe?

Or you can just change MIN and MAX freq at CPU scaling range.
e.g. MAX 1.8GHz
Code:
echo 1800000 | sudo tee sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
e.g. MIN 1.2GHz
Code:
echo 1200000 | sudo tee sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq


I tried these and got a no such file/directory. Is it the tee or the pipe - |? Is that what they call it a pipe?

I got a permission problem with sudo.  Had to use su.  These worked,
lxteminal>su>rootpassword
echo 1200000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo 1800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq



Speed adjustment
TinkerBoard cpu scales from 126Mhz to 1.8Ghz. The default min cpu frequency is 126Mhz. You can change the lower bound to something like 600Mhz by adding the following line to 
/etc/init.d/cpufrequtils before 'return 0' line:

echo 1800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq


cpu temperature monitor:
This will put a cpu Temperature Monitor on your Panel/Taskbar.
Right click taskbar>PanelSettings>PanelApplets>TempMonitor> click add>SelectTempMonitor>Add
Put the mouse pointer on it and it will show zone0 and zone1 temps.



To see the speeds:
watch -n 1 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
watch -n 1 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
watch -n 1 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
ctl/z to abort




cpu overclocking: If you interested in more speed.
Raspberry PI Here is somethings you can try.
gpu_mem=64 or 100

Frequency Change: chmod ugo=rw filename sudo passwd root exit to exit su
sudo idle /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
sudo idle /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
sudo update-rc.d ondemand disable This makes it permanent.
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 1008000,1200000, 1416000
scaling_available_governors userspace interactive
sudo eco 1416000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
If you are denied, use chmod above as su
Debian has skeleton for running scrips at boot time /etc/init.d/skeleton


Your system is using intel_pstate driver. There are only two governors available when using this driver: powersave and performance.
The userspace governor is only available with the older acpi-cpufreq driver (which will be automatically used if you disable intel_pstate at boot time; you then set the governor/frequency with cpupower):

disable the current driver: add intel_pstate=disable to your kernel boot line
boot, then load the userspace module: modprobe cpufreq_userspace
set the governor: cpupower frequency-set --governor userspace
set the frequency: cpupower --cpu all frequency-set --freq 800MHz


chrome://gpu to check acceleration is enabled.
cat /proc/cpuinfo
cat /proc/meminfo displays details about the Raspberry Pi’s memory
cat /proc/partitions reveals the size and number of partitions on your SD card or HDD
cat /proc/version shows you which version of the Pi you are using.
free -o -h to see how much free system memory is available
lsusb
sudo raspi-config When done use startx sudo shutdown –r now


CPU speed/Overclock: This came from Raspberry PI
sudo nano /boot/config.txt Edit to overclock CPU
vcgencmd measure_temp
vcgencmd measure_volts core
vcgencmd measure_clock arm To see what /boot/config.txt is set to.
sudo vcgencmd get_config arm_freq To see what /boot/config.txt is set to.

sudo vcgencmd get_config arm_freq To see what /boot/config.txt is set to.
Min sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
Max sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
Cur sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
vcgencmd measure_clock arm
To overclock cpu: sudo nano /boot/config.txt 700 was default was set to 800 and commented out in config file.
you will have the on - demand flag set

Settings for /boot/config.txt
arm_freq=1200 can try more
core_freq=500
sdram_freq=500
over_voltage=6
over_voltage_sdram=4
current_limit_override=0x5A000020

CPU Voltage:
vcgencmd measure_volts core
Reply
#5
wow a lot of information. thanks.

Yeah I could permanently force max CPU frequency, but then my setup isn't optimised low power NAS any more. Plus I need to deal with thermal issues.
Kernel "ondemand" governor setting is what I would like to use. It just appears that in case of samba server kernel thinks that process has enough resources and will not increase CPU clock to max.
Obviously 15% increase isn't that big deal, but then again potential is there. To bad we cant easily use it.
Reply
#6
(04-10-2018, 10:24 AM)TB_User Wrote: wow a lot of information. thanks.

Most of the stuff only dealt with the proprietary Raspberry Pi crap (/boot/config.txt instructs the closed source primary OS called ThreadX that controls the hardware on every RPi).

To solve your problem simply look what we do in Armbian/OMV (especially io_is_busy is important):

https://github.com/ThomasKaiser/OMV_for_...al#L14-L23

Also important: If not already done increase minimum cpufreq from 120 MHz to at least 600 MHz. Almost no consumption difference but ondemand cpufreq governor works way better afterwards.
Reply
#7
(04-10-2018, 10:24 AM)TB_User Wrote: wow a lot of information. thanks.

Yeah I could permanently force max CPU frequency, but then my setup isn't optimised low power NAS any more. Plus I need to deal with thermal issues.
Kernel "ondemand" governor setting is what I would like to use. It just appears that in case of samba server kernel thinks that process has enough resources and will not increase CPU clock to max.
Obviously 15% increase isn't that big deal, but then again potential is there. To bad we cant easily use it.


This is the coolest. Lots of information.

You need a fan on the Heatsink if you run video.  The TB cpu gets very hot.
The best solution is a low cost, quiet, and low rpm fan with a long life span like the fan below.


Power: 5v 3a with on off switch
https://www.ebay.com/itm/EP-5V-3A-USB-AC...0011.m1850

MicroSD: Samsung 32 Evo+ is good. Sandisk is very good too.


case:
Cooling Fan for Raspberry Pi 3/2 Model B + Transparent Clear Case Enclosure Box
https://www.ebay.com/itm/Cooling-Fan-for...2154!US!-1

Pro:
1 It's open to the air all around
2 Easy to blow dust away
3 Large 40x10mm fan mounts perfect with the heatsink
Con:
1 Watch out for flying metal, water, and kids.


Fan:
This one is very quiet with no vibration and comes with a 6 year warranty. It has 4,500 rpm speed which is much less than the maglev. It uses less amps and power. It produces good air flow at lower rpms. It has rubber mounting pads. No vibrations.
Noctua A-Series Cooling Fan Blades with AAO Frame, SSO2 Bearing (NF-A4X10-FLX 5V)
https://noctua.at/en/nf-a4x10-5v/specification
https://www.amazon.com/Noctua-Cooling-Be...5v+40x10mm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)