• Announcements

    • IMPORTANT - REACH US IN THE NEW FORUM   05/04/2017

      Ladies and gentlemen ATTENTION please:
      It's time to move into a new house!
        As previously announced, from now on IT WON'T BE POSSIBLE TO CREATE THREADS OR REPLY in the old forums. From now on the old forums will be readable only. If you need to move/copy/migrate any post/material from here, feel free to contact the staff in the new home. We’ll be waiting for you in the NEW Forums!

      https://community.blackdesertonline.com/index.php

      *New features and amazing tools are waiting for you, even more is yet to come in the future.. just like world exploration in BDO leads to new possibilities.
      So don't be afraid about changes, click the link above and follow us!
      Enjoy and see you on the other side!  
    • WICHTIG: Das Forum ist umgezogen!   05/04/2017

      Damen und Herren, wir bitten um Eure Aufmerksamkeit, es ist an der Zeit umzuziehen!
        Wie wir bereits angekündigt hatten, ist es ab sofort nicht mehr möglich, neue Diskussionen in diesem Forum zu starten. Um Euch Zeit zu geben, laufende Diskussionen abzuschließen, könnt Ihr noch für zwei Wochen in offenen Diskussionen antworten. Danach geht dieses Forum hier in den Ruhestand und das NEUE FORUM übernimmt vollständig.
      Das Forum hier bleibt allerdings erhalten und lesbar.   Neue und verbesserte Funktionen warten auf Euch im neuen Forum und wir arbeiten bereits an weiteren Erweiterungen.
      Wir sehen uns auf der anderen Seite!

      https://community.blackdesertonline.com/index.php Update:
      Wie angekündigt könen ab sofort in diesem Forum auch keine neuen Beiträge mehr veröffentlicht werden.
    • IMPORTANT: Le nouveau forum   05/04/2017

      Aventurières, aventuriers, votre attention s'il vous plaît, il est grand temps de déménager!
      Comme nous vous l'avons déjà annoncé précédemment, il n'est désormais plus possible de créer de nouveau sujet ni de répondre aux anciens sur ce bon vieux forum.
      Venez visiter le nouveau forum!
      https://community.blackdesertonline.com
      De nouvelles fonctionnalités ainsi que de nouveaux outils vous attendent dès à présent et d'autres arriveront prochainement! N'ayez pas peur du changement et rejoignez-nous! Amusez-vous bien et a bientôt dans notre nouveau chez nous

lag How to reduce network lag in BDO? (dysnc delays etc) Here's the best answer.


26 posts in this topic

Posted (edited)

There are several ways to decrease your lag, and stabilize your ping in black desert that I have found through testing. I've been keeping most of these secret to myself, but have decided to share them with you, and hope these stay between only those I share it with. Thank-you.

Some of these changes you might see around the web but many are custom to Black Desert and specialized to it's connection and the way it sends and receives packets.

Before going further I have to put in this disclaimer. 
This is advanced computer work that is messing around with the core of how your computer operates. I take no responsibility if you mess up and brick your windows install or any problems that occur because of anything you do.
Now that that's out of the way, we shall precede. Thank-you.

First step is to Disable Nagles Algorithm, this will allow your computer to send packets to the server without having to completely fill your MTU allowing faster transmission and receive of data.

For all of the following fixes you will need to open the regestry editor. Open Run (Windows key + R) and type RegEdit and hit enter.

Disable Nagles Algorithm

Go to the following path in the folders you see on the left. 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces{NIC-id}
the "NIC-id" section will be one of the folders that seem to be random digits. Click on each one of them till you find your IP address, only one should have it listed.
If you don't know how to find your IP open run and type CMD.
Once the command windows opens you will want to type in ipconfig and hit enter. Your IP address will be listed in the data displayed.
Once you find which NIC-id is the correct one for you, right click in the right hand pane amongst the "Files" and click Create New DWORD value. 
Name this DWORD value TcpAckFrequency. (this and all of the values are case sensitive.)
Double click on the new DWORD you made and set it's value to 1.
(DWORD value, 1=disable, 2=default, 2-n=send ACKs if outstanding ACKs before timed interval. Setting not present by default).
For gaming performance it is recommended you disable it by setting the value to  1. For pure throughput and data streaming, you can experiment with values over 2. 
Please keep in mind, if you try larger values, just make sure TcpAckFrequency*MTU is less than RWIN, since the sender may stop sending data if RWIN fills without an acknowledgement.

That's the first part Nagles Algorithm out of the way. Time for step 2.

Next find the following key in the "folders" on the left. (If you can't find it, create the key yourself):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters
In this key (the folder) create a new DWORD Value as follows.
TCPNoDelay with a value of 1 (DWORD value, 0 to enable Nagle's algorithm, 1 to disable, not present by default)
This is another value which removes Nagle's Algorithm.

Step number 3, reclaiming 20% of your bandwidth.

Locate the following key
“HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows”. 
In the left pane, right-click on Windows and create a new key called “Psched“.
After this you need to right click on the blank white part in the right pane and create a new “DWORD”.
This one will be named “NonBestEffortLimit” 
The value for this one will be zero to disable the reserve bandwidth.


Step 4, adjusting your buffers.

Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters in the "folders" in the left pane.
Once you locate this key, you will be editing (adding them if they don't exist, they SHOULD exist though...) the following values.
LargeBufferSize, Value = 81920
MediumBufferSize = 40960
SmallBufferSize = 20480
What we are doing is attempting to reduce Flow control. Flow Control can result in additional network latency as a result of data transfer interruptions. rating conditions. 
Under general operations you would want smaller buffersizes as to attempt to decrease the increase in paging; but with a game of this caliber you want to  increase the buffer size as the make sure you are not falling into Flow Control.

Step 5 Transmit windows and I/O alterations.

TransmitWorker = 32
MaxFastTransmit = 64
MaxFastCopyTransmit = 128
DefaultReceiveWindow = 204800
DefaultSendWindow = 61440
What these settings are doing is altering windows sizes to help stabilize ping and and help the fast I/O by settings a buffer size for smaller data to be used as a copy instead of reprocessing the same data again.
The next DWORD we are adding is a protective measure against Socket Hijacking.
DisableAddressSharing=1
The next DWORD will be disabling Priority Boost.
Where as this SOUNDS like an awesome feature, it's generally recommened to be turned off. This allows windows to pick what IT thinks is a priority for network and processor use. Rather than just using the standard order.
PriorityBoost = 0
The next DWORD we are adding will be StandardAddressLength. This is the length of the standard address the machine uses for TDI.
By increases this value we will get a slight increase in performance as it seems BDO's transport protocol uses slightly longer strings.
We will be settings StandardAddressLength=1024
The next DWORD we will be changing is transmitIoLength. This may have several different default values, but it's usually the PAGE_SIZE value, or PAGE_SIZE*2.
This is the default size for I/O used by Transmit(File)
We will be changing this to transmitIoLength = 4294967295
After all those changes we move onto step 6
Next you will want to navigate to the following key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Here we will be making changes to Transmission Control Protocol in order to help decrease ping and stabilize or reduce latency.
The first DWORD we will be adding is TcpTimedWaitDelay
What this DWORD does is it tells the computer how long it needs to wait before it frees up the TCP to use it's resources elsewhere.
TcpTimedWaitDelay = 30 is the value we will be using.
The next DWORD we will be adding is TcpMaxSendFree.
This sets the TCP Header Resource limit.
The default value for this is 5000, but increasing it can help throughput and even help stability during a DOS attack
We will be setting TcpMaxSendFree = 65535
ForwardBufferMemory  is the next TCP parameter we will be altering.
ForwardBufferMemory  determines the space that is set aside to store packets.
If the buffer fills the NiC or router will discard packets at random
ForwardBufferMemory = 512000 
MaxForwardBufferMemory = 20971520

The final change will be for MaxConnectionsPerServer ...which should be pretty self explainitory.

Find HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
MaxConnectionsPerServer = 16
MaxConnectionsPer1_0Server = 12

After you're all done, it's time to reboot and enjoy a less laggy, and desyncy Black Desert.

Edited by Kanerex
2 people like this

Share this post


Link to post
Share on other sites

Posted

 

There are several ways to decrease your lag, and stabilize your ping in black desert that I have found through testing. I've been keeping most of these secret to myself, but have decided to share them with you, and hope these stay between only those I share it with. Thank-you.

Before going further I have to put in this disclaimer. 
This is advanced computer work that is messing around with the core of how your computer operates. I take no responsibility if you mess up and brick your windows install or any problems that occur because of anything you do.
Now that that's out of the way, we shall precede. Thank-you.

sounds fishy, thnx for your efforts but this block if text is like .

Share this post


Link to post
Share on other sites

Posted

I just set my texture to medium and high... then I lose lag... forever, even in boss fights

Share this post


Link to post
Share on other sites

Posted

I just set my texture to medium and high... then I lose lag... forever, even in boss fights

Network lag...

 

sounds fishy, thnx for your efforts but this block if text is like .

Anytime Regedit is involved, you'll see a similar disclaimer. Messing up anything in the registry can brick you're windows install, and whatnot. Hence the disclaimer. If you don't follow the instructions word for word letter for letter, capitol for capitol, it's not my problem to fix.

Share this post


Link to post
Share on other sites

Posted

I pass, thanks anyway. 

Messing around with the registry is not something you want to do, unless you are very savvy of what is it you are getting into. Otherwise, it's fresh install time.

1 person likes this

Share this post


Link to post
Share on other sites

Posted

I pass, thanks anyway. 

Messing around with the registry is not something you want to do, unless you are very savvy of what is it you are getting into. Otherwise, it's fresh install time.

Yup hence the disclaimer. I've been testing these settings for several months and confirm they do what I say they do; but mistakes in even a capitol letter in the wrong place could Brick your install.

Share this post


Link to post
Share on other sites

Posted

So how noticeably different / improved is your BDO experience with these changes?

 

I'm likely to save my current reg settings and try these out without any changes, once I get round to it of course,  likely when next server maintenance happens and I disconnect from BDO.

Share this post


Link to post
Share on other sites

Posted

So how noticeably different / improved is your BDO experience with these changes?

 

I'm likely to save my current reg settings and try these out without any changes, once I get round to it of course,  likely when next server maintenance happens and I disconnect from BDO.

Personally, and a few of my guild mates that I had originally shared it with saw a reduction of server response delay of ~2 seconds (This is also including with an without Nagle's algorithm which you may already have disabled). beyond Nagle's algorithm it's more just stability customized around the amount of data BDO sends and receives. 
There is a noticeable decrease in the desync on player end, and an ~.3 second decrease in delays beyond the Nagle's Algorithm change (which is the most potent), as well as less variance in overall ping and all disconnect issues pretty much stopped for said players. 

Share this post


Link to post
Share on other sites

Posted

Or just download leatrix, press "install" and done.

2 people like this

Share this post


Link to post
Share on other sites

Posted

Or just download leatrix, press "install" and done.

That's only the very first step in this whole thing...one part out of 6..

Share this post


Link to post
Share on other sites

Posted (edited)

I pass, thanks anyway. 

Messing around with the registry is not something you want to do, unless you are very savvy of what is it you are getting into. Otherwise, it's fresh install time.

Or simply backup your registry before doing anything and if anything fails, just import the backup and everything should be fine. Or simply undoing your last steps.

Though sure if you accidentially delete your whole windows/microsoft entries on the registry then Windows is very likely pissed of your actions and requests you to install either Linux or DOS...

 

gonna try that stuff out tomorrow.

Edited by Micariel
1 person likes this

Share this post


Link to post
Share on other sites

Posted

Or simply backup your registry before doing anything and if anything fails, just import the backup and everything should be fine. Or simply undoing your last steps.

Though sure if you accidentially delete your whole windows/microsoft entries on the registry then Windows is very likely pissed of your actions and requests you to install either Linux or DOS...

 

gonna try that stuff out tomorrow.

You seem to know what you are doing. Good luck with Mr. Windows, don;t piss him off, he's old and grumpy. 

Share this post


Link to post
Share on other sites

Posted

There are several ways to decrease your lag, and stabilize your ping in black desert that I have found through testing. I've been keeping most of these secret to myself, but have decided to share them with you, and hope these stay between only those I share it with. Thank-you.

Some of these changes you might see around the web but many are custom to Black Desert and specialized to it's connection and the way it sends and receives packets.

Before going further I have to put in this disclaimer. 
This is advanced computer work that is messing around with the core of how your computer operates. I take no responsibility if you mess up and brick your windows install or any problems that occur because of anything you do.
Now that that's out of the way, we shall precede. Thank-you.

First step is to Disable Nagles Algorithm, this will allow your computer to send packets to the server without having to completely fill your MTU allowing faster transmission and receive of data.

For all of the following fixes you will need to open the regestry editor. Open Run (Windows key + R) and type RegEdit and hit enter.

Disable Nagles Algorithm

Go to the following path in the folders you see on the left. 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces{NIC-id}
the "NIC-id" section will be one of the folders that seem to be random digits. Click on each one of them till you find your IP address, only one should have it listed.
If you don't know how to find your IP open run and type CMD.
Once the command windows opens you will want to type in ipconfig and hit enter. Your IP address will be listed in the data displayed.
Once you find which NIC-id is the correct one for you, right click in the right hand pane amongst the "Files" and click Create New DWORD value. 
Name this DWORD value TcpAckFrequency. (this and all of the values are case sensitive.)
Double click on the new DWORD you made and set it's value to 1.
(DWORD value, 1=disable, 2=default, 2-n=send ACKs if outstanding ACKs before timed interval. Setting not present by default).
For gaming performance it is recommended you disable it by setting the value to  1. For pure throughput and data streaming, you can experiment with values over 2. 
Please keep in mind, if you try larger values, just make sure TcpAckFrequency*MTU is less than RWIN, since the sender may stop sending data if RWIN fills without an acknowledgement.

That's the first part Nagles Algorithm out of the way. Time for step 2.

Next find the following key in the "folders" on the left. (If you can't find it, create the key yourself):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters
In this key (the folder) create a new DWORD Value as follows.
TCPNoDelay with a value of 1 (DWORD value, 0 to enable Nagle's algorithm, 1 to disable, not present by default)
This is another value which removes Nagle's Algorithm.

Step number 3, reclaiming 20% of your bandwidth.

Locate the following key
“HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows”. 
In the left pane, right-click on Windows and create a new key called “Psched“.
After this you need to right click on the blank white part in the right pane and create a new “DWORD”.
This one will be named “NonBestEffortLimit” 
The value for this one will be zero to disable the reserve bandwidth.


Step 4, adjusting your buffers.

Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters in the "folders" in the left pane.
Once you locate this key, you will be editing (adding them if they don't exist, they SHOULD exist though...) the following values.
LargeBufferSize, Value = 81920
MediumBufferSize = 40960
SmallBufferSize = 20480
What we are doing is attempting to reduce Flow control. Flow Control can result in additional network latency as a result of data transfer interruptions. rating conditions. 
Under general operations you would want smaller buffersizes as to attempt to decrease the increase in paging; but with a game of this caliber you want to  increase the buffer size as the make sure you are not falling into Flow Control.

Step 5 Transmit windows and I/O alterations.

TransmitWorker = 32
MaxFastTransmit = 64
MaxFastCopyTransmit = 128
DefaultReceiveWindow = 204800
DefaultSendWindow = 61440
What these settings are doing is altering windows sizes to help stabilize ping and and help the fast I/O by settings a buffer size for smaller data to be used as a copy instead of reprocessing the same data again.
The next DWORD we are adding is a protective measure against Socket Hijacking.
DisableAddressSharing=1
The next DWORD will be disabling Priority Boost.
Where as this SOUNDS like an awesome feature, it's generally recommened to be turned off. This allows windows to pick what IT thinks is a priority for network and processor use. Rather than just using the standard order.
PriorityBoost = 0
The next DWORD we are adding will be StandardAddressLength. This is the length of the standard address the machine uses for TDI.
By increases this value we will get a slight increase in performance as it seems BDO's transport protocol uses slightly longer strings.
We will be settings StandardAddressLength=1024
The next DWORD we will be changing is transmitIoLength. This may have several different default values, but it's usually the PAGE_SIZE value, or PAGE_SIZE*2.
This is the default size for I/O used by Transmit(File)
We will be changing this to transmitIoLength = 4294967295
After all those changes we move onto step 6
Next you will want to navigate to the following key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Here we will be making changes to Transmission Control Protocol in order to help decrease ping and stabilize or reduce latency.
The first DWORD we will be adding is TcpTimedWaitDelay
What this DWORD does is it tells the computer how long it needs to wait before it frees up the TCP to use it's resources elsewhere.
TcpTimedWaitDelay = 30 is the value we will be using.
The next DWORD we will be adding is TcpMaxSendFree.
This sets the TCP Header Resource limit.
The default value for this is 5000, but increasing it can help throughput and even help stability during a DOS attack
We will be setting TcpMaxSendFree = 65535
ForwardBufferMemory  is the next TCP parameter we will be altering.
ForwardBufferMemory  determines the space that is set aside to store packets.
If the buffer fills the NiC or router will discard packets at random
ForwardBufferMemory = 512000 
MaxForwardBufferMemory = 20971520

The final change will be for MaxConnectionsPerServer ...which should be pretty self explainitory.

Find HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
MaxConnectionsPerServer = 16
MaxConnectionsPer1_0Server = 12

After you're all done, it's time to reboot and enjoy a less laggy, and desyncy Black Desert.

Um Step 5 where are you adding all those values?  You dont say you just went right into it.  Is it part of step 4 are you still in the buffer area? AFD>Parameters?

TransmitWorker = 32
MaxFastTransmit = 64
MaxFastCopyTransmit = 128
DefaultReceiveWindow = 204800
DefaultSendWindow = 61440
What these settings are doing is altering windows sizes to help stabilize ping and and help the fast I/O by settings a buffer size for smaller data to be used as a copy instead of reprocessing the same data again.
The next DWORD we are adding is a protective measure against Socket Hijacking.
DisableAddressSharing=1
The next DWORD will be disabling Priority Boost.
Where as this SOUNDS like an awesome feature, it's generally recommened to be turned off. This allows windows to pick what IT thinks is a priority for network and processor use. Rather than just using the standard order.
PriorityBoost = 0
The next DWORD we are adding will be StandardAddressLength. This is the length of the standard address the machine uses for TDI.
By increases this value we will get a slight increase in performance as it seems BDO's transport protocol uses slightly longer strings.
We will be settings StandardAddressLength=1024
The next DWORD we will be changing is transmitIoLength. This may have several different default values, but it's usually the PAGE_SIZE value, or PAGE_SIZE*2.
This is the default size for I/O used by Transmit(File)
We will be changing this to transmitIoLength = 4294967295
After all those changes we move onto step 6

Share this post


Link to post
Share on other sites

Posted

Yes it is still 

Um Step 5 where are you adding all those values?  You dont say you just went right into it.  Is it part of step 4 are you still in the buffer area? AFD>Parameters?

Yes. If the guide doesn't tell you to change keys don't. It's not buffer changes so it got a new step and title to quantify what was being changed. But yes. It's still in AFD parameters. 

Share this post


Link to post
Share on other sites

Posted (edited)

Yes it is still 

Yes. If the guide doesn't tell you to change keys don't. It's not buffer changes so it got a new step and title to quantify what was being changed. But yes. It's still in AFD parameters. 

Thanks for clarifying.

One last question are you entering those values as DWORD with decimal or hexidecimal.  For example if I put 32 in as hex I will get 50 as the value.

regedit.png

Edited by Lemonz

Share this post


Link to post
Share on other sites

Posted

It's all in decimal. I forgot to mention as I generally try to keep them in decimal. The data value should = the number typed out in the guide.

Share this post


Link to post
Share on other sites

Posted

It's all in decimal. I forgot to mention as I generally try to keep them in decimal. The data value should = the number typed out in the guide.

So just wanted to update you.

these settings actually made my ping much more unstable.  I normally am around 50-60ms with battleping/wtfast.  With this change it was anywhere from 50 to over 200 ping every second I pinged the server.

Got in game to test.  Using LBP on tamer the skill would take a good 2-3 seconds before the CD would actually start.

Reverted the changes (deleted them).  Back to steady ping.  Not sure what that affects but my system seems to be doing it right already.  The only thing I have on here is the leatrix fix.  Which you cover.

Share this post


Link to post
Share on other sites

Posted (edited)

So just wanted to update you.
these settings actually made my ping much more unstable.  I normally am around 50-60ms with battleping/wtfast.  With this change it was anywhere from 50 to over 200 ping every second I pinged the server.

Got in game to test.  Using LBP on tamer the skill would take a good 2-3 seconds before the CD would actually start.

Reverted the changes (deleted them).  Back to steady ping.  Not sure what that affects but my system seems to be doing it right already.  The only thing I have on here is the leatrix fix.  Which you cover.

At the very least things should have stayed the same. There isn't anything here to cause a decrease as it simply (I say simple...) increases the data flow from you computer to the whatever you are connecting to. 
This result doesn't make a whole lot sense, but I'll look into it and check back. I've tested this myself on 3 different PC's (7, 8 and 10) to make sure compatilibilty and several of my guild members are using these settings and all are fine. 

The routing through WTFast may have a play in this though, as I'm not sure how compatible their connections are with larger headers on I/O or with higher data rates.

Edit: It seems we have resolved @Lemonz issues with some one on one work, seems WTFast may have been an issue, although more data is needed to assume that is exactly the issue, although so far it's the only known variable. If you run WTFast and these changes cause you issues, send me a message after reverting and I'll work one on one with you.
Thank-you.

Edited by Kanerex

Share this post


Link to post
Share on other sites

Posted (edited)

Funny thing is, i had to add most of the things i was supposted to change, and i already had most of the things i was supposted to add... :D

Lets see it it works...

 

EDIT: Well... At least it looks like it changed that insane 2 minute lag i had right after login since last patch... But ingame delay is still the same... :D (bad AF since last patch)...

 

EDIT2: Ok it didnt... :D

Edited by RoakOriginal

Share this post


Link to post
Share on other sites

Posted

Im stuck on part two. My MSMQ folder doesnt have another folder within it called paremeters..

Share this post


Link to post
Share on other sites

Posted

here's a simple solution in case you mess something up

1. get CCleaner

2. run registry clean up

3. when asked make a backup of your registry

4. try this fix

5. if you mess up, run CCleaner again and have it restore the registry from the backup

Share this post


Link to post
Share on other sites

Posted

You are a god amongst peons. This shit actually helped with my ping overall rather than with just BDO.

Share this post


Link to post
Share on other sites

Posted

here's a simple solution in case you mess something up

1. get CCleaner

2. run registry clean up

3. when asked make a backup of your registry

4. try this fix

5. if you mess up, run CCleaner again and have it restore the registry from the backup

CCleaner only backs up the items you're deleting though.

1 person likes this

Share this post


Link to post
Share on other sites

Posted

This doesn`t just reduce my ping in bdo, it reduced it for other games as well ! thank you good sir ! 

Share this post


Link to post
Share on other sites

Posted (edited)

I'm actually surprized disabling Nagles Algoritm would "improve" your gaming experience. As its purpose is to improve TCP/IP efficiency by bundling TCP packets together and send at once instead of sending TCP packets one by one. Also changing TCP Acknowledge frequency could easily lead to more packet loss instead of reducing it. 

I am curious to know why disabling Nagles Algoritm would be better for gaming? Whoever made that post seems to know quite a bit about L3 networking.
I know a bit as well but not to this extend. Would be happy to learn a few things :)

Edited by Shirolicious

Share this post


Link to post
Share on other sites