lack of disk performance

  • Repeated in advance: Great software - many thanks!

    LE runs on my Raspi 2 - connected with a DVB-C box and a 4TB USB disk - as a TV receiver and recorder.

    For some time now there has been a problem, it may have occurred with the update to 9.2.4. 9.2.6 does not repair it:

    The performance of the USB disk is 'gone'. When trying to copy a movie to the SMB share of the disk via LAN, a chache seems to be filled first (the transfer starts fast until about 60-80 MB) and then the transfer rate breaks down completely and the transfer ends with an error (Connection TimeOut). Even if I connect a USB stick directly, transfers from the stick to the disk take almost infinitely long. Also the playback (reading from the disk) is slow: The playback is occasionally interrupted and the buffer has to be refilled first (percentage circle clock).

    The disk behaves normally on other computers.

    How can I analyze this?

    Thanks and regards,

    Boris

  • An USB stick can wear out after some time, because of wear and tear of data writing. USB sticks do not have TRIM support.

    A hard disk can get defragmented, depended on the disk format and block size you are using.

    Are you using an extended cache setting for your Kodi setup?

  • I'd guess the USB drive has an NTFS or exFAT filesystem, so in LE 9.2 you're using FUSE (userspace) drivers which are known to be much slower than kernel drivers (which don't exist, hence using FUSE). RPi2 also has Ethernet attached to the USB(2) bus which is also moving data too/from the disk at the same time. It's a horribly inefficient combination, and other compute devices have a) lots more CPU, b) peripherals on independent buses, so it's really an Apples v Oranges comparison.

  • Hej Klojum, chewitt and Da Flex,

    thank you very much for your statements!

    Let me add some details concerning your hints:

    - to quantify the issue: I just copied 1.65 GB from stick to disk. It took 86 Minutes. I would expect it about 10 times faster.

    - The USB stick is a 128 GB Kingston Data Traveller USB3 device, no year old, moderately used and working full performant at other computers. To have it usable with different systems it is formatted with exFAT. It is only used for reading in this copy process.
    - The disk is a Western Digital 4 TB USB3 drive formatted with ext3, 80% used. That should prevent from fragment-troubles. It is working properly at other computers.

    - Yes, the RPi2 is not a mega performance star and it shares USB bandwdith with all connected devices but it worked just fine until Day X.

    - As I try to remember, Day X could have been the upgrade from LE 9.1 to 9.2.....

    Is 9.1 using kernel drivers instead of FUSE or any other different disk-access technology?? Does this change also affect ext3-drives? Is it worth the idea to give a downgrade a try?

    - In my understanding disabling the buffering cannot add performance in that dimension (or at all?). Thanks anyway for the explanation.

    Thanks,

    Boris

  • You're copying from exFAT (FUSE) on the stick to EXT3 (kernel) on the drive but both are external devices are attached to the same USB bus, and while the devices might be whizzy USB3 ones the Pi board only supports USB2. It's not a combination that results in high read/write performance and you can somewhat prove that USB is the bottleneck by test copying the file to the SD card. It's still not going to be high performance but should be noticably faster. NB: Kodi cache settings have nothing to do with disk read/write performance.

  • Hej Da Flex,

    Hej chewitt,

    thanks again for your thoughts.

    The issue is solved and I am embarrassed: I used a cheap USB Hub to have the USB ports better accessible and to supply the USB disk with power. That little chinese dirt (sorry) caused the trouble.....

    With the stick and the disk connected directly to the Raspberry, copying the mentioned 1,65 GB file is done within less than 2 minutes. Fine.

    Sorry for the noise.

    Boris