Kodi Community Forum
Ethernet speed between ATV2 and ReadyNAS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: iOS & tvOS (https://forum.kodi.tv/forumdisplay.php?fid=137)
+---- Thread: Ethernet speed between ATV2 and ReadyNAS (/showthread.php?tid=130580)

Pages: 1 2


Ethernet speed between ATV2 and ReadyNAS - sydneydownunder - 2012-05-03

Hi guys,

I've trying all sorts of things, searching the net but couldn't find a question this strange problem.

Ever since my ATV2 was crashed (I don't know why it crashed but it crashed over night) and I could not start the AVT2. I had no choice but to try SeaS0nPass to upload the firmware again. Unfortunately, Seas0nPass uploaded the iOS5 onto it. Anyway, I followed the instructions (from this forum) to install XBMC Eden on the ATV2 with iOS5. Everything was fine for a few days and all of a sudden, everything became so slow, XBMC showing "buffering" so often or it became sluggish and caused audio / video out of sync badly.

I've tried everything I've found on this forum (went to the FAQ, read so many topics....) and I have decided to test the network between my ATV2 to the ReadyNAS NV+. What I have is:

- ATV2 plugged to Cat6 Ethernet cable (brand new) to Air Port Extreme (running firmware 7.5.2).
- ReadyNAS NV+ plugged to Cat6 Ethernet cable (also brand new) to the same Air Port Extreme. This ReadyNAS is set to 100Mbit Full Duplex.

I've created half a gigabyte file on the ReadyNAS then then SSH into AVT2. From ATV2, I've tried to ftp to the NAS:

ftp> get halfgig /dev/null
200 PORT command successful
150 Opening BINARY mode data connection for halfgig (524124160 bytes)
226 Transfer complete
524124160 bytes received in 278 seconds (1887516 bytes/s)

Now, 1887516 bytes/s is 1.89 Mbps. How could it be?

I used my laptop also plugged in the same Air Port Extreme with the same Ethernet cable and the same ftp test resulted: 85.53 Mbps

I know ATV2 has 100Mbit ethernet and why it is so slow? I think this is the culprit causing stuttering and buffering quite often.

Is there anyone experienced the same problem? Is there any suggestion to fix this strange problem?

Thanks guys.




RE: Ethernet speed between ATV2 and ReadyNAS - Cranial - 2012-05-03

(2012-05-03, 12:13)sydneydownunder Wrote: I used my laptop also plugged in the same Air Port Extreme with the same Ethernet cable and the same ftp test resulted: 85.53 Mbps

To confirm, you mean from NAS to Laptop?

If so, can you do the same test, from NAS to AppleTV, but with the AppleTV connected wirelessly to the Airport.


RE: Ethernet speed between ATV2 and ReadyNAS - giftedx29 - 2012-05-04

i'm also having the same issue with using ethernet connection, wireless seems to be alittle better but not much


RE: Ethernet speed between ATV2 and ReadyNAS - sydneydownunder - 2012-05-04

Hi Cranial,

Yes, I did the same test between my laptop and NAS using the same ethernet cable and Air Port Extreme. This was to verify if the Cat6 ethernet cable was good or bad and the Air Port Express was good or bad.

Last night I have also tried to use the crossed cable between ATV2 and the NAS directly (did not use the Air Port Extreme) and the result was not any better.

Before that, I have also tried the wireless (802.3n at 5hz). My Air Port Express reported that AVT2 was connected at 65mbit under excellent condition but the ftp result was even worse. Playing an MKV H.264 codec was stuttering all the way Sad.

I have then tried to apt-get update / upgrade and plugged the ATV2 back to the Air Port Extreme with ethernet cable and the situation was not improved.

After checking things out, I've found that there were 2 kernel parameters:
net.inet.tcp.delayed_ack=1
net.inet.tcp.mssdflt=1440

in /etc/systl.conf which I have tried from this thread: http://forum.xbmc.org/showthread.php?pid=959135%23pid959135

I have reversed them back to:
net.inet.tcp.delayed_ack=0
net.inet.tcp.mssdflt=1500 (because I am using Ethernet)

then the situation improved. The file transfered with 1464773 bytes per second (roughly 11.718184 mbps), which is about 10 times faster.

But... 11.78 mbps is still way too slow on a 100Mbit Ethernet line. That what buzzed me Sad


RE: Ethernet speed between ATV2 and ReadyNAS - sydneydownunder - 2012-05-04

I've mucked around with the kernel parameters on the ATV2 and found:

kern.ipc.maxsockbuf: 1048576 (1Mb). This value can't be higher, what a bummer Sad.

net.inet.tcp.sendspace: 131072 (128K). This value is too small. I pumped it up to 524288 (512K).

net.inet.tcp.recvspace: 131072 (128K). This value is too small. I pumped it up to 524288 (512K).

After that, I've done the FTP test again and the result was 1742230 bytes per second (roughly 13.93784 Mbps), another 2Mbit improved.

Perhaps the physical memory on ATV2 is limited (200Mb) and therefore, the kernel has hard limit of certain kernel parameter value.

I suspect that the Darwin kernel running on ATV2 has other restrictions too.


RE: Ethernet speed between ATV2 and ReadyNAS - davilla - 2012-05-04

5.8MB/s from macbook on wifi to atv2 on wired using scp. That's bytes not bits. No tweaks


RE: Ethernet speed between ATV2 and ReadyNAS - sydneydownunder - 2012-05-04

Mine 4.1MB/s from macbook (Lion) on 5hz channel wifi to ATV2 on wired using scp, roughly 32.8 megabits per second. So, the inbound from outside to AVT2 is quite OK.

Now, with both ATV2 and NAS are on wired and hooked to the same Air Port Extreme:

- From AVT2, scp the same file from NAS to ATV2 (pull) achieved the rate: 790.0KB/s, roughly 6.32 megabits per seconds.

- From NAS, scp the same file from NAS to ATV2 (push) achieved the rate: 810.5KB/s, roughly 6.484 megabits per seconds.

Something is wrong between ATV2 and NAS for sure Smile.


RE: Ethernet speed between ATV2 and ReadyNAS - sydneydownunder - 2012-05-04

Uh oh....

Apple-TV:/private/var/mobile/Library/Preferences root# tcpdump -i en0 -s0 -w test port 445
tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes

Ethernet on ATV2 is 10Mbit link?

Is there anything similar to mii-tool or ethtool on ATV2 (running Darwin Apple-TV 11.0.0 Darwin Kernel Version 11.0.0: Wed Feb 1 23:17:16 PST 2012; root:xnu-1878.11.8~1/RELEASE_ARM_S5L8930X AppleTV2,1 arm K66AP Darwin) guys?


RE: Ethernet speed between ATV2 and ReadyNAS - Memphiz - 2012-05-04

Not that i know off.


RE: Ethernet speed between ATV2 and ReadyNAS - Cranial - 2012-05-04

(2012-05-04, 10:21)sydneydownunder Wrote: Uh oh....

Apple-TV:/private/var/mobile/Library/Preferences root# tcpdump -i en0 -s0 -w test port 445
tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes

Ethernet on ATV2 is 10Mbit link?

Is there anything similar to mii-tool or ethtool on ATV2 (running Darwin Apple-TV 11.0.0 Darwin Kernel Version 11.0.0: Wed Feb 1 23:17:16 PST 2012; root:xnu-1878.11.8~1/RELEASE_ARM_S5L8930X AppleTV2,1 arm K66AP Darwin) guys?

Interesting. Something screwy with the jailbreak?

*EDIT*

Had a look at mine, (from work, not home for a bit), same output as you:

[quoteATV:~ root# tcpdump -i en0 -s0 -w test port 445
tcpdump: WARNING: en0: no IPv4 address assigned
tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes[/quote]

but interesting, same output from en1 (mine's running on wifi)

Quote:ATV:~ root# tcpdump -i en1 -s0 -w test port 445
tcpdump: listening on en1, link-type EN10MB (Ethernet), capture size 65535 bytes

Don't really know what to say here?

*EDIT 2*

I think the EN10MB can be ignored, haven't had time to read up on tcpdump, but all references I've seen in a quick google search show EN10MB in the output.


RE: Ethernet speed between ATV2 and ReadyNAS - sydneydownunder - 2012-05-05

(2012-05-04, 15:54)Cranial Wrote: Interesting. Something screwy with the jailbreak?
Very possible (and I hope it is a screwy jb. I will try jb again and post the result. Thanks for the suggestion Smile.

(2012-05-04, 15:54)Cranial Wrote: *EDIT*

Had a look at mine, (from work, not home for a bit), same output as you:

but interesting, same output from en1 (mine's running on wifi)

Quote:ATV:~ root# tcpdump -i en1 -s0 -w test port 445
tcpdump: listening on en1, link-type EN10MB (Ethernet), capture size 65535 bytes


[quote='Cranial' pid='1094614' dateline='1336139660']
Don't really know what to say here?

*EDIT 2*

I think the EN10MB can be ignored, haven't had time to read up on tcpdump, but all references I've seen in a quick google search show EN10MB in the output.

Yup... I've read the man page of tcpdump and found that the datalink type is always EN10MB for Ethernet. Therefore, EN10MB is not denoting for 10Mbit link. My bad Tongue


RE: Ethernet speed between ATV2 and ReadyNAS - sydneydownunder - 2012-05-05

I've just done another jb freshly. Everything went smoothly.

Attached ATV2 to the same Ethernet cat6 cable, same Air Port Extreme:

- Before apt-get update / upgrade, freshly ssh in, scp file from NAS to AVT2 is 20.6 megabits per second (1.0MB/s):

Code:
Apple-TV:/private/var/tmp root# scp [email protected]:/c/media/TV/org.xbmc.xbmc-atv2_11.0-3_iphoneos-arm.deb ./
The authenticity of host '172.17.1.223 (172.17.1.223)' can't be established.
RSA key fingerprint is 17:bd:b7:c3:5b:4c:93:20:5f:8f:24:cc:ea:13:1e:e3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.17.1.223' (RSA) to the list of known hosts.
[email protected]'s password:
org.xbmc.xbmc-atv2_11.0-3_iphoneos-arm.deb                                                                                   100%   47MB   1.0MB/s   00:46


- After apt-get update / upgrade, scp file from NAS to ATV2 is 20.8 megabits per second (1.1MB/s):

Code:
Apple-TV:/private/var/tmp root# apt-get update
Get:1 http://cydia.zodttd.com stable Release.gpg [189B]                                                                                                      
Get:2 http://apt.modmyi.com stable Release.gpg [189B]                                                                                                        
Ign http://mirrors.xbmc.org ./ Release.gpg                                                                                                                    
Get:3 http://apt.modmyi.com stable Release [1341B]                                                                                                            
Get:4 http://apt.saurik.com tangelo-3.7 Release.gpg [189B]                                                                                                    
Get:5 http://apt.thebigboss.org stable Release.gpg [197B]                                                                                                    
Get:6 http://apt.saurik.com tangelo-3.7 Release [630B]                                                                                                        
Get:7 http://cydia.zodttd.com stable Release [1619B]                                                                                                          
Ign http://mirrors.xbmc.org ./ Release                                                                                                                        
Get:8 http://nitosoft.com  Release.gpg [487B]                                                                                                                
Get:9 http://apt.saurik.com tangelo-3.7/main Packages [23.5kB]                                                                                                
Get:10 http://nitosoft.com  Release [295B]                                                                                                                    
Get:11 http://apt.awkwardtv.org stable Release.gpg [198B]                                                                                                    
Get:12 http://nitosoft.com  Packages [3847B]                                                                                                                  
Get:13 http://mirrors.xbmc.org ./ Packages [518B]                                                                                                            
Get:14 http://apt.awkwardtv.org stable Release [1033B]                                                                                                        
Get:15 http://apt.thebigboss.org stable Release [30.4kB]                                                                                
Get:16 http://cydia.zodttd.com stable/main Packages [1410kB]                                                                  
Get:17 http://apt.awkwardtv.org stable/main Packages [14.0kB]                                                                      
Get:18 http://apt.modmyi.com stable/main Packages [2071kB]                                                                          
Get:19 http://apt.thebigboss.org stable/main Packages [915kB]                                        
Fetched 4475kB in 1min 4s (69.1kB/s)                                                                                                                          
Reading package lists... Done
Apple-TV:/private/var/tmp root# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
The following packages have been kept back:
  cydia
The following packages will be upgraded:
  berkeleydb coreutils coreutils-bin curl mobilesubstrate openssh sqlite3-lib uikittools unzip wget zip
11 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 3200kB of archives.
After this operation, 950kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://apt.saurik.com tangelo-3.7/main sqlite3-lib 3.5.9-2 [686B]
Get:2 http://apt.saurik.com tangelo-3.7/main coreutils-bin 8.12-7 [729kB]
Get:3 http://apt.saurik.com tangelo-3.7/main openssh 5.8p1-9 [419kB]
Get:4 http://apt.saurik.com tangelo-3.7/main coreutils 8.12-12 [629kB]                                                                                        
Get:5 http://apt.saurik.com tangelo-3.7/main curl 7.25.0-7 [257kB]                                                                                            
Get:6 http://apt.saurik.com tangelo-3.7/main uikittools 1.1.3 [14.3kB]                                                                                        
Get:7 http://apt.saurik.com tangelo-3.7/main unzip 5.52-5 [149kB]                                                                                            
Get:8 http://apt.saurik.com tangelo-3.7/main wget 1.11-3 [139kB]                                                                                              
Get:9 http://apt.saurik.com tangelo-3.7/main zip 2.32-5 [98.8kB]                                                                                              
Get:10 http://apt.saurik.com tangelo-3.7/main berkeleydb 4.6.21-4 [666kB]                                                                                    
Get:11 http://apt.saurik.com tangelo-3.7/main mobilesubstrate 0.9.3997 [98.8kB]                                                                              
Fetched 3200kB in 14s (223kB/s)                                                                                                                              
(Reading database ... 1275 files and directories currently installed.)
Preparing to replace sqlite3-lib 3.5.9-1 (using .../sqlite3-lib_3.5.9-2_iphoneos-arm.deb) ...
Unpacking replacement sqlite3-lib ...
Setting up sqlite3-lib (3.5.9-2) ...
(Reading database ... 1275 files and directories currently installed.)
Preparing to replace coreutils-bin 7.4-6 (using .../coreutils-bin_8.12-7_iphoneos-arm.deb) ...
Unpacking replacement coreutils-bin ...
Setting up coreutils-bin (8.12-7) ...
(Reading database ... 1275 files and directories currently installed.)
Preparing to replace openssh 5.2p1-8 (using .../openssh_5.8p1-9_iphoneos-arm.deb) ...
Unpacking replacement openssh ...
Preparing to replace coreutils 7.4-11 (using .../coreutils_8.12-12_iphoneos-arm.deb) ...
Unpacking replacement coreutils ...
Preparing to replace curl 7.19.4-6 (using .../curl_7.25.0-7_iphoneos-arm.deb) ...
Unpacking replacement curl ...
Preparing to replace uikittools 1.1.0 (using .../uikittools_1.1.3_iphoneos-arm.deb) ...
Unpacking replacement uikittools ...
Setting up uikittools (1.1.3) ...
(Reading database ... 1277 files and directories currently installed.)
Preparing to replace unzip 5.52-5 (using .../unzip_5.52-5_iphoneos-arm.deb) ...
Unpacking replacement unzip ...
Preparing to replace wget 1.11-3 (using .../wget_1.11-3_iphoneos-arm.deb) ...
Unpacking replacement wget ...
Preparing to replace zip 2.32-5 (using .../zip_2.32-5_iphoneos-arm.deb) ...
Unpacking replacement zip ...
Preparing to replace berkeleydb 4.6.21-4 (using .../berkeleydb_4.6.21-4_iphoneos-arm.deb) ...
Unpacking replacement berkeleydb ...
Preparing to replace mobilesubstrate 0.9.3901 (using .../mobilesubstrate_0.9.3997_iphoneos-arm.deb) ...
Unpacking replacement mobilesubstrate ...
Setting up openssh (5.8p1-9) ...
Setting up coreutils (8.12-12) ...
Setting up curl (7.25.0-7) ...
Setting up unzip (5.52-5) ...
Setting up wget (1.11-3) ...
Setting up zip (2.32-5) ...
Setting up berkeleydb (4.6.21-4) ...
Setting up mobilesubstrate (0.9.3997) ...
Apple-TV:/private/var/tmp root# top
-sh: top: command not found
Apple-TV:/private/var/tmp root# apt-get install top
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following NEW packages will be installed:
  top
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 112kB of archives.
After this operation, 823kB of additional disk space will be used.
Get:1 http://apt.saurik.com tangelo-3.7/main top 39-4 [112kB]
Fetched 112kB in 1s (72.1kB/s)    
Selecting previously deselected package top.
(Reading database ... 1278 files and directories currently installed.)
Unpacking top (from .../top_39-4_iphoneos-arm.deb) ...
Setting up top (39-4) ...
Apple-TV:/private/var/tmp root# top
Apple-TV:/private/var/tmp root# scp [email protected]:/c/media/TV/org.xbmc.xbmc-atv2_11.0-3_iphoneos-arm.deb ./
[email protected]'s password:
org.xbmc.xbmc-atv2_11.0-3_iphoneos-arm.deb                                                                                   100%   47MB   1.1MB/s   00:44

- Carry out "take 3" installation of XBMC and trying another scp:
Code:
Apple-TV:/private/var/tmp root# scp [email protected]:/c/media/TV/org.xbmc.xbmc-atv2_11.0-3_iphoneos-arm.deb ./
[email protected]'s password:
org.xbmc.xbmc-atv2_11.0-3_iphoneos-arm.deb                                                                                   100%   47MB   1.1MB/s   00:44

So, without tweaking, the maximum transmit rate is 20.8 megabits per second (1.1MB/s). I am still buzzed with the rate of 20.8 megabits per second over wired (supposed to be 100Mbit line).

Something has gone bad somewhere before.


Ethernet speed between ATV2 and ReadyNAS - Cranial - 2012-05-05

I'm sure I've read another thread regarding poor Ethernet speeds. I'll try to dig it up when I'm not on the iPhone.


RE: Ethernet speed between ATV2 and ReadyNAS - Cranial - 2012-05-07

Here's the other thread I was thinking of: Network problems


Don't think it offers up much info, besides a re-jailbreak to fix issues. Does give info on the testing that took place though.


RE: Ethernet speed between ATV2 and ReadyNAS - sydneydownunder - 2012-05-07

Thanks Cranial.

I did the jail break again and the wired speed is now constantly 1MB/s, roughly 20.6 megabits per second, which is quite acceptable for 720p MKV movies. I will try to investigate further why 100baseT of AVT2 only transmit that speed just for curiousity Wink.