Be aware here when testing by playing something from the movie library. My movie library was built on a sftp:// path. This was changed to a local path where the archive was sshfs mounted without updating the db.
You could still start and play everything from the indexed library but nothing in advancedsettings.xml was applied. This even with buffermode 1 (all filesystems). However, wipe and update the DB and it will be fine.
In my case, increasing the ”readfactor” fixed the lag and hickups. Kodi just didn’t utilize the available bandwidth without increasing this a lot. Memory size didn’t matter much as the buffer wasn’t filled fast enough anyways.