Slow iSCSI read from Kodi

Hi guys,
Long time lurker here, but I’ve been scratching my head on this one for long enough so I need some help please.

At home I have a raspberry pi3, currently running raspbian on a class 10 micoSD card, previously I had OSMC installed but for testing purposes I moved to raspbian. I have a dedicated user (Kodi) configured with a /home folder on a 16GB USB 3.0 device where Kodi is also installed (/home/Kodi/.kodi)

For storage I have a Thecus NAS which only support iSCSI presented LUNs. The NAS is connected to a gigabit switch and when presented to either my pc, my laptop, or the raspberry pi I get full speeds either reading or writing data.

The kicker is, Kodi will only read very erratically from the LUN (ext4) when it’s presented to the pi3 via eth0, to the point where (using nload installed on the pi3) I’ve noticed speeds go from 300kb/s-4mb/s, with spikes to 8mb/s. This causes havoc when reading larger files (2gb+) and no amount of fiddling with the advancedsettings.xml file has helped.

For further testing I have installed NFS server on the pi3 and copied files from my pc & laptop, through the OS on the pi (either raspbian or OSMC) to the LUN and speeds have been constant and fine. The read speed issue only occurs when Kodi is reading from the drive.

At one point I thought it may have had something to do with permissions, but this turned out to be bogus. When I had OSMC running on the pi, I created a support thread on the OSMC support forum. Not sure if I’m allowed to link it here, but can do if it’s felt it would help.

So, Kodi community, I seek your advice on how to achieve constant read speeds when watching media from an iSCSI presented LUN please.