SMB Very Slow Using LibreELEC On The C2

Post Reply
MidnightWatcher
Posts: 52
Joined: Wed Mar 02, 2016 1:50 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

SMB Very Slow Using LibreELEC On The C2

Post by MidnightWatcher »

I have a Zotac ND22 in the bedroom running LibreELEC and a RPi2 with OSMC in the living room sharing the contents of an attached 5TB USB drive (NTFS). Using SMB, the RPi2 streams even my highest bit rate 1080p content quite well to the ND22 in the bedroom via two DLink 701AV powerline adapters. Knowing that the ethernet jack of the RPi2 was only 10/100, however, while everything else in the chain was gigabit I figured that using the 10/100/1000-equipped C2 (with wrxtasy's latest 7.1.0 release) should stream HD media equally as well and, certainly, even marginally faster since the RPi2 would be acting as the network bottleneck if there was one. Much to my surprise, after running a few tests it became quite evident that the technically superior C2 was only serving media HALF as fast (if that) than the otherwise inferior RPi2.

Am I missing settings somewhere that, by default, is crippling the C2's SMB performance?
Last edited by MidnightWatcher on Fri Sep 02, 2016 2:58 am, edited 1 time in total.

atomicODROID
Posts: 27
Joined: Tue Jun 28, 2016 2:22 pm
languages_spoken: english
ODROIDs: C2, XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by atomicODROID »

sorry mate I don't think you'll find much help on this forum with those.

But if you decide to upgrade and buy an ODROID I know we would all be more than happy to help!
"The queiter you become, the more you're able to hear"
ODROID C2 and XU4

MidnightWatcher
Posts: 52
Joined: Wed Mar 02, 2016 1:50 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by MidnightWatcher »

That's why I posted here. I'm sharing media with the Odroid C2 and it's slower than the RPi2.

dru
Posts: 20
Joined: Mon Aug 01, 2016 9:45 am
languages_spoken: english
ODROIDs: C2
Location: Sydney, Australia
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by dru »

By serving files, do you mean the time it takes to load the video from the time you press play?
Half as fast isn't really descriptive of your issue. Loading? Playing? Skipping ahead? Buffering? 5secs, 10secs, 1min?

Then there are other factors like skins and plugins etc.

MidnightWatcher
Posts: 52
Joined: Wed Mar 02, 2016 1:50 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by MidnightWatcher »

Using the same skin and add-ons on both the C2 and RPi2. I can copy a file from the C2 at about 3.1 MB/sec, but from the RPi2 I can copy the same file at 6.2 MB/sec. That's about what I expected from the RPi2 given the specs, but I expected something closer to 12 or 15 from the C2.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

I'm confused about the responses of atomicODROID and dru hmm... MidnightWatcher stated quite clearly that he is investigating SMB transfer speeds on a Odroid C2. I have also noticed some months ago that I can not go faster than 10MB/s transferring files through SMB from a Windows 10 Laptop to an external HDD connected to the Odroid C2. I did not investigate it further, but I will have to somewhen. In my case it is an NTFS HDD, so perhaps NTFS is one bottleneck... at least on my Banana PI I saw how slow NTFS is on such an ARM device, but a banana has way less CPU power, so this should not be affecting it tooo much on an Odroid C2.

I think you should mention your issue in issues section of this forum to get proper answers, as this is likely a Linux/Kernel issue, not a Kodi issue I think. The streaming issues you have might be simply a symptom of poor network implementation in kernel or so?

crashoverride
Posts: 5133
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 375 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by crashoverride »

infinity85 wrote:as this is likely a Linux/Kernel issue, not a Kodi issue I think.
SMB runs as fast as expected (30MB/s to USB, 70+MB/s to cache, EXT4) on the Ubuntu image . This implies it is not a Linux/Kernel problem but; rather, an OpenELEC problem. I recommend OP test the file transfer speed with the official Ubuntu image to narrow the scope of the issue. NTFS will affect the performance numbers. Although there is a kernel module (read only), NTFS on most distributions use the File System in User Space (FUSE) interface which is much slower.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

crashoverride wrote:
infinity85 wrote:as this is likely a Linux/Kernel issue, not a Kodi issue I think.
SMB runs as fast as expected (30MB/s to USB, 70+MB/s to cache, EXT4) on the Ubuntu image . This implies it is not a Linux/Kernel problem but; rather, an OpenELEC problem.
Good to read this, so my assumption was wrong and OP issue can be narrowed more :).

May I ask what commands you use for testing it to cache, EXT4? Would like to reproduce it for comparison.

crashoverride
Posts: 5133
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 375 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by crashoverride »

infinity85 wrote:May I ask what commands you use for testing it to cache, EXT4? Would like to reproduce it for comparison.
I don't do anything special. Just add a share to the smb.conf (in Ubuntu). Writing a large file will start out at 70+MB/s, once cache is exhausted it drops to 30MB/s. The client matters: these speeds are observed with C2 as server and Windows 7 as client. Using linux as a client may show slower performance if you are doing the transfer in a desktop GUI. The reason for this is that Gnome has its own Virtual File System (VFS) interface that may use older versions of Samba.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

aaaah understood. Was a bit wondering how you could measure distinguished between cache and HDD. Okay, will have to observe this, once I hook up my C2 again :)

dru
Posts: 20
Joined: Mon Aug 01, 2016 9:45 am
languages_spoken: english
ODROIDs: C2
Location: Sydney, Australia
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by dru »

Yeah wasnt sure what the issue was. Assumed OP meant playing files was slow from network.
I tested copying files from the C2 with LE 7.1 with a NTFS and a FAT32 drive and maxed out at 40-50MB

OP mentioned that hes using EoP which could be the bottleneck as EoP is flaky at best. Try eliminating that as the cause

MidnightWatcher
Posts: 52
Joined: Wed Mar 02, 2016 1:50 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by MidnightWatcher »

What is EoP? You mean powerline adapter? No issues there. The RPi2 can stream well, but as soon as I try it with the C2 it's very slow.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

dru wrote:Yeah wasnt sure what the issue was. Assumed OP meant playing files was slow from network.
I tested copying files from the C2 with LE 7.1 with a NTFS and a FAT32 drive and maxed out at 40-50MB

OP mentioned that hes using EoP which could be the bottleneck as EoP is flaky at best. Try eliminating that as the cause
Do you use an eMMC or an SD-Card for your system? Perhaps it was (at least in my case) because of slow sd-card. I will have to find out whether SMB transfers are cached on SD-Card first and then copied to external drives (but I don't think so). Actually I tested it some months ago the last time, so there might have been a totally different issue back then. Hopefully somebody can help MidnightWatcher with his bottleneck.

MidnightWatcher
Posts: 52
Joined: Wed Mar 02, 2016 1:50 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by MidnightWatcher »

Using 8GB eMMC on the C2. Using 32GB SD on the RPi2.

MidnightWatcher
Posts: 52
Joined: Wed Mar 02, 2016 1:50 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by MidnightWatcher »

Has anyone tried out the recently released LibreELEC 8.0 alpha 5 for the C2 to test SMB performance? Would it be possible to update wrxtasy's 7.1.0 to the 8.0 alpha 5, or does it need to be a fresh install?

Edit: Did a fresh install of LE 8.0 Alpha 5 and there's no difference in SMB performance.

User avatar
odroid
Site Admin
Posts: 35535
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1176 times
Been thanked: 871 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by odroid »

Try to use the DietPi image to narrow down root causes... like network configuration or file system on the storage.
According to DietPi author's testing, he could get near 110MB/sec over SMB.
http://magazine.odroid.com/wp-content/u ... df#page=22
http://forum.odroid.com/viewtopic.php?f=138&t=19948

User avatar
wrxtasy
Posts: 1304
Joined: Wed May 13, 2015 1:59 pm
languages_spoken: english
ODROIDs: C1, C1+, C2, N2
Location: Australia
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by wrxtasy »

I'm wondering if this post may be somehow related to this SMB problem:
http://forum.odroid.com/viewtopic.php?f ... 40#p146102
Kodi Hardware Guru

MidnightWatcher
Posts: 52
Joined: Wed Mar 02, 2016 1:50 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by MidnightWatcher »

odroid wrote:Try to use the DietPi image to narrow down root causes... like network configuration or file system on the storage.
According to DietPi author's testing, he could get near 110MB/sec over SMB.
http://magazine.odroid.com/wp-content/u ... df#page=22
http://forum.odroid.com/viewtopic.php?f=138&t=19948
Thanks for the suggestion. I installed DietPi and set up a Samba server, but even that was no better. Looks like even the default SMB settings in DietPi result in very slow transfer speeds in comparison to the RPi2, at least for me.

I then decided to try ProFTPD to see if that did any better, and YES, it is much faster than the RPi2. I think I'll stick with the FTP server for now. :)

seppel
Posts: 18
Joined: Mon Jun 13, 2016 3:21 pm
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by seppel »

Check your connection with "ethtool eth0" if its running on Gigabit speed.

I sent my first C2 back because i had issues with my nic. it was showing only 100Mbit or even 10MBit with ethtool.
The second C2 is running without any problems.

User avatar
wrxtasy
Posts: 1304
Joined: Wed May 13, 2015 1:59 pm
languages_spoken: english
ODROIDs: C1, C1+, C2, N2
Location: Australia
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by wrxtasy »

dru wrote:Yeah wasnt sure what the issue was. Assumed OP meant playing files was slow from network.
I tested copying files from the C2 with LE 7.1 with a NTFS and a FAT32 drive and maxed out at 40-50MB

OP mentioned that hes using EoP which could be the bottleneck as EoP is flaky at best. Try eliminating that as the cause
Yes unless the Powerline adapters are taken out of the equation not lot of people are going to be interested in looking at the supposed problem. I actually don't trust these Powerline adapters either.

What color is the Ethernet Port light showing on the C2 ?

Anyway if FTP seems to be working we can put this incompatibility between SMB on the C2 and Powerline adapters to bed.
I'm not seeing it as a widespread LibreELEC issue.
Kodi Hardware Guru

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

seppel wrote:Check your connection with "ethtool eth0" if its running on Gigabit speed.[...]
Thanks for this useful command! My one is showing Speed: 1000Mb/s and finally tested it (after 2 or 3 months) the first time again and speed is limited by my NTFS USB 2.0 HDD, which is connected to the Odroid C2. Hence the speed is around 30MB/s... really awesome :).

Exist2Resist
Posts: 40
Joined: Sat May 28, 2016 3:08 am
languages_spoken: english
ODROIDs: C2
Location: Great White North
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by Exist2Resist »

First, power line adapters are trash. Unless you are sitting on the same circuit they slow down quite a bit.
I know this because I've been testing them in several environments over the last few years.
They are only useful if you need a wireless access point somewhere in the house, that's about it.
That's like using WiFi to stream 1080P with DTS-HD Master Audio, it's just not going to work most of the time.
I say most of the time because like Ethernet over power, unless you are the only one streaming and the alignment of the celestial bodies is just right, you will not get good results.
Having said this it is all dependent on the content you have and the bitrate it's encoded at, for me 30MB/s would not be enough to stream some of my content.

MidnightWatcher
Posts: 52
Joined: Wed Mar 02, 2016 1:50 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by MidnightWatcher »

The latest generation of powerline adapters are pretty good. They're not as fast as a wired ethernet connection of course and the DLink 701AV I use maxes out at 400 Mbps (best case scenario), but I'm now getting a consistent and reliable 200 Mbps on two different circuits using the ProFTPD server and the C2. Much better than my 300 Mbps routers were giving me.

http://www.techhive.com/article/2935582 ... prize.html

Samba via C2 (LibreELEC 7.1 / 8.0 beta / DietPi) ~ 25 Mbps
FTP via C2 (ProFTPD - DietPi) ~ 200 Mbps

The issue is not the powerline adapter.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

To come back to this topic...
The last time I wrote about 30MB/s was, when I had my laptop connected via ethernet cable (1GBit connection). The smb transfer to external HDD was limited by USB2.0 speed (30MB/s).

I updated my good old laptop recently with an Intel 7260 AC Wifi card (2x2 maxes out at theoretical 866MBit). Well I was really disappointed that that the real transfer rate through SMB was just 13MB/s to the very same external USB2.0 HDD connected to the C2.

After a lot of investigation I found out the reason for this slow transfer speed on C2 LibreELEC: There are buffers in samba.conf, which slow it down dramatically....

default samba.conf/smb.conf (max 13MB/s with a Wifi AC card reporting actual 866MBit connection)
socket options = TCP_NODELAY IPTOS_LOWDELAY [b][color=#FF0000]SO_RCVBUF=65536 SO_SNDBUF=65536[/color][/b]

Withouth those buffers: 24 to 32 MB/s with the same connection
socket options = TCP_NODELAY IPTOS_LOWDELAY

If I follow crashoverrides hint some posts above and test the RAM/Cache (so no filesystem limits) then I get around 42 MB/s max transfers via Wifi. That's pretty good for a 2x2 Wifi card. A 3x3 Card would squeeze even more out of it.
(Transfer via ethernet cable to ram/cache is about 55MB/s).

My conclusion: SMB transfer overhead has surprisingly significant impact on transfer rates if using WIFI.

If somebody has fun confirming this, this could be a good improvement for default smb.conf.

User avatar
wrxtasy
Posts: 1304
Joined: Wed May 13, 2015 1:59 pm
languages_spoken: english
ODROIDs: C1, C1+, C2, N2
Location: Australia
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by wrxtasy »

I would try this October pre release .tar update test (see main LE 7.1 Sep thread for details).
It has the smb.conf file included without the SO_RCVBUF & SO_SNDBUF buffers.

LibreELEC-Odroid_C2.aarch64-7.1.0.Oct.smb.720p.tar
Kodi Hardware Guru

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

Impressive! Thanks for that. This conf is now obviously the same speed as mine was (I simply edited /storage/.config/samba.conf.sample and renamed to samba.conf)
I hope this will do it better for everybody. But who knows... may be it is only useful for wifi speed-up. But as war as I've seen, it does not have any negative impact on wired LAN speed in my network, so hopefully it is okay for a default smb.conf.

There's another thing:
Perhaps you've heard of the ntfs mount option big_writes (I don't know if you use ntfs drives, but I do for having the option to connect it to my Windows devices). Well.. As ntfs driver is in user space, it is historically quite slow and cpu loading. the big_writes option can boost it extremely.
See here: http://obihoernchen.net/ (please search the blog for keyword big_writes):
obihoernchen.net blog wrote:With default mount options you get around 16 MB/s write. With big_writes you get up to 62 MB/s write.

Could you perhaps edit two lines in /etc/udevil/[b]udevil.conf[/b]:

Line 224
from: default_options_ntfs = nosuid, noexec, nodev, noatime, fmask=0133, uid=$UID, gid=$GID, utf8
to: default_options_ntfs = nosuid, noexec, nodev, noatime, [b][color=#FF0000]big_writes,[/color][/b] fmask=0133, uid=$UID, gid=$GID, utf8

And

Line 245
from: allowed_options = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount
to: allowed_options = nosuid, noexec, nodev, noatime, [b][color=#FF0000]big_writes,[/color][/b] fmask=0133, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount

I hoped, I could test it the same way as samba, i.e. I looked for a sample (override udevil.conf) file in .config directory, but there seems no way for such a solution. And as I cannot build my own LibreELEC, I hoped you could perhaps make a testbuild somewhen with big_writes, so I could test it on LibreELEC. I tried it half a year ago on my banana Pi and the ntfs boost was heavy back then, but as the banana Pi has only two cores, it was limited way sooner than the quadcore Odroid C2 with ntfs.
Last edited by infinity85 on Mon Oct 03, 2016 7:28 am, edited 2 times in total.

User avatar
rooted
Posts: 8031
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 724 times
Been thanked: 251 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by rooted »

crashoverride wrote: NTFS will affect the performance numbers. Although there is a kernel module (read only), NTFS on most distributions use the File System in User Space (FUSE) interface which is much slower.
This has not been my experience, ntfs-3g is much faster than the kernel NTFS driver.

I get about 6 MB/s over SMB from my phone to the C2 on LE 7.

Quite slow but I'm using a slow ass 4GB micro SD.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

I'm quite sure crashoverride was referring to "FUSE" in general as being much slower, not to NTFS-3G driver itself.

The reason why NTFS-3G is faster than the current NTFS kernel driver is that the kernel drivers development was dropped long time ago. And since tuxera made approaches to develop a NTFS-3G user space driver and made it free to the community, there was apparently no priority to work on a better NTFS kernel driver. But certainly a clean kernel driver would perform way better than the comparably slow NTFS-3G driver :/.

The big_writes mount parameter can boost ntfs performance significantly (coming closer to ext4/ext3 performance), but I'm not sure about negative side effects (I didn't encounter any, when I tried it at the beginning of the year, but not on Odorid C2)

*Edit*
See here for example: http://www.cnx-software.com/2010/03/04/ ... d-systems/

User avatar
rooted
Posts: 8031
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 724 times
Been thanked: 251 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by rooted »

I didn't know ntfs-3g no longer used FUSE.

crashoverride
Posts: 5133
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 375 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by crashoverride »

NTFS-3G still uses FUSE. The only thing that has changed is that it is compiled into it rather than linked via an external library.
http://article.gmane.org/gmane.comp.fil ... .devel/392
Let's start with this release candidate. The big change this time is the
built-in, integrated FUSE support on Linux and consequently a much
improved, completely rewritten, backwards compatible build system, big
thanks to Alon Bar-Lev!

What does the integrated FUSE support mean? It means that NTFS-3G has no
FUSE runtime user space, or compilation time dependency on Linux anymore.
Developers and users must only ensure that the FUSE kernel driver is
available for the running kernel, which is basically a standard nowadays.

User avatar
wrxtasy
Posts: 1304
Joined: Wed May 13, 2015 1:59 pm
languages_spoken: english
ODROIDs: C1, C1+, C2, N2
Location: Australia
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by wrxtasy »

@infinity85,

I threw the suggested big_writes tweaks into udevil.conf and came up with another .tar update.

LibreELEC-Odroid_C2.aarch64-7.1.0.NTFS.tweak

W.
Kodi Hardware Guru

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

man you are the awesomeness of awesome :D
Thanks a lot!

Will try it and report :)

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

Tested it now :)

  1. The new LibreELEC-Odroid_C2.aarch64-7.1.0.Oct.test.img.gz from main thread does not boot. Red LED without blue LED. Yellow Etherned led blinking, but no HDMI signal and no SSH or so in the Network. Tried writing and verifying SD Card two times successfully, but something seems broken
  2. Took fresh August img and updated with LibreELEC-Odroid_C2.aarch64-7.1.0.NTFS.tweak
  3. NTFS speeds are limited by USB 2.0 (shit... forgot that NTFS tweaking does not help thaaat much, because USB2.0 anyway :lol:). So now the hope is simply, that big_writes can perhaps speed up writing relatively "small" files ;)
  4. I think the NTFS drive is not mounted with big_writes option, because the paramter is missing, if checking:
    LibreELEC:~ # mount
    /dev/sdb2 on /var/media/Volume type fuseblk ([b]rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096[/b])
  5. Perhaps the reason is that you introduced a new line (#247) to allowed options section (allowed_options_ntfs) instead of just putting big_writes in the line 245: allowed_options like described by the blog that I referred to in my post above.

    Line 245: allowed_options = nosuid, noexec, nodev, [b]noatime, fmask=013[/b]3, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount
    Line 247: allowed_options_ntfs = nosuid, noexec, nodev, noatime, [b]big_writes[/b], fmask=0133, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount

    On the other hand you made it according to the description in udevil:
    udevil.conf wrote:# allowed_options_FSTYPE, if present, is used to override allowed_options
    # when mounting a specific fstype (eg ext2, nfs).
    So it should work, unless there is something not correct in this line. But the mount works, so I don't know. Perhaps the big_writes parameter is simply not supported or so.
Anyway... thank you very much for this testbuild! As I'm not sure about how to activate big_writes and as I see that USB2.0 is limiting anyway (simply forgot to consider this haha), I don't want to bother you with this. I'll take some jessie image or so and will test it myself (as there I can edit mount parameters myself :)). Thanks again very much for building this testfile!

Real shame that the C2 does not have USB3.0 or a eMMC to SATA konverter or so.

p.s.: I made some measurements anyway and my stopwatch showed that files (big ones 3.33 GB as well as thousands of thunmbnails around 20KB) transferred a bit faster, but I assume it might be because of higher CPU clock in this testfile. Although USB2.0 is the limit, it was faster because the transfer rates seemed more constant at the limit during transfer.

User avatar
wrxtasy
Posts: 1304
Joined: Wed May 13, 2015 1:59 pm
languages_spoken: english
ODROIDs: C1, C1+, C2, N2
Location: Australia
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by wrxtasy »

Yes as you deduced correctly, I put big_writes into allowed_options_ntfs
I've now transferred it into allowed_options
This is the new tweaked version:

LibreELEC-Odroid_C2.aarch64-7.1.0.big_writes.tar
Kodi Hardware Guru

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by infinity85 »

Thanks again also for this testbuild :)

And here again "mount" does not show big_writes, but it doesn't matter, it does have a noticable effect (so does your previous new live, both the same improvement)! :)

This time I took the time to make some speed tests and the results are somehow pretty impressive! I'm not sure how it works exactly, perhaps there is some kind of cache involved, because I made a lot of transfers of 1000MB files (same size, but different files - made rar-parts for it) and the result via SAMBA was an average transfer rate of around 42MB/s with big_writes and 32 MB/s without big_writes. That's an improvement of ~30%! And that's what makes me wonder... how is such a transfer rate of above 32MB/s possible if the target drive is connected via USB2.0... perhaps UASP support? On the other hand, files that are 3000MB were transferring with 32MB/s in average... so I thought this might be because big_writes uses some kind of ram caching... however observing the ram in kody system-info did not show a increase of ram usage above 216MB. And the official description of the big_writes parameter doesn't point to an involvement of RAM:
ubuntu manuals wrote: big_writes:
"This option prevents fuse from splitting write buffers into 4K chunks, enabling big write buffers to be transferred from the application in a single step (up to some system limit, generally 128K bytes)."
So I made some comparison runs...
  • without big_writes:
    LibreELEC-Odroid_C2.aarch64-7.1.0.Oct.smb.720p.tar
  • with big_writes (both solutions provide the same improvement):
    LibreELEC-Odroid_C2.aarch64-7.1.0.big_writes.tar
    LibreELEC-Odroid_C2.aarch64-7.1.0.NTFS.tweak
  • Connected with wired GBit LAN connection.
  • Real world tests: Transferred always rar parts of the exact same size (but different content, to avoid caching effects or so)
  • Real world tests: Made CRC-32 checks afterwards to make sure data integrity after copying
Big_writes HELIOS_klein.png
(240.61 KiB) Downloaded 1750 times
I repeated this benchmark many times and it was always almost the same result. The writes are faster by almost 40% and all the other performance values are not really significantly worse in my opinion.

But benchmarks are just benchmarks... So I did some real world comparisons with my stop watch and observing my network cards transfer durations (repeated transfers at least 5 times):

1000 MB file size, SAMBA to NTFS HDD in USB3.0 enclosure (obviously connected to odroids USB2.0):
  • without big_writes
    Write: 26 MB/s to 32 MB/s (38s to 32s transfer duration, mostly peaking at 30MB/s)
    Read: Same as write. About 30 MB/s.
  • With big_writes
    Write: 41.7 MB/to 45 MB/s !!! (24s to 22s transfer duration)
    Read: 30 MB/s (33s duration)
  • Conclusion 1000 MB: The tests for my 1000 MB files were really impressive. Steadily above 40MB/s to a USB2.0 share...don't know how this is possible with USB2.0 limit, but my laptops network interface dropped transfer rates directly after the stopped time. So if some kind of cache is involved, it is completely done on the odroid, but there was certainly no hidden data traffic jam on my laptops side)
3330 MB file size, SAMBA to NTFS HDD in USB3.0 enclosure:
  • without big_writes
    Write: 32.6 MB/s (102s duration)
    Read: Same as write. About 30 MB/s.
  • With big_writes
    Write: 33 MB/s (101s duration)
    Read: Same as write. About 30 MB/s.
  • Conclusion 3330 MB: The tests for my 3330 MB test file showed no noteworthy benefit from big_writes.
So at least according to my tests I'd stick with_big writes paramter. Seems it doesn't matter whether you put it into allowed_options or into a new line called allowed_option_ntfs. Mount command doesn't show it, but the results speak for themselves: Almost 40% higher transfer speeds to the Odroid C2 for free? Why not :D

I hope that my results are not only restricted to my setup. At least here I could not see any drawbacks using big_writes. I would leave it activated unless anybody complains about it ;)

Sidenote: The increased write speeds are also showing via wifi connection. There I get 38 MB/s (at least for 1GB files) and thanks to your updated smb.conf.

Thanks again for the testbuilds!

User avatar
wrxtasy
Posts: 1304
Joined: Wed May 13, 2015 1:59 pm
languages_spoken: english
ODROIDs: C1, C1+, C2, N2
Location: Australia
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: SMB Very Slow Using LibreELEC On The C2

Post by wrxtasy »

I've upstreamed a pull request with these smb and ntfs config tweaks to see if other LE platforms benefit.

https://github.com/LibreELEC/LibreELEC.tv/pull/807

Thx for testing.
Kodi Hardware Guru

Post Reply

Return to “CoreELEC/LibreELEC - Kodi Project for C1/C2”

Who is online

Users browsing this forum: No registered users and 1 guest