The online racing simulator
Test Patch D4 (now D48)
(704 posts, closed, started )
Quote from Gabey1 :Hello, my suggestion is to add a Check Engine light as an option in s_clock editor, to add to the existing dashboard lights, like ABS light, TC light etc etc. It would be triggered as soon as engine damage occurs. Please let me know what you think

You will need it for your Audi. Normal light on dash Omg omg omg Na-na Did I Say That? Heart Big grin
I do been seeming to face a problem after downloading the patches, My mod loading time is too slow and it times out so often.. And it happens in singleplayer too! and got to try 3 times to join a server minimum. This have never happened to me before, another player also seems to be facing this issue.
Quote from r3zp3k7 :All conditions were met. The pit stop was finished and the 0.7D6 user was spectating. The same was in reverse. Hard to tell how it happened though, because after the 0.7D6 user re-entered LFS.exe the bug was not found anymore. Anyway, if we find it again, I'll let you know. Tire physics is way more important for everyone, so please proceed in peace.

I've tested this now with a D and D9 version connected (to a D host). I did not encounter a problem taking over car, from D to D9 or from D9 to D. As nothing changed in that area, I will assume this is not related to the test patch and is extremely rare or related to conditions we don't know.

Quote from Tuttu The Dog :I do been seeming to face a problem after downloading the patches, My mod loading time is too slow and it times out so often.. And it happens in singleplayer too! and got to try 3 times to join a server minimum. This have never happened to me before, another player also seems to be facing this issue.

It is unlikely to be test patch related as nothing has changed with the download code. It's probably something on the internet at your end, our end or somewhere in the middle. Have you tried using a D (or other) backup exe to verify that the slow download does not occur with D?
Quote from Tuttu The Dog :I do been seeming to face a problem after downloading the patches, My mod loading time is too slow and it times out so often.. And it happens in singleplayer too! and got to try 3 times to join a server minimum. This have never happened to me before, another player also seems to be facing this issue.

I've had this forever, even before the patches. Downloading mods or skins takes ages and seems to be max out at 200KB/s (usually hovers around 50-150). I'll often get timeouts just loading the mod browser or joining servers. This is on a gigabit connection too.

Yes, this is a recurring problem for people who are far away from Rotterdam. It's very strange because we have really fast / powerful / updated web servers. I've checked the code again and again. The LFS downloader works really fast if you are in this part of the world. I understand that downloading from distant locations should be slower because of the delay / ping but this issue seems way too bad to be explained by that. For now, I'm stumped.
Fair enough, at least you're aware of it Smile Hopefully one day it can be solved.
In case any TCP gurus are reading, I have only set one socket option on the HTTP receive socket. The rest I have left at default.

The one option I have set is SO_RCVBUF:

int rx_size = 65536; // rx buffer size 64K (default is 8K)
setsockopt(SkinSocket, SOL_SOCKET, SO_RCVBUF, (const char *)&rx_size, sizeof(int));

I'm not certain where I have got the information that default is 8K. However, if I do query that value without setting it, I do get the answer 8K. Various posts I have read in the past suggest a buffer size of 64K is good so that's why I have set it.

This is contradicted by one post I found on Microsoft's site:
https://techcommunity.microsoft.com/t5/networking-blog/windows-network-performance-suffering-from-bad-buffering/ba-p/339668

But I'm struggling to find more info about it. I guess I could do a simple test of simply not setting that value, and we can check if your skin and mod downloads get faster or slower?

P.S. I've moved some off-topic posts. This thread is about the test patch.
Test Patch D10

I've added an experimental option in Misc Options. Based purely on the suggestion in that link above, it seems worth a go. Let's see if it makes mod downloads any faster or slower for people who are far from Rotterdam and experience slow mod downloads.

Options... Misc... HTTP buffer test [EXPERIMENTAL]

https://www.lfs.net/forum/thread/102117
Quote from Scawen :Test Patch D10

I've added an experimental option in Misc Options. Based purely on the suggestion in that link above, it seems worth a go. Let's see if it makes mod downloads any faster or slower for people who are far from Rotterdam and experience slow mod downloads.

Options... Misc... HTTP buffer test [EXPERIMENTAL]

https://www.lfs.net/forum/thread/102117

Sadly not Frown https://i.imgur.com/rGOROl0.png

Quote from Scawen :Maximum speed for each gear is now available in Editor Test Patch D8: https://www.lfs.net/forum/thread/102626

Amazing, thank you!
If the skins and mods are delivered over HTTP, putting the assets in front of a CDN like Cloudflair should result in a significant increase in performance as the Cloudflair servers are distributed around the world. You should also see decreased load on the web server delivering the content.

https://www.cloudflare.com/cdn/

(I do not work for Cloudflare, and I don't use any of their products. This advice comes from seeing the results of other people using the service on their own site that is getting DDoS and Cludflare handling it. Even the free tier should be good enough @Victor.)
Quote from Dygear :If the skins and mods are delivered over HTTP, putting the assets in front of a CDN like Cloudflair should result in a significant increase in performance as the Cloudflair servers are distributed around the world. You should also see decreased load on the web server delivering the content.

https://www.cloudflare.com/cdn/

(I do not work for Cloudflare, and I don't use any of their products. This advice comes from seeing the results of other people using the service on their own site that is getting DDoS and Cludflare handling it. Even the free tier should be good enough @Victor.)

LFS Currently uses I3D
Quote from Dygear :If the skins and mods are delivered over HTTP, putting the assets in front of a CDN like Cloudflair should result in a significant increase in performance as the Cloudflair servers are distributed around the world. You should also see decreased load on the web server delivering the content.
...

Judging by Scawen's earlier post regarding the TCP socket, I would assume that he's using his own HTTP client, which probably doesn't even support https or newer thing like http/2 or ipv6 (Correct me if I'm wrong!) and likely has other disadvantages over de-facto standard libraries, like libcurl. So this could rule out use of CDNs and might also be the general cause for those performance issues.

But, this is just a guess.
True, LFS uses a simple http receive. It constantly calls recv every time there is something to receive, which I supposed should be enough. It also supports resume after lost connection, etc.

I'm not sure but think cloudflare requires https connection which isn't really easy to implement, especially in old LFS (the current public one) which uses an old compiler.

But simple http(s) connections direct to our site work fine, don't they? What about viewing attachments on the forum. Does an image take minutes to appear if you are in Australia? I assume not, and that's not currently going through cloudflare or using i3d's content delivery network (that is used for big downloads or patches).

So what I'd like to understand is, for people in China / Australia / India, why does it take several minutes to download a mod that takes 2 seconds if you are in Western Europe? But doesn't take ages to view a forum attachment?

I can't see how my code can be wrong if all it does is call recv when there is data to receive. It uses an adequate size buffer of 65536 bytes which should be fine.
Quote from Scawen :What about viewing attachments on the forum. Does an image take minutes to appear if you are in Australia?

Often yes, attachments on the forum can be as slow to download as content in-game. Although I never really thought of it being the same issue before. Not a minute to download an image, but a lot longer compared to other websites.
A small issue I encountered : when running AI with mods on a new layout, everything computed and some lines are appearing on screen during the generation up to give a popup indicating that the path for AI has been built.
Then, if you 'cancel' the race instead of pressing 'start', the lines remain displayed on the menu => an auto clear would be welcome
Attached images
lfs_00000123.jpg
Not on this socket. I do use TCP_NODELAY for multiplayer packets, where we send small packets and want them to go immediately (not waiting for more data before sending a small packet). But my understanding is that would have no beneficial effect when we are receiving a substantial amount of data.
I spend serious time today fiddling around with TcpAckFrequency and other TCP parameters in W10 but it seems to be stuck .. Which annoys me, primarily because every change needs a complete system restart (ppff).

Couldn't improve in-game patch 6R to 7D (35 Mb) download speed from Perth, Australia by using my paid VPN provider. It stayed around 1-2 Mbit download speed, noticeable far slower compared to a more "local" connection.

Going to try it with a Linux client although I am not sure if Wine actually uses the Linux kernel/TCP settings or does some Winsock emulation on top of it.

Otherwise need to fall back to some Win7 install or something, sigh. With this kind of operating system bugs I wonder how much influence third party programs can have on the whole situation.
Thanks for having a go!

I understand there is a maximum throughput, determined by the window size and the delay.
https://en.wikipedia.org/wiki/Measuring_network_throughput

I would expect that to make direct downloads a lot slower in far away lands, but I think I recall that these mod downloads were far slower than that. As in, not just slow but painfully slow and even with timeouts. Uhmm
A bit late, but decided to try D10 today. Cars and skins download faster with the HTTP buffer option enabled.
Quote from Ibtasim6781 :A bit late, but decided to try D10 today. Cars and skins download faster with the HTTP buffer option enabled.

Thank you for the test from Argentina. Smile

I wonder how sure are you about that? Is it measurable? It would be interesting if you could do a direct comparison, if you don't mind.

For example, a possible test you could run:
- download a mod with test option disabled, see how long it takes (preferably using a stopwatch)
- delete the mod from your mods\vehicles folder
- download the same mod again with the option enabled

That would be useful information, to avoid the results being affected by other internet fluctuations.

BeNoM reported no apparent difference before, from Australia:
https://www.lfs.net/forum/post/2035622#post2035622
Quote from Scawen :Thank you for the test from Argentina. Smile

I wonder how sure are you about that? Is it measurable? It would be interesting if you could do a direct comparison, if you don't mind.

For example, a possible test you could run:
- download a mod with test option disabled, see how long it takes (preferably using a stopwatch)
- delete the mod from your mods\vehicles folder
- download the same mod again with the option enabled

That would be useful information, to avoid the results being affected by other internet fluctuations.

BeNoM reported no apparent difference before, from Australia:
https://www.lfs.net/forum/post/2035622#post2035622

Well damn. I have bad news

I replicated the test I did earlier today (with the same steps like you mentioned) just now and it made no difference at all. Weird since in that first test it did download faster (nothing else was using internet, both in my pc nor cellphones).
A false positive for now :/ . But I will do a test again tomorrow at the same hour and see if it changes, just to be sure.
The speeds are low from Bulgaria too. 10-15 seconds per mod. No difference if HTTP buffer option is enabled or not.
OK, thanks for the tests! Smile
This thread is closed

Test Patch D4 (now D48)
(704 posts, closed, started )
FGED GREDG RDFGDR GSFDG