Which are the optimized TCP/IP settings for online racing ?

Discussion in 'Hosting Help' started by GauchoRS, Aug 22, 2012.

  1. GauchoRS

    GauchoRS Registered

    Joined:
    Nov 23, 2011
    Messages:
    471
    Likes Received:
    8
    As some other users reporting here, most of the time I have very high pings and disconnects from servers. After a disconnect it is quiete impossivel to join any other server.
    Ok my DSL connection is not the best (only 600 download / 160 upload), living in the south of Brazil, but with rFactor1 I still can have online races with servers in USA, Europe esp. Germany all around the clock.

    So, there must be something different in netcode of rFactor2, which is invoking this phenomen, I think.

    In order to get help I found this very interesting site with lots of tweaks for Windows7. I am using W7 64bit Ultimate.
    http://www.speedguide.net/articles/windows-7-vista-2008-tweaks-2574

    I would like to have a list from the responsable developer of ISI, which of these parameters are mandatory/recommended for a good online racing experience with rFactor2. May be, there are other important parameters to mentioned?

    Thanks in advance!
     
  2. dandar

    dandar Registered

    Joined:
    Aug 12, 2012
    Messages:
    274
    Likes Received:
    15
    I’m not a developer of ISI but I’m a responsible developer for an ISP company :D
    Sorry to say, but there is no “Internet Optimization Guide for rFactor”, there are too many variables to contemplate for making such guide. But I can give you a few tips for you to check.

    Your connection is not a DSL it’s ADSL for Asymmetric, you get a different upload/download ratio. Such technology uses PPPoA or PPPoE as a layer to transport the TCP/IP. The use of an extra layer generates an overhead not seen in Cable/Fiber connections, so in your case of the most important value to check is the MTU (Maximum Transfer Unit). There are many tools to help you find the optimal value for you. For me, a few years ago the optimal MTU was 1428 (1500 max) using ADSL, but that changes depending on your ISP.

    Another important thing is some ADSL providers allow tunneling compression over the connection, if this is your case I would suggest that you disable such compression in your modem/router and/or OS configuration to play online. It’s true that compression gives you an extra bandwidth, but the inflation/deflation of packets over the network uses more “CPU” resources from your inet device and also from the provider resulting in an extra lag.

    The ISPs services (almost the one you can afford to pay) are simple carriers, they send your packets to some important internet node called backbone. Check (traceroute) or call your ISP to know which backbones they use so u can know in advance witch servers around the world would be better for you to play (less lag).

    Don’t believe to some guides that tells you … Windows reserves a 20% of bandwith for blablabla … because that feature works over TCP connections that could be throttled or assigned priority’s layers (like for VoIP apps). Playing on rFactor means using UDP datagrams, and those can’t be throttled, well almost they were designed to NOT be throttled.

    I would not recommend to play with other parameters that affects the IP/TCP Stack, you must have a deep knowledge before changing such critical values, and if u do, make sure to backup your original settings.

    Disable or pause all background services that uses the net, like Windows Update, and close all apps before login into a server.
    Check your telephone line quality, shut down your router, pick your phone press only one number (like you would do to call somebody) and listen if there are some noise in the background. If your phone is dead silent is a good signal, but if u ear some pink/white noise (or some radio station in worst case scenario) change you filters and call your telephone company. Also check the noise with and without your router being connected to the line.

    Finally … if u are connected to a server with a ping higher than 150, please be kind and disconnect your box and close that session. Only it’s necessary to have ONE player with a high ping to make a lag catastrophe over a server.

    And when you can, send to me some good looking "garotas", i like the ones from Sao Paulo ;)
     
    2 people like this.
  3. Max Angelo

    Max Angelo Registered

    Joined:
    Oct 5, 2010
    Messages:
    4,958
    Likes Received:
    10
    Build 101 has some issues in online mode.

    Waiting for the fixes, the workaround is to set the multiplayer.ini line

    Net Connection Type="3" // 0=28k, 1=56k, 2=ISDN, 3=128kbps cable/dsl 4=256kbps cable/dsl, 5=LAN, 6=custom

    to "4" or to "3" (default value is "2").

    Assuming your conn is ok (ie your online experience was good in the previous builds), the above editing might help.

    About the connection failed issue,

    again it is a issue introduced in build 101.

    The workaround (it works in my system, non sure it works in every machine) is to leave the game and relaunch it.
     
  4. GauchoRS

    GauchoRS Registered

    Joined:
    Nov 23, 2011
    Messages:
    471
    Likes Received:
    8
    @Max: Thank You for confirming the issue the build 101

    @dandar: really informative your post! I checked my phone line and from time to time I HAVE issues with white noise. I will send you an PM :cool:
     
  5. MJP

    MJP Registered

    Joined:
    Oct 5, 2010
    Messages:
    988
    Likes Received:
    20
    Re. the 'failed connection' issue after a disconnect, one thing I find quite often works is clicking on 'Manage Mods' at the bottom of the racelist and (re)selecting the mod of the server you're trying to join, hit the 'Accept' button then try to rejoin the server in the racelist.

    Regarding the 'multiplayer.ini' below are the default settings :-
    Code:
    Net Connection Type="2" // 0=28k, 1=56k, 2=ISDN, 3=128kbps cable/dsl 4=256kbps cable/dsl, 5=LAN, 6=custom
    Upstream Rated KBPS="64" // Rated uploading speed of connection, in kilobits per second
    Downstream Rated KBPS="64" // Rated downloading speed of connection, in kilobits per second
    The Net Connection Type= setting changes in response to what 'Connection Type' you choose when you run the 'rfactor2 Dedicated.exe' (or host from launcher). They're sort of presets, the upload and download rate is the same.

    choose '56K Modem' and Net Connection Type= changes to 1 and the 2 lines below it will change to "56",
    choose 'ISDN' and Net Connection Type= changes to 2 and the 2 lines below it will change to "64",
    choose '128kbps cable/dsl' and Net Connection Type= changes to 3 and the 2 lines below it will change to "128" and so on.

    If you choose 'Custom' you'll notice you can set the up and download rates separately.

    If however you're going to directly edit the 'multiplayer.ini' then just changing the Net Connection Type= won't do anything, it's the 2 lines below it that are important. In my own testing I'd say it's the 3rd line Downstream Rated KBPS= that is most important. The default setting of "64" seems to be ok up to about 15 cars, I've run with "128" and that's been ok (so far) for up to 28 cars which is the most I've been on a server.

    "192" or "256" should be more than enough although I haven't yet been on a 30+ car server yet to test it properly. I should point out this is what is working for me so far and it may be different for you.

    Currently I'm leaving the 2nd line Upstream Rated KBPS= at the default "64" and it seems ok.

    I've noticed some people on the servers saying something like 'I've got a 1meg up and 8 meg down connection can I put that in the multiplayer.ini?' Well yes you can, but obviously the bigger the numbers the more bandwidth you'll use.

    I should also point out editing the 'multiplayer.ini' is primarily for trying to fix the lag problem that B101 has with ~15+ cars when using the default settings. If you've just got a bad connection (high pings etc.) whether it's due to ISP congestion or someone else in your house using the connection or whatever, then editing the 'multiplayer.ini' probably won't help you.
     
  6. GauchoRS

    GauchoRS Registered

    Joined:
    Nov 23, 2011
    Messages:
    471
    Likes Received:
    8
    I had set the values in multiplayer.ini to the maximum of my connection (upload=160/download=600). But it turns out, the upload=64 and download=128 results in much lower pings (about 250 from Brasil to a German server and back).

    Strange for me, but I am happy now ;)
     
  7. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    It seems to be that many online gamers/admins don't know or forget that the internet is based on Ethernet (CSMA/CD = Carrier Sense Multiple Access with Collision Detection). Not going to deep into details an Ethernet network claims to be utilized a 100% at a permanent utilization level of 75% because of all that CSMA/CD. Or look at it as a point of view of an interstate ... a 100% utilization of an interstate = traffic jam (both directions) = everything is blocked = nothing goes anymore!

    One major configuration parameter within the multiplayer.ini to help avoiding such an Ethernet traffic jam for your rFactor dedicated server is:

    Max Data Per Client="64" // if desired, a per-client upload limit (in kbps) will be used if lower than the computed throttle rate ...

    ... unless one of the ISI guys stating the fact, that this parameter is not in use and therefore totally useless !?!?

    But let's imagine that thingy works as it suppose to work:

    What do it need to know to make this configuration work:

    - The guaranteed upload rate of your dedicated server at the provider's data center to the INTERNET (not to the backbone).
    - The max. number of drivers I would like to grant concurrent access to the rFactor dedicated server.

    AGAIN: Always keep in mind that 75 is a "magic" common threshold for almost everything in IT before it becomes "fully loaded" ...

    Taking it a little bit to the max I am using the following scenario: Endurance Race with 40 Teams and driver swap:

    - Guaranteed upload rate: 100 mbit/s
    - Max. number of drivers: 40 (drivers) + 40 (spectators) + 5 (aux. slots for marshal, stream, etc.) = 85 concurrent connections

    With a value of 64 (kbps) for Max Data Per Client the settings for upload/download rates are as follows:

    upload/download = 64 kbps * 85 = 5440 kbps

    Because of 75 we add an additional safety to the upload/download rate of 25%:

    True upload/download setting for the rFactor dedicated server = 5440 kbps * 1.25 = 6800 kbps

    Possible configuration for this scenario:

    Code:
    [ Multiplayer General Options ]
    Net Connection Type="6" // 0=28k, 1=56k, 2=ISDN, 3=128kbps cable/dsl 4=256kbps cable/dsl, 5=LAN, 6=custom
    Upstream Rated KBPS="6800" // Rated uploading speed of connection, in kilobits per second
    Downstream Rated KBPS="6800" // Rated downloading speed of connection, in kilobits per second
    ...
    
    [ Multiplayer Server Options ]
    ...
    Max Data Per Client="64" // if desired, a per-client upload limit (in kbps) will be used if lower than the computed throttle rate
    ...
    Corrections explicitly encouraged!

    Hope this helps some people optimizing their environment for running their servers/leagues ... !?!?

    Cheers
    Frank

    PS: In general it is more than sufficient for a client to leave the default setting on 64/64 (isdn) ...
     

Share This Page