jrcichra / lancache-rpi

(Unofficial RPI Version) - A lancache service capable of caching all CDNs in a single instance
53 stars 10 forks source link

Slower than expected cache speeds? #7

Closed Swindyyy closed 4 years ago

Swindyyy commented 4 years ago

Hi, this isn't so much a major bug but more so a question of the speeds I'm supposed to get while using this with a RPi 4B+.

I've set up everything according to the instructions, its clearly working as I jump from ~20MB/s to ~50MB/s. I was just wondering if you've been able to get nearer the 100MB/s mark.

The drive I'm using is an SSD connected via a Quad Sata HAT and running a benchmark of the drive, I should be able to hit 100MB/s sequential reads.

jrcichra commented 4 years ago

What service are you caching, or is it just across the board? I'll give it a try on my Pi4 - we can look at htop usage.

Swindyyy commented 4 years ago

I was using Steam, and using XCOM Chimera Squad as the baseline.

I ran the test multiple times and it kept capping at around the 50 mark. Shouldn't be a bottle neck on the drive I'm installing to as that's an NVMe drive.

On Thu, 7 May 2020, 02:41 Justin Cichra, notifications@github.com wrote:

What service are you caching, or is it just across the board? I'll give it a try on my Pi4 - we can look at htop usage.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jrcichra/lancache-rpi/issues/7#issuecomment-624979797, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJBVB6OXA7USYVBL2WOGCLRQIGVZANCNFSM4M2UH33A .

jrcichra commented 4 years ago

Yeah I had a friend confirm and we are seeing lower than expected speeds, even with the cache sitting in a ramdisk. I'm digging in some more, maybe changing CACHE_SLICE_SIZE would help?

The pi/software might not be tuned for this workload (will have to check my compilation).

CyberoniOntoni commented 4 years ago

You need to fine tune your chunk size. Source "The default of 1MB is considered the safest, but increasing to 2, 4 or even 8 might give performance improvements for single-user download scenarios without too many adverse effects."

jrcichra commented 4 years ago

Closing and recommending you increase the chunk size. Please reopen if this doesn't solve the issue.

Swindyyy commented 4 years ago

Sorry about the delayed. I had to redo the entire NAS set up as one of my drives died. I'm trying to change the CACHE_SLICE_SIZE but every time I add it into the .env file, the monolithic container wont start up

Edit: Just reading through the other threads about monolithic failing and I'm not doing anything with FAT, my drive is formatted EXT4 and only fails when I add in this cache_slice variable

jrcichra commented 4 years ago

@Swindyyy Adding this as the last line in the .env file for me didn't crash the container:

CACHE_SLICE_SIZE=4m

Swindyyy commented 4 years ago

Just to confirm your steps

sudo nano .env Add CACHE_SLICE_SIZE=4m Save .env docker-compose up -d

Are these correct?

jrcichra commented 4 years ago

That's correct. What is the output from docker logs lancache-rpi_monolithic_1 if that still fails?

Swindyyy commented 4 years ago

Ah the log is pointing the issue. It's failing to not invalidate the cache. I'll delete the cache and report back

Swindyyy commented 4 years ago

Just going to link this as it was relevant to my problem: http://lancache.net/docs/advanced/config-hash/

As for my speeds, increasing to CACHE_SLICE_SIZE=4m and CACHE_SLICE_SIZE=8m haven't yielded improvements. I still cap out at 50MB/s. I'm tryna an alternate launcher but I now seem to be having issues with Battle.net being horrendously slow at even just doing the initial starting downloading (Fetching encoding table/fetching index/fetching indices etc)

Swindyyy commented 4 years ago

So I'm just providing an update here because I've finally been able to get back around to closing this off, changing my cache slize size to 8M isn't a fix so I can only assume that the Pi isn't up to handling this workload. Not sure if you want to close the issue after this but I'm ok with it being closed. Upping my slice size did help with my Battle.net speeds though (a little bit!)

jrcichra commented 4 years ago

Sure, I'll close out this issue. I've made a note on the homepage addressing it: https://github.com/jrcichra/lancache-rpi/commit/18949361961116754ac147eccfc5ccce64d67ef8

There's definitely some abstract bottleneck on the Pi. Maybe running a arm64 OS, like Ubuntu, would yield better results.