Slow map download on special Dev build
-
- Burner Inserter
- Posts: 5
- Joined: Tue Jul 21, 2015 3:44 pm
- Contact:
Slow map download on special Dev build
For those in the know, the youtube user Bluedrake42 just jumped on board the factorio train! Given his predisposition to multiplayer, he got an experimental developer pvp build.
His server is working fine, but when I try to connect my download rate which is normally 1.5 Mbps drops to below 1.5 kbps. My download speed is normal for all other sites, including steam downloads and speedtest.net
My system specs are as follows:
OS X El Capitan
V 10.11.3 (15D21)
MacBook Pro (15-inch, Mid 2012)
8 GB 1600 MHz DDR3
Intel HD Graphics 4000 1536 MB
His server is working fine, but when I try to connect my download rate which is normally 1.5 Mbps drops to below 1.5 kbps. My download speed is normal for all other sites, including steam downloads and speedtest.net
My system specs are as follows:
OS X El Capitan
V 10.11.3 (15D21)
MacBook Pro (15-inch, Mid 2012)
8 GB 1600 MHz DDR3
Intel HD Graphics 4000 1536 MB
Re: Slow map download on special Dev build
Beware, there are two things that have an influence on your download speed : your actual download bandwidth, and your peer's upload bandwidth .
Maybe providing logs would help to diagnose if there is a problem or not.
Maybe providing logs would help to diagnose if there is a problem or not.
Koub - Please consider English is not my native language.
Re: Slow map download on special Dev build
Been trying to troubleshoot a slow map download issue as well. Does yours start downloading fast, then slow down to a crawl?
A recent multiplayer game with a friend does this. Starts dl at >1mb, drops slowly all the way to ~35kb. It's only a 4mb map at this point.
A recent multiplayer game with a friend does this. Starts dl at >1mb, drops slowly all the way to ~35kb. It's only a 4mb map at this point.
-
- Burner Inserter
- Posts: 5
- Joined: Tue Jul 21, 2015 3:44 pm
- Contact:
Re: Slow map download on special Dev build
I tested my download speed before and after multiple attempts to join the server, and the server itself was sending the map to other people who were joining much faster than I was receiving.Koub wrote:your actual download bandwidth, and your peer's upload bandwidth .
Maybe providing logs would help to diagnose if there is a problem or not.
I believe the server is located in central/western US and I'm in eastern, but if anything that should affect the ping, not throughput of the map data.
I'll try to contact the guy running the server and get whatever logs I can, but I'm not sure how helpful he'll be. In due time then I guess!
- StoneLegion
- Filter Inserter
- Posts: 687
- Joined: Fri Sep 05, 2014 7:34 pm
- Contact:
Re: Slow map download on special Dev build
We get this from time to time too on our server. Most people have decent internet and will connect all the time and sometimes he downloads like 20 Kbps at that point he closes factorio and reopens and it's fine. Not sure why the heck it happens but it happens.
-
- Burner Inserter
- Posts: 5
- Joined: Tue Jul 21, 2015 3:44 pm
- Contact:
Re: Slow map download on special Dev build
This is happening now on other servers too, I found a guy who lives in my state who hosts a server, and it started downloading at again 1.8kb/s max. These are the the only logs he got before I gave up:Kane wrote:We get this from time to time too on our server. Most people have decent internet and will connect all the time and sometimes he downloads like 20 Kbps at that point he closes factorio and reopens and it's fine. Not sure why the heck it happens but it happens.
log file
- StoneLegion
- Filter Inserter
- Posts: 687
- Joined: Fri Sep 05, 2014 7:34 pm
- Contact:
Re: Slow map download on special Dev build
Yeah sadly there does not seem to be enough debugging in that area to figure it out. There is for sure a bug the happens but still the system is chaotic anyways. They should consider transferring the map another way and I feel like I had read they were looking into it but not sure.
Re: Slow map download on special Dev build
Yep getting this too. Usually 10 to 20 kB/s download, can take 3 minutes to download a 3 or 4Mb map! Sometimes it gets halfway and suddenly jumps speed up to 3MB/sec and finishes in seconds. Really wacky!
-
- Burner Inserter
- Posts: 5
- Joined: Tue Jul 21, 2015 3:44 pm
- Contact:
Re: Slow map download on special Dev build
Do you know of any servers I could test that on? If it picks up eventually then maybe everyone wont completely hate me haha.Durandle wrote:Sometimes it gets halfway and suddenly jumps speed up to 3MB/sec and finishes in seconds. Really wacky!
At this point I just listen and play singleplayer
Re: Slow map download on special Dev build
To be honest, I believe the devs are mistaken to have the map transfer over UDP and not TCP. For gameplay UDP has it's merits (mostly lower overhead and more control over session managing), but map transfer should just be fast and reliable, and quick relay of single messages should not be a priority.
TCP has a lot of mechanisms for speed and bandwidth coordination, and OS have been implementing it for over 20 years, and some network adapters even implement it themselves, so it's probably safe to assume it's pretty well optimized. In UDP on the other hand the developer has to control the speed himself (AFAIK, if that's not the case - please correct me!), which can lead to problems if you have a high bandwidth connection, but high latency, or intermittent errors - in such cases TCP would probably resume it's original speed pretty fast (adjusting it's window size), but UDP is more implementation specific.
Of course, it's impossible to tell what the problem is without studying the cases and the code, but I personally can't see a reason why map transfer shouldn't be done in TCP, or heck - even with an ad-hoc bit-torrent service (bit-torrent is a very light-weight protocol, and it's specifically designed for transferring a file between multiple peers).
All that being said, I have confidence in the Factorio dev team to come up with a solution which suits them best.
TCP has a lot of mechanisms for speed and bandwidth coordination, and OS have been implementing it for over 20 years, and some network adapters even implement it themselves, so it's probably safe to assume it's pretty well optimized. In UDP on the other hand the developer has to control the speed himself (AFAIK, if that's not the case - please correct me!), which can lead to problems if you have a high bandwidth connection, but high latency, or intermittent errors - in such cases TCP would probably resume it's original speed pretty fast (adjusting it's window size), but UDP is more implementation specific.
Of course, it's impossible to tell what the problem is without studying the cases and the code, but I personally can't see a reason why map transfer shouldn't be done in TCP, or heck - even with an ad-hoc bit-torrent service (bit-torrent is a very light-weight protocol, and it's specifically designed for transferring a file between multiple peers).
All that being said, I have confidence in the Factorio dev team to come up with a solution which suits them best.
- StoneLegion
- Filter Inserter
- Posts: 687
- Joined: Fri Sep 05, 2014 7:34 pm
- Contact:
Re: Slow map download on special Dev build
Suits us best We are all in it together But yeah I'm sure they will solve it one way or another.sillyfly wrote:To be honest, I believe the devs are mistaken to have the map transfer over UDP and not TCP. For gameplay UDP has it's merits (mostly lower overhead and more control over session managing), but map transfer should just be fast and reliable, and quick relay of single messages should not be a priority.
TCP has a lot of mechanisms for speed and bandwidth coordination, and OS have been implementing it for over 20 years, and some network adapters even implement it themselves, so it's probably safe to assume it's pretty well optimized. In UDP on the other hand the developer has to control the speed himself (AFAIK, if that's not the case - please correct me!), which can lead to problems if you have a high bandwidth connection, but high latency, or intermittent errors - in such cases TCP would probably resume it's original speed pretty fast (adjusting it's window size), but UDP is more implementation specific.
Of course, it's impossible to tell what the problem is without studying the cases and the code, but I personally can't see a reason why map transfer shouldn't be done in TCP, or heck - even with an ad-hoc bit-torrent service (bit-torrent is a very light-weight protocol, and it's specifically designed for transferring a file between multiple peers).
All that being said, I have confidence in the Factorio dev team to come up with a solution which suits them best.
Re: Slow map download on special Dev build
It would be a great help if we could get them something reproducible. The hit and miss nature drives me crazy, and would be near impossible to debug.
The connection itself doesn't seem to make a difference. Last night I played with a coworker. He was hosting on his laptop (in a vm!), playing on his laptop, using wifi. I was also playing using my laptop on wifi.
So host+player->wifi->internet->wifi->player2 and it ran just fine. No real problems. Map downloaded at ~750kb.
Couple nights before, same guy with the same map. Both of us on wired connections. Had trouble downloading, dropped off to ~30kb.
No rhyme or reason...
The connection itself doesn't seem to make a difference. Last night I played with a coworker. He was hosting on his laptop (in a vm!), playing on his laptop, using wifi. I was also playing using my laptop on wifi.
So host+player->wifi->internet->wifi->player2 and it ran just fine. No real problems. Map downloaded at ~750kb.
Couple nights before, same guy with the same map. Both of us on wired connections. Had trouble downloading, dropped off to ~30kb.
No rhyme or reason...
Re: Slow map download on special Dev build
Here is a comparison of 4 open source file transfer libraries designed specifically for high speed data transfer over the internet, 3 using UDP and 1 using TCP.
http://filecatalyst.com/open-source-fas ... transfers/
Perhaps the best choice is to use an existing well tested technology for this that has a license compatible with use in a commercial product like Factorio?
http://filecatalyst.com/open-source-fas ... transfers/
Perhaps the best choice is to use an existing well tested technology for this that has a license compatible with use in a commercial product like Factorio?
Re: Slow map download on special Dev build
That's an interesting read (haven't read it all yet, but I'm planning to), but at first glance it looks like they are all intended to be used in a LAN:
Edit: here is a more in-depth study. Actually, UDT seems very promising. Seems like UDT implements a lot of congestion control itself, but in more modern approach than TCP.
These are exactly the problems I suspect Factorio map transfer is having, and exactly the problems TCP congestion/rate control algorithms were planned to solve.None of these solution fare well in the worst network conditions, where packet loss, bandwidth or latency are very high. Finally the congestion control in the UDP projects is missing the flexibility to adapt to ever changing network conditions during the data transfer.
Edit: here is a more in-depth study. Actually, UDT seems very promising. Seems like UDT implements a lot of congestion control itself, but in more modern approach than TCP.
Re: Slow map download on special Dev build
I run a dedicated server. My friends all have a very low response time to the server and get very fast download speeds of the map (a second or two for a 4Mb map). I however live a long way from the server and have a very high ping, about 250ms, but easily enough bandwidth. My download speed *from the server* is usually around 10Kb/sec, sometimes 20Kb/sec on a good day. A speed test shows I have around 3Mb to 10Mb of bandwidth (bad vs good day). My conclusion was the server waits for confirmation from the client before sending the next data batch, meaning a high latency will adversely effect transfer speed.
EDIT: And yes, I tested against my private server and get maximum speeds to/from the server.
EDIT: And yes, I tested against my private server and get maximum speeds to/from the server.
Last edited by Durandle on Thu Mar 03, 2016 11:31 am, edited 1 time in total.
Re: Slow map download on special Dev build
That sounds like the window (or similar mechanism) implementation of the Factorio network protocol isn't very well optimized. This could also explain why in some cases Factorio floods your NIC with more messages than it can handle.
-
- Burner Inserter
- Posts: 5
- Joined: Tue Jul 21, 2015 3:44 pm
- Contact:
Re: Slow map download on special Dev build
I just installed windows on my mac, installed the service pack 1, updated all my drivers, and still consistently only get 5kb/s download, it actually looks more like my upload speed is throttling it. I was able to play factorio mp back in .11, which makes it even more upsettingstarholme wrote:It would be a great help if we could get them something reproducible. The hit and miss nature drives me crazy, and would be near impossible to debug.
The connection itself doesn't seem to make a difference. Last night I played with a coworker. He was hosting on his laptop (in a vm!), playing on his laptop, using wifi. I was also playing using my laptop on wifi.
So host+player->wifi->internet->wifi->player2 and it ran just fine. No real problems. Map downloaded at ~750kb.
Couple nights before, same guy with the same map. Both of us on wired connections. Had trouble downloading, dropped off to ~30kb.
No rhyme or reason...
Re: Slow map download on special Dev build
Here is a similar discussion on StackExchange's gamedev site: http://gamedev.stackexchange.com/questi ... games-2016
This especially is interesting:
This especially is interesting:
AFAIK this precisely describes Factorio's network model.Peter wrote: If you have data where every packet must arrive, and the packets must be processed by your game in the order they were sent, then UDP will not be faster. In fact using UDP in this case would likely be slower because you're reconstruction TCP and implementing it by means of UDP.