Performance boost - Move .KODI folder to HDD

Guys,

I was having problems with low disk space, and it was suggested to move user data folder to HDD and use a symbolic link to it.

Instead I moved the entire .kodi folder and the performance boost iv had has been incredible.

Before just switching between films in the menu and art work would take ages to update. No its instant. (almost)

Also scanning library nearly took all day… now its like 10 minutes.

Has anyone else done this? It would be interesting if it makes a difference for anyone else, if it does its something that might be good as a setting?

D

Hi,

What was the link you created to point to the new location?
Did you do this via ssh?

cheers

What device are you playing with? You don’t have OSMC on the HDD?

Hi,

This is on a Raspberry PI 2, running from SD card.

I cant get to my device right now but I will post step by step instructions tonight.

I SSHed into the device to do it.

Basically it was something like this: (I’m typing commands from memory so could be an error)

  1. SSH into the device.
  2. sudo systemctl stop mediacenter
  3. sudo mv /home/.kodi /media/hdd/.kodi
  4. sudo ln -s /media/hdd/.kodi /home/.kodi
  5. sudo systemctl start mediacenter

D

Sounds like you have a really slow SD card. A lot of SD cards including some Class 10 cards have really abysmal 4KB random read/write performance (less than 0.1MB/sec) which will really hurt Kodi performance especially scanning new items into the library.

On the other hand a good SD card actually has better random 4KB read/write performance than a spinning drive…(some are as fast as 2MB/sec or more)

Yeh I bought the cheapest I could from ebay… probably will try a decent card later on.

Hi Dan

Get a Samsung evo microsd card. Fastest for the pie. No lag them.

Any of the higher end Samsung cards are good, I have a 32GB Samsung (not evo) and it is very fast. (But it was quite expensive)

The standard 8GB Raspberry Pi Noobs card sold by the Pi foundation (and others) is also very fast for its price, not quite as fast as my Samsung but not far behind it. (It is apparently a rebranded Samsung card) Sandisk are generally good too. Transcend and Kingston are to be avoided as are no-name brands. :wink:

The key metric to look at when benchmarking and comparing SD cards for OSMC is the random read/write performance, both 4KB and 512KB, but particularly the former. That’s where the poor cards really fall down. There is about a 20 to 1 difference in random 4KB write performance between the worst and best cards.

Cards with poor random write performance also tend to lack wear levelling, which means they don’t last as long when being used for the root file system of an operating system. A card with fast random write performance is usually a good indication that the card also has wear levelling. (Wear levelling constantly remaps the physical locations of sectors when written - this both increases random write performance by writing to pre-erased blocks and eliminates localised wear on the card at specific physical locations)

Good info DB

Seems Samsung pro is fastest.

On Amazon it says that the 16gb samsung pro cards has same read write speed as the 16gb evo. Only the 32gb and up pro cards have the increased performance 90mb/s.

Will invest in one of these. Is the rpi2 capable of the 90mb/s pro speeds?

Thanks

You’ve got to be really careful with the keyboard caps key when discussing speeds to be sure to compare the right things "b"its per second vs "B"ytes per second. I think the bandwidth of the Samsung Pro is actually 90MB/s (bytes) rather than bits.

I think also (someone correct me if I’m wrong) that the SD card even on a Pi 2 is connected via the built in USB hub which is USB 2.0 hence 480Mb/s (bits). Allowing for a bit of overhead on start and stop bits and so forth that’s near enough 48MB/s so only just over half the quoted speed of the SD card. When you consider that there will often be other stuff going through that USB hub then, if all my assumptions are accurate, I’m not convinced that the raw read speed of the Samsung Pro will give much if any benefit vs a 40-MB/s card as far as read speed is concerned although sequential write I do think you would see benefit from the Pro card. Sequential write is often half the speed of the read speed.

Of course the other factors to consider are random block R/W speed which, as already mentioned, is pretty key rather than the headline rate which is typically sequential read speed. Unfortunately card manufacturers aren’t as good at giving these figures so one usually has to go grubbing around for reviews that actually ran speed tests on the cards under review.

I did find this review (http://www.storagereview.com/samsung_32gb_evo_microsd_memory_card_review_mbmp32d) on the Samsung Evo which also has a link in the first paragraph to their earlier review of the Pro card. You might notice that the Evo posted unusually good large-block random read/write figures, better large block random write then the Samsung Pro as it happens, which is why I’m currently leaning towards the much cheaper Evo since it might even be faster in real life.

I’ll be really interested to hear other people’s comments and any other links to reviews would also be much appreciated in case I missed them myself.

  • Julian
1 Like

From my experience the Pi maxes out the sd card at around 22MB/s

Unless you run the sdhost driver overclocked - in which case I’ve seen speeds as high as 38MB/sec :slight_smile: Didn’t test for long enough to see how stable that was though…

As i remember the use of symlink it will only accept a “Target”-folder / path.
So you will have to go into the folder where you need your link and point to the target. i.e.:
~> cd /home/.kodi
~/home/.kodi> sudo ln -s /media/hdd/.kodi

I have a question… since library updates happen in the /home/.kodi folder, would running /.kodi from the hdd prolong the life of my sdcard?

I don’t understand the point of move the .kodi folder to the HDD, why not just install the whole OSMC at the USB HDD?

For one, with a USB install you can’t reinstall OSMC from scratch without wiping the whole external drive - that doesn’t make it a good place to store media files…

I have a EXT4 partition on my HDD.If I need to reinstal the whole OSMC (manualy) in that partition.

No. sdcard uses a dedicated interface, not USB.

In theory it runs at 50MHz @ 4 bits/cycle, so 25MB/s is the theoretical limit.
However it is affected by core clock speed. It uses an even divisor of core clock, so at 250MHz you run sdcard at 41.66MHz, or a theoretical 20.8MHz. Overclocking core can allow the full 50MHz sdcard clock.

Also switching to the newer sdhost driver only needs an integer (not necessarily even) divisor of core clock, which means you get 50MHz even when core is 250MHz.

As @DBMandrake says, you can also deliberately overclock the sdcard interface for significantly higher performance, but backup first - sdcard corruption is possible.

2 Likes

If you use the USB install option in the OSMC installer it will wipe and repartition your external drive to be one ext4 partition. Beware.

1 Like

That’s the reason to install it manually, without the installer.