lancachenet / monolithic

A monolithic lancache service capable of caching all CDNs in a single instance
https://hub.docker.com/r/lancachenet/monolithic
Other
726 stars 73 forks source link

Slow initial downloads #132

Closed j3ws3r closed 2 years ago

j3ws3r commented 2 years ago

Slow initial downloads. I have 1Gpbs speeds image Speeds if games are uncached and downloading to cache: image When cached, I can reach speeds above 100MB/s

Cloned repo from https://github.com/lancachenet/docker-compose lancache running with docker-compose up -d

DNS Configuration

/etc/resolv.conf : image I set up it this way because I use this for lancache-autofill. With name servers like 1.1.1.1 or 8.8.8.8 directly I still face the same issue

.env file on which everything was built: image

I've added separate ip on the interface: image So I have two IP's on one interface. One is 192.168.1.139 which runs other services not related to lancache and other 192.168.1.142 which I solely dedicated to lancache. On all machines machines I assigned DNS to 192.168.1.142

System specs are: OS: Ubuntu headless 20.04LTS CPU: Ryzen 1200 Ram: 8GB of Kingston HyperX 3000Mhz OS storage: Adata 512GB Nvme storage Other storage: 8GB of Seagate 2.5" drives assembled into raid0 array. ISP: 1Gbps (As screenshot shows in the beginning of the post) Network Card: Edimax 2.5Gbit pcie card.

UPDATE: So I tried to play with settings and storage location. I tried to build docker images directly on nvme storage with no improvements. I tried to adjust slice sizes from 1-128 range and even disable slicing with no improvements. I tried to create a VM on top and run caching server there with again no improvements in performance. I tried to disable apache server on server at all with no improvements. I'm completely lost there what I could do here. While downloading games directly without adding dns entry to end users it can reach speeds of 90+MB/s.

ThomasRunting commented 2 years ago

Try with adding extra IPs for the cache. Steam tends to limit its bandwidth to a single IP

j3ws3r commented 2 years ago

@ThomasRunting So I added 5 lancache ip's: image

Built a new docker containers and still experiencing same results. With multiple lancache ip's I tried also tweaking slicing settings and changing storage location between nvme and raid0 hdd array with no difference. I don't believe that my hardware is bottlenecking lancache, but still I will try to run lancache on different machine (ryzen 3600 cpu with 16gb of 3200mhz ram and pcie gen4 nvme card with appropriate slot for it and try to launch lancache on raspberry pi4 too to compare the results on all three machines). Also I will try to check if file system type affects performance. Currently running on ext4

ThomasRunting commented 2 years ago

how is your iowait when doing the inital download?

by your path in the cache_root it looks like that is on a usb drive?

also try installing netdata to see the stats easly

On mine due to having only a single wd green drive with a 128gb lvm cache my iowait went crazy high when downloading steam.

If yours does the same then that would be it unknown

j3ws3r commented 2 years ago

@ThomasRunting Checked IOWait through top. It was showing somewhere around 2-15% on TOP. Installed Netdata and checked now - On processes where I get data from cache server I get around 50% IOWait and while doing initial download I get around as I mentioned - 15%. image But I don't quiet get why inbound data goes all over the place, some times slowing down to a crawl (3mbps i.e)

Sorry about cache_root path naming, it is a bad example of how you can name your directories. It is only named "usb", but it is actually an raid0 array of hdd's capable of performing at: image

I will try to play a bit more, maybe also I will change network card to see if it helps out. Also I will try to change from Network Manager to systemd-networkd, as maybe that also has to do something with this.

ThomasRunting commented 2 years ago

also try epic and origin to see if you get the same thing.

I know when i was testing with a 1gbs link steam would vary from 400mbs to 60mps but origin and epic where usally 400mbs .

stale[bot] commented 2 years ago

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed after being inactive for 30 days. If you require further assistance please reopen the issue with more details or talk to us on discord