Any way to limit factorio's network usage?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
count_swagula
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 24, 2015 3:36 am
Contact:

Any way to limit factorio's network usage?

Post by count_swagula »

I play via hamachi with my friend and he has a relatively weak internet connection. For reaons, he has to host the game for us to play privately with just us, as when I host, he times out.

I can download the games from him just fine, but it takes a while to download as he has a slow internet connection, so uploading a 6mb map will take quite a while at 15kb/s as you may imagine.

My problem is that I have a limited data cap and whenever I download maps, factorio starts inexplicably uploading as much data as it can. My computer uploads 1mb/s of who knows what and it reaches about 300-400mb of upload just to connect once. It simply isn't feasible.

Is there any way to limit how much network usage factorio is allowed? Specifically, in the upload category? lol

FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: Any way to limit factorio's network usage?

Post by FishSandwich »

You could try removing the replay.dat from the save, that will at least lower the file size of the save.

Apart from that, there's not much else you can do.

count_swagula
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 24, 2015 3:36 am
Contact:

Re: Any way to limit factorio's network usage?

Post by count_swagula »

Dang. Thanks though. I'll try that. I figured it was worth a shot asking, like if there was some hidden config file with a network parameter or something that I was missing. Maybe in the final release there will be some sort of a network limit slider :lol:

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Any way to limit factorio's network usage?

Post by daniel34 »

count_swagula wrote:My problem is that I have a limited data cap and whenever I download maps, factorio starts inexplicably uploading as much data as it can. My computer uploads 1mb/s of who knows what and it reaches about 300-400mb of upload just to connect once. It simply isn't feasible.
If that's indeed what happens I'd consider this a serious bug. Uploading 300+mb just because you're downloading 6mb of maps is just wrong. (Where goes that data anyway?)

The only thing I can think of right now is that Factorio somehow pushes out UDP packets as fast as it can, maybe because of heartbeat/ping check or confirmation of downloaded packets.
Might also be Hamachi but afaik it just emulates a direct ethernet connection.
quick links: log file | graphical issues | wiki

Cyberdragon
Burner Inserter
Burner Inserter
Posts: 13
Joined: Tue Aug 11, 2015 9:38 pm
Contact:

Re: Any way to limit factorio's network usage?

Post by Cyberdragon »

Yes, the game just utterly spams UDP packets until it jams up itself and everything else (confirmed this with Wireshark). This is an extremely bad bug that has rendered me incapable of playing multiplayer anymore.

EDIT: The packet spam is from the client (when attempting to connect to a server, not sure about LAN games).

There are programs out there that will limit network usage for individual programs. Just search for "network limiter".

count_swagula
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 24, 2015 3:36 am
Contact:

Re: Any way to limit factorio's network usage?

Post by count_swagula »

Cyberdragon wrote:Yes, the game just utterly spams UDP packets until it jams up itself and everything else (confirmed this with Wireshark). This is an extremely bad bug that has rendered me incapable of playing multiplayer anymore.
Lol ya after reading the wikia bout Factorio's multiplayer framework I came to that conclusion too. It makes sense that the game would want to send as many UDP packets as possible considering it's not getting a response, and in theory the more people you send them to, the faster you get the map but.. I can't see how it would even be necessary to upload more than a hundred kb/s for such a small file peer to peer lol :lol:

count_swagula
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 24, 2015 3:36 am
Contact:

Re: Any way to limit factorio's network usage?

Post by count_swagula »

huh... now I'm having another weird problem. It's related, I think

So, while downloading my friend's map (it's now about 4mb, we removed the replay.dat and shaved off about 3mb. Thanks for that tip btw) we're getting super close, but the transfer fails at the very end. I'm suspecting it's Factorio and not our networks that's failing.

We hold a solid 20kb/s transfer the entire time, up until the very end of the transfer. Here, it's better explained by a graph of my network usage:
https://dl.dropboxusercontent.com/u/162 ... torio3.PNG (note that my download speed shows around 30-60kb/s, I don't know why it does that but it always shows up as double factorio's listed speed)

That picture shows both of our attempted transfers which both failed in the exact same way. As you can see, my computer pushes as much data through the network as possible trying to recieve the map from peers(him). Once the transfer reaches about 3mb, and the ETA is less than a minute or so, my game starts to become unresponsive. Not as in, the window greys out and Windows asks if I want to wait for it to respond, but as in the screen stops updating from time to time (and progressively gets worse). The download speed also drops a bit while this is happening, as well, and my upload speed slowly dwindles.

And, just incase you think this is coincidentially failing due to network reasons...
https://dl.dropboxusercontent.com/u/162 ... torio1.png
1.4 seconds remaining... and it dies.. lol. It gets about that close every time it dies :(

This is the error it gives me:
https://dl.dropboxusercontent.com/u/162 ... torio2.png

This is all on the experimental version by the way, multiplayer on previous ones isn't very latency friendly...which probably rules out me getting too much help. But I'm sure factorio doesn't have too many players with internet connections as bad as ours, so I figure it's helpful at least to someone if I put this out here while we fumble around with this.




edit: I think I'm making headway here. I noticed two things:
I can't use my internet for anything while I'm downloading the map. My network is simply all pushed towards factorio.

I also lose connection on hamachi while downloading.

My theory is that Hamachi isn't required for the map transfer. Maybe required to make the initial connection and start the map transfer, but once the map transfer is done and that hamachi peer2peer connection isn't there like it was before, it would naturally look like the other peers have left.

I'm going to try and use a network limiter(i googled it and found one that lets me limit applications) to stop factorio from using so much data that it disconnects me from hamachi. Will edit in the results just incase anyone else has this issue 8-)




update:
I downloaded a limiter from http://www.netlimiter.com/. I'm using version 4. I have it set to limit hamachi (Not factorio, because it all goes through hamachi and changing factorio's limit oddly doesn't stop hamachi from uploading like crazy anyway) to 30kb/s on the upload. I didn't touch download cause it isn't doing anything weird anyway.

We tried the transfer again. The transfer itself seemed fine. Hamachi held connection up until about 3mb. Nothing bad happened from limiting the connection, though my friends internet also started uploading a ridiculous amount of data too. Apparently he has a 270kb/s upload capability! LOL who knew. Anyway the game became unresponsive and we lost hamachi connection again. We're going to try again, but with him limiting factorio too. It might be overwhelming his connection as well.




My last edit I promise lol:
Tried a whole bunch of different limiting settings (factorio, hamachi, on both ends(me or him)) but we couldnt' get it to work. Either it would transfer extremely slow (bits per second) or it would continue with this unresponsive nonsense or some hamachi disconnection nonsense. A shame. We can play together when we first start a map, and build as much as we want and never get disconnected, but the map transfers are always the problem.

Blegh :x

Either way, I've resorted to doing things the easy way. I rented a cheap VPS(I'll probably use it for other stuff anyway), installed CentOS7, and installed factorio as a virtual server. Hey, if anything, the latency will be fixed and no need for hamachi. Faster map downloading. Super nice. Followed the guide on the wiki. If you have slow internet and want to play with your friend who has slow internet, hey, just rent a $5 server. :lol:

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Any way to limit factorio's network usage?

Post by MF- »

There are many other thread complaining about the map download DoSing their internet,
possibly also crashing ppl's routers and breaking the map joining altogether.
One of them should be linked here, buch which one is the main one?

Post Reply

Return to “Technical Help”