Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Can't cache files larger than ~1MB #2

Open
HunteX opened this issue Oct 6, 2014 · 2 comments
Open

Can't cache files larger than ~1MB #2

HunteX opened this issue Oct 6, 2014 · 2 comments

Comments

@HunteX
Copy link

HunteX commented Oct 6, 2014

I want to cache the entire steam repo.
Why nginx can't cache files > 1.1MB? (tested on CS:GO repo)

Real repo (CS:GO) size: ~7GB
Lancache repo size: ~3,4GB

find /srv/www/cache -type f -size +2M
returns nothing

@wolrah
Copy link
Owner

wolrah commented Oct 6, 2014

I'm not really sure. Due to the way this works now with the hashed request URIs I can't isolate just the CS:GO section of my cache like I used to be able to when it was Steam-only, but I can say that I do have >2MB files in my cache.

wolrah@lancache:/srv/www/cache$ find /srv/www/cache -type f -size +2M
/srv/www/cache/installs/28/5d/7f5e5ef2d375eccb02950bb963615d28
/srv/www/cache/installs/bb/a1/6d17f332e71e25fd566b6eec71eca1bb
/srv/www/cache/installs/4a/0c/3869d7f2a7fce1da0eeb71f8f8aa0c4a
/srv/www/cache/installs/ca/65/e1ebe2a57606faff3d79d3ee2dc565ca
/srv/www/cache/installs/51/c1/79455af28ef7884c7dabbdfaa752c151
/srv/www/cache/installs/51/d8/1e342c22cd6bdaa8e9eed479a042d851
/srv/www/cache/installs/82/3d/1b53881b43480c15ceed56557f263d82
^C

I'm deleting CS:GO from my local PC right now, I'm not sure if I have it in my cache so I'll monitor both cache size and performance while installing to see if I'm experiencing the same.

@wolrah
Copy link
Owner

wolrah commented Oct 6, 2014

I am unfortunately unable to replicate the problem, when I reinstalled CS:GO it pulled entirely from the cache. Nothing at all went over the internet.

Looking at lancache-steam-access.log I see 65 "MISS" entries from today, all of which are "GET /appinfo/" requests (browsing the Steam store and I think some library functions) and over 10,000 "HIT" entries mostly for "GET /depot/" requests (game downloads).

CS:GO is depot 731 for most content and 732-734 for OS-specific content, so

grep depot/73 lancache-steam-access.log | cut -d " " -f 7,10 | sort -k 2 -n

gets me all the requests relating to this game's install files sorted by filesize. No request exceeds 1048896 bytes, which is exactly 320 bytes greater than one mebibyte (MiB, 1024^2 bytes) so I'm guessing that's intentional, something like a max chunk size of 1MiB plus a header. None come anywhere close to 2MB, so your test unfortunately indicates nothing as far as I can tell.

Adding up all the above chunks I get 4.4GB across 10518 requests relating to CS:GO. The game claims 4.1GB downloaded to produce 7.75GB on disk, so I have no idea where the extra 300MB downloaded comes from (I checked, there are no duplicate requests) but the difference on disk is pretty likely compression-related.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants