bntjah/lancache

Lancache ISP deployement CPU too high

Closed this issue · 7 comments

First, great job with the lancache.

I deployed it to test it at a small ISP on a VM with 8 cores.

sniproxy is always at 100% on a single core:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
785 nobody 20 0 250596 228452 2204 R 100.0 1.4 15:43.83 sniproxy

Another question is how to increase the cache time to one year for an object.
Second, is how much disk space do you expect I would need. Currently I allocated 12TB to it.

The reason I deployed lancache is because squid based Cache proxies are not caching playstation and xbox as it should because of sony and microsoft having some URL changes and partials that limit the caching ability of squid.

a lot of the settings are in this file
/conf/lancache/caches

also some may have this in the file
"proxy_cache_valid 206 90d;"
example "conf/vhosts-enabled/lancache-origin.conf"

proxy_cache_valid 206 90d;
206 refers to what in this case? 90d I assume is 90 days then?

It's the HTTP response code. A normal HTTP response is 200. 206 means that the server is returning partial content. The default cache settings don't cache that, so some configs add that as a valid response to cache, and to keep the content valid for 90 days.

correct 206 365d
or you can do 200 365d

Thanks a lot

elico commented

@jeansalim Technically I suspected that this issue would arise with sniproxy and I have started working on a GoLang based sniproxy.

Assuming that the lanproject will maintain a detailed list of domains it's possible that the next sniproxy:
https://github.com/fangdingjun/sniproxy code can be customized for it.