Very slow transfers from NAS to Titanium
Chris Johnson (125) 825 posts |
Over recent weeks I have been doing considerably more transfers between my NAS and Titanium, and have come to realise that transfers from the NAS to the Titanium are very slow. I have done a number of tests and comparisons with an ARMX6. Hardware wise, the Titanium, ARMX6 and NAS are all connected to the same 8 port 1Gb/s switch. Cables are no longer than 2m. During these tests, I have used both ethernet ports on the Titanium, changed the cable between Titanium and switch, and shuffled the ports used on the switch. None of this had any noticeable effect. During actual speed tests I used a range of files, from a single 112 MB file, to a directory containing some jpeg files totalling around 30 MB. I summarise below some speeds, averaged over transfers. In general, as expected, a single large file transfers faster than several smaller files making up a similar total size. Here are some data to demonstrate the anomalous behaviour. Firstly ShareFS (as a sort of control). Transfers between Titanium and ARMX6 in either direction run at about 6 MByte/sec, which is reasonable for ShareFS. No problem. Now the NAS transfers. Both LanManFS and LanMan98 were used. In the case of the ARMX6, transfers ran at very similar speeds. Download from NAS to ARMX6 ran at around 15 MByte/sec. No problem there. Transfer from NAS to Titanium ran at around 1.4 to 2 MByte/sec. LanManFS tended to be slower than LanMan98, by up to 30%. Thus the Titanium is the best part of an order of magnitude slower than the ARMX6. I cannot understand why there should be such a difference. I have tried to eliminate other software interfering, by running only !Omni and !Alarm on the Titanium. The ARMX6 was used in its ‘normal’ state. The Titanium normally runs the latest nightly build (softloaded). The ARMX6 is currently on the latest OS from R-Comp (Sept 30th). There is no anomalous behaviour uploading to the NAS. The ARMX6 manages around 10 MByte/sec and the Titanium does about 12 MByte/sec. If anyone has any thoughts on why the Titanium is so slow transferring files from the NAS I should be very interested. If transferring a lot of large files, it is actually quicker to download the data to the ARMX6 and then shunt it over to the Titanium via ShareFS! |
Chris Gransden (337) 1207 posts |
I get the same problem. I don’t know what causes it. As a workaround you can restrict the network to 100mbit. ECPVirtual 0 Off Also set the default ‘Next’ size to 640 KB as shown in ‘Tasks’. Its set in !Boot.Choices.Bookt.Desktop. ‘Wimpslot -next 640k’. |
Chris Johnson (125) 825 posts |
Thanks for that, Chris. At least it sets my mind at rest that I wasn’t missing something bleeding obvious! |
Steve Pampling (1551) 8170 posts |
Roughly speaking that would be 150Mbit/s, which suggests a 1Gb link (150Mb/s on a 100Mb link doesn’t happen) and is in the 15-20% throughput range typical of a duplex mis-matched link1 (it gets worse if there is any significant other traffic and the system has to do retries on the packet transmissions) The advice to do this: Would, I believe, tell the device to only advertise a maximum link speed of 100. NB. If you’re pushing through a dumb hub the worst device dictates the operation speed/duplex so try the tests with just the send and receive devices connected.
That’s suggestive of a network link back-off normally caused by packet collisions. For the record a properly working 1Gb link should transfer at 950Mb/s quite happily so you would be looking at 95MB/s transfer – if the send and receive systems can internally handle that volume of data. The other possibility is that one of the 8 lines involved in a 1Gb link is damaged and the system is flipping between an attempted 1Gb and failing down to 100Mb. 1 Manually setting a device to full duplex and connecting to an “auto” duplex status port will give a mismatch when the auto port defaults down to half-duplex. |
Andrew Rawnsley (492) 1445 posts |
For what it is worth, I’ve also seen quite slow Ti network performance to a decent QNAP NAS (intel based) via Omni, just using one gigabit router/switch between. Noticed it the other day when transferring some test files back and forth, although it wasn’t horrible. Just slower than I was expecting. I didn’t bench it. However, I know from the past that network performance to NASs can be very variable. When testing imx6 network driver, I could get up to about 40 MB/sec to an Intel QNAP NAS reliably, but to a similar ARM-based QNAP, performance was much more ragged. At its worst, as low as about 4 MB/sec. We optimised settings and things carefully, and this rose to about 20 MB/sec to ARM-based, and the Intel remained high. As a result, if you can afford it, I’d recommend an Intel-based NAS over an ARM one. Note that ARM-based NAS units are also restricted (by manufacturers) on RAM, usually, too, which doesn’t help them. |
Martin Avison (27) 1494 posts |
Just a quick update from me, as time limited: I also have a Titanium, running a very recent ROM, gigabit connected to a Synology NAS. Using LM98 I seem to get about 28MByte/sec for an 8MB save, and only 1.2MB for a 8MB load. Which seem an even larger difference than those Chris reported. |
Chris Johnson (125) 825 posts |
I tried the config settings suggested by Chris (Gransden), but found found no real difference in behaviour. This problem does seem specific to the Titanium. I have just fired up the IGEPv5 and done a couple of quick tests. That gave results similar to the ARMX6, i.e. download at about 15MByte/s and upload around 10 MByte/s. One thing I did notice in previous tests on the Titanium – RISC OS 5.24 ran about 20-30% faster than OS 5.27, although still pretty pedestrian. |
Chris Johnson (125) 825 posts |
Scrap that – I have just tried again with those settings and the Titanium is now better. It now manages about 10 MByte/s download (which is about 60% the speed the ARMX6 and IGEPv5 manage). Upload it manages around 7MByte/s, not as good as the ARMX6, but very usable. I will keep those settings and see how it goes. In answer to Andrew, the NAS is a Netgear ReadyNAS (supplied by him). I have no idea whether it is Intel or ARM based. |
Andrew Rawnsley (492) 1445 posts |
Depending on the age of the readynas, it could be Sparc, ARM or Intel, but most likely ARM. That would likely explain why none of the platforms are super-fast, but it is probably a red-herring as far as the discrepancies here are concerned. There’s certainly no reason why reads should be faster under 100Mbit rather than gigbit! I know we had to do a fair bit of tuning on ARMX6, though, because our initial results were quite variable (depending on device) as mentioned previously. I spent hours tuning various * commands that were implemented to control buffer sizes, to find what combination worked best for various tricky situations (eg. ARM or Intel NAS, ShareFS to VirtualAcorn etc). However, we had the opposite problem originally with ARMX6 – it was really bad in 100Mbit mode, and good in gigabit mode. Colin G was very helpful in testing and helping track down the bottlenecks there. I think the bottom line is that high speed networking on RISC OS can be extremely sensitive, and you have to be very careful to control buffering etc to avoid excessive packet retries and so on which can bring speeds right down. |
Steve Pampling (1551) 8170 posts |
Physically/electronically – see my earlier comment regarding damage in one of the extra pairs used for Gb – it happens all over1 Equally, there could be an iffy connection and then… there’s the issue of buffering, as you mention, where too little capability means the receive end loses stuff and the TCP stack (not re-written yet) slowly reacts and asks for a re-send (while other stuff has also come and got lost so that’s another resend). An interesting test would be to check the transfer to/from a RAM disc to eliminate any slowness from the physical disc. 1 I had extended |
Rick Murray (539) 13840 posts |
Yeah, NO. That’s like saying the eggs in the box are okay because the carton doesn’t look broken… |
Chris Johnson (125) 825 posts |
I assumed that replacing the cable would rule out cable faults.
I actually did most of my tests using the RAM disc. After trying also to the SSD, I found that the speed of RAM disc and SSD were essentially the same, i.e. the rate determining step was not writing to the local drive. |
David J. Ruck (33) 1635 posts |
The RISC OS RAM disc isn’t as fast as other RAM based filing systems such as Memphis. Something to do with the memory being set to cacheable non bufferable (or maybe its non cacheable bufferable). |
Steve Pampling (1551) 8170 posts |
It does, but there’s also the possibility of a dry joint on the board or in the hub/switch you’re going through. There’s also the possibility that the Titanium NIC driver isn’t as robust an implementation of the auto-detect as it could be.
Useful info. Testing with standard drive, RO RAM disc and Memphis should give an idea of any bottleneck there as opposed to network i/o. |
Martin Avison (27) 1494 posts |
Here some test results in MBytes/sec from my Titanium, recent ROM, using HDSpeed v1.30 with 8MB files run 10 times, saved & loaded as a block, for various FS/discs:
LanMan and LanMan98 were used to my NAS, and both have appallingly slow Load speeds. Do others find similar speeds? |
David Pitt (3386) 1248 posts |
ADFS SSD 123 116 The difference may be down to formatting, different LFAUs. DiscKnight will show the current values. A big LFAU is for speed, a small LFAU is for storage efficiency, LFAU wastage is also revealed by DiscKnight. Are the drives of different sizes?
Throttling the Titanium to 100Mb/s does get the same speed in both directions. |
Chris Hall (132) 3554 posts |
Some drives have RAM caches and their speed depends on how full they are. |
Steve Pampling (1551) 8170 posts |
One thing seems pretty clear: Transfers to/from a RAM ‘storage’ is significantly faster so the disk i/o is not a good implementation. I wrote this: …and then I decided to check something: The link taking you to that thread references SCSIFS but the thread actually suggests that ADFS is also affected. Jeffrey refers to some of the work as a five-minute job which reminds us that things labelled as a five-minute-job always take much longer, especially for normal humans rather than Jeffrey :) |
David Pitt (3386) 1248 posts |
The headline speedtest results from Memphis are impressive, but there is a bit of a but …. The test of choice here is a ROM build. Compared to using the Titanium’s RAMFS Memphis’s unpacking of the source code bz2 and ROM build both took at least five times longer. Added Memphis 3.03 (28 Apr 2005). Is there anything later? |
Steve Pampling (1551) 8170 posts |
Not that I know of – 3.03 (28 Apr 2005) with a Help file that says 3.02 no indication of what the 3.02 —> 3.03 changes are. |
Martin Avison (27) 1494 posts |
I now suspect the main difference is because SSD is Crucial, and Backup is Hitachi, although I have not checked specs carefully. Also according to DiscKnight Backup has about twice the LFAU Rounding and Map Wastage than SSD. I cannot see what the LFAU is, but looks like a factor 2 difference. Anyway, this is irrelevant to the discussion, and I want to concentrate on the network speed. Regarding the various *Configure ECP… settings for EtherCPSW:
Why does that make a difference? I was using Memphis 3.03 in my tests above. |
David Pitt (3386) 1248 posts |
Use |
Steve Pampling (1551) 8170 posts |
I’d say it was pertinent to the discussion1, although your immediate need for faster transfer can probably be addressed by adjustment of the network settings to something that requires less assistance from buffering and hence generates fewer packet resends. 1 However, sometimes we need to deal with the needs of the few (or one) and the needs of the many must wait. |
Andrew Rawnsley (492) 1445 posts |
The Backup is a HDD. It is generally a good idea to mix disc types / manufacturers so as not to stack all your eggs in one basket. For large drives, HDD is also cheaper, and therefore better suited to backup roles, than SSD. One could also comment that the “trim” situation (or lack thereof on RISC OS) makes HDD more suitable for backup type jobs than SSD, as there will be quite a lot of “remove old data and replace with new backups” going on. |
Martin Avison (27) 1494 posts |
How silly of me! Of course it is – I was confusing it with a Pi I was running for some time with two SSDs! Thanks Andrew. |