Lag

From Mabinogi World Wiki
Jump to: navigation, search

Lag is a term used by players to refer to a prolonged delay in time between the input of the player and the response of the client. Many different factors contribute to the presence of lag in Mabinogi. These many factors may confuse and frustrate players as to the specific cause of their lag, as lag is a very large factor on game play.

The amount of lag that one has determines how well a player will do in regular combat, Battle Tactics, survivability, and the advantage that one Player has over another Player (PvP) or monster. Sources of lag manifest themselves client-side, network-side, and/or server-side.

In-Game Lag Tests

There many unofficial ways to simply test your lag in-game. Usually the lag in-game is almost always a combination of client-side, network-side, and server-side lag, so determining the cause(s) of your lag can be difficult from just in-game tests. However, it is very useful in determining the amount of actual lag that you have. Actual lag may be correlated with ping due to server and network latency of your location, however, actual lag is only minimally affected by the delay in ping to server. For example, a person who pings 120ms to a Mabinogi server, without lag fixes, may experience a short delay when trying to use a skill, and if this delay is even partly noticeable, the delays (up to 400ms every time) are usually far greater than the average human reaction time, which is around 200ms.

When there is little to no lag, one should be able do to these common things (generally, the less the skills fade out or delay the less lag you have):

  • Icebolt + Firebolt or + Lightning Bolt hotkey Spam: press at least two hotkeys as fast as possible, you should not hear a delay at all between magic loading sounds, and your skill bubble does not fade out even when changing.
  • Rank F-A Lightning Spam: This requires you to attack an opponent first with one charge bolt and keep them from moving (or at least from hitting you) as you attack them with lightning, and your skill bubble does not fade out at all even when reloading.
  • Rank F-A Firebolt on Bears: use Firebolt continuously on bears at a knock-back distance (800), you should be able to keep them back indefinitely as long you have mana, and your skill bubble does not fade out at all even when reloading.
  • Weapon Switch Key Spam: use two bows or a bow and kite shield on the Main and Aux. slots, you should be able to hear the switching sounds at approximately 6-8 times per second, as long as you press the weapon switch as fast as possible.
  • Healing Spam: when you click as fast as possible, you should be able to heal someone at around 4 times per second.

Client-Side

Client-side lag is influenced two ways, either by hardware configuration, or software configuration. It is important to determine which configuration is causing one's lag in order to fix the cause of the lag.

  • Determines how fast your computer can process the graphics of Mabinogi, mostly regarding its FPS (Frames Per Second) rate.
  • The FPS also determines the least time you can perform your skills and action in addition to the time dictated by the server, in addition to how visually smooth it can run. Most recent computers should not make the minimum skill time noticeable in normal areas.

Hardware Configuration

Processor

The speed of the computer's main processor (or processors) and graphics processor (or processors) determines the initial FPS. The initial FPS is usually the time when Mabinogi runs the fastest: when one has just logged onto Mabinogi after turning on one's computer. This determines the minimum amount of time needed to switch channels, to log on, or to change maps. This also determines how fast your computer can process the interface of Mabinogi (e.g. Chat Log, Friends List).

RAM

The amount of RAM a computer has determines how smoothly Mabinogi will run over time. Insufficient RAM will slowly lower FPS or even stop it over time due to increased paging to and from the hard drive, eventually causing the game to become unplayable in crowded or graphics-intensive areas. Remember that integrated graphics shares RAM for video with system RAM, which determines the amount graphics a computer can handle in a certain area. For example, your FPS will dramatically slow down in crowded or graphics-intensive areas such as Dunbarton and Qilla Base Camp if you have insufficient system RAM and/or video RAM.

Software Configuration

Graphics Card Drivers

Although it is commonly recommended to update your driver to the newest possible, this is not necessarily optimal for Mabinogi. Since Mabinogi is a relatively old game, older drivers on old computers that give fewer graphics features tend to boost the FPS in Mabinogi, especially on integrated graphics. Thus downgrading video drivers may be an option to make Mabinogi run well on older hardware for which newer drivers hurt performance.

Options Dialogue

  • Un-checking, and setting everything to the lowest possible setting will increase one's FPS.
  • Reserved Attack - Once, will decrease your reaction time and decrease the number of clicks needed to execute an attack by storing clicks for future execution. This applies to Magic Attacks, Ranged Attacks, and even Normal Attacks. For example, one can execute an intuition like move and counter smash with a normal attack even without clicking. Once is a better choice than Multiple or Off because it does not allow you to store too many clicks that causes automatic execution and it allows a reserved click to offset some lag that would require you to click more than once.

Solutions

  • Restarting your computer sometimes helps to increase your initial fps if you have integrated graphics.
  • On dedicated graphics cards, there should be control panel options to lower graphics and improve performance (you should make all settings to the lowest possible or turn them off).
  • On integrated graphic cards, you may be able to increase how much RAM is allotted to the graphics processing unit. This would be recommended if you had plenty of RAM.

Network-Side

The result when one tries to manually (by pressing hotkey) call Ranged Attack during "fade-out" or network delay. This does not happen when there is no lag.

Large packets can cause a delay between skills and actions, causing too long of a delay to play Mabinogi properly, sometimes called "latency." Great geographical distances found throughout North America require more routers, nodes, and transport media to move these large packets, further worsening latency.

Network latency has the following effects on game play:

  • Determines the initial maximum latency between skills and actions added to the in-game skill speed. (For example, this affects Healing speed, Weapon Switch speed, Magic, Ranged, and Normal attack speed)
  • Causes skills to fade or "gray out" for a short period of time.
    • Note that skills should never gray out or fade when changed during loading time. For example, a lag-free ranged attack never fades until one stops.
  • Determines the reaction time and the number of clicks necessary in order to interact between the server and client. (For example, it should always take only one click to fire an Icebolt even on Reserve Attack - Not Used).

Ping: Connection Type, Location and ISP

  • Note: Currently you may not be able to ping the servers. Use tracert instead.

The connection type partially determines your average ping above a minimum ping. There are minimum pings for a certain location solely due to the distance between the client and server and the length path of the Internet backbones. For example, minimum ping times for players in the northeastern area of the US is ~80ms. This means that different ISPs (Internet Service Providers) transfer your data through different paths, and your ping is dependent on the quality and length of the path. Your ping contributes to skill latency, but only minimally. Wireless connections can be used to play Mabinogi, but the slightest instability can cause increased latency and decreased throughput if one is not close enough to an access point.

The in-game "lagometer" displays green (0-50ms), yellow (51-499ms), and red (499+ms) to give a rough idea how much lag one has. It was removed from Mabinogi NA to keep from deterring play (but it is still in Mabinogi CN and Mabinogi JP clients).

Pinging Mabinogi Servers

  1. Click Start
  2. Type cmd in "Start Search" or in the "Run" dialog
  3. Type the following in the "cmd.exe" window:
Ping mabinogi.nexon.net
Use:
Ping mabinogi.nexon.net -t
to monitor the stability of your ping.
  • Pinging "mabinogi.nexon.net" will suffice for general relative lag (for comparison with other locations). It is approximately the same as pinging the individual channels. However, the channels do have their own IPs. Unfortunately, Nexon has blocked Ping on their servers. In order to measure latency on the individual channels, you'll need to use a third party program with the IPs listed below.
  • Note: The ping determines relatively how much skill latency you have. It may or may not be affected by lag fixes.

Traceroute

Performing a traceroute can be used to diagnose problems to determine where packet loss or ping spikes occur during the packet route. It shows can show how long the packet travels before reaching the destination.

Use

tracert mabinogi.nexon.net

or other IPs to determine where the lag comes from. If you see unusually high pings in the list, that place is the most likely cause of lag.

Bandwidth

Bandwidth determines how many connections can be opened or how much data can be sent through at once. If your connection speed has low bandwidth and you share the connection with another person, that person may take all of your available bandwidth, delaying your packets from being sent on time.

Solutions

  • The first two solutions will limit the packet size and increase transfer frequency, thus decreasing throughput. As a result, using any of the solutions will decrease your maximum download speed.

Disabling Nagle's Algorithm

Nagle's algorithm, named after its creator, John Nagle, is a process in which data packets are packed together to conserve bandwidth. In most situations, data packets are sent 1 byte at a time, which overloads bandwidth and decrease throughput. Nagle's algorithm helps prevent this by packing them together. The downside to this is data flow needs to be stopped long enough to collect enough data to form one packet. This usually takes around 200 ms. Though seemingly small, this delay ends up affecting your gaming experience or any real time application by choking the flow of data, therefore causing lag. For gamers, this process is obsolete and is actually detrimental. Disabling it yields better latency at the expense of bandwidth.

Most games bypass this algorithm, so disabling it will not affect these games. However, Mabinogi does not bypass it. Therefore it is highly recommended to disable it to improve response time, especially when attempting to do a battle tactic requiring a "lag-free" connection.

Warning: Disabling use of Nagle's Algorithm in Windows requires use of the Registry Editor (Regedit). A lot of critical system information is kept in the Windows Registry. Improper or incorrect changes to the registry could disable the operating system altogether. Instructions must be followed exactly, only making the listed changes.

Windows XP, Windows Vista and Windows 7/8.x

1. Click Start, click Run, type regedit, and then click OK.

2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\

3. In this category will be some folders. The folder in question is the network adapter. This contains information on the network: IP address, gateway, etc. If you are completely confused on which one it is you may add the following line to each folder.

4. Add a DWORD named TcpAckFrequency unless one is already in there. (It is case sensitive) -Add a DWORD by right clicking anywhere on the window.

5. Set the value of the keyword to 1 to disable Nagle's Algorithm.

6. Reboot your PC.

  • If you are running Windows Vista SP1 or 7/8.x, a reboot is not required. Simply change channels in-game and changes will take effect immediately.

MSMQ is normally not enabled. The following should be done in addition to the above if MSMQ is enabled:

  • Make sure to have Service Pack 1 installed. (Automatic Updates)

1. Click Start, click Run, type regedit, and then click OK.

2. Locate and then click (or add it if you don't have) the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters

3. On the Edit menu, point to New, and then click DWORD Value.

4. Type TCPNoDelay for the name of the DWORD, and then press ENTER. (Case sensitive)

5. Right-click TCPNoDelay, and then click Modify.

6. In the Value data box, type 1 to turn off the Nagle algorithm.

7. Click OK, and then quit Registry Editor.

Lowering your MTU

Lowering the MTU can be used in conjunction with disabling Nagle. There are two ways to change your MTU, via software, or hardware.

The lower you set your MTU, the less skill lag you will have. It is recommended that you start at 386 and make it lower to see if there is an improvement. Make sure your MTU is an even number divisible by 4. Typically, on a low-speed connection, you will not see any improvement or it will become worse.

Warning: Lowering your MTU too much will decrease your throughput (speed) dramatically. Do NOT change below 1500 when not necessary. Although you will be able to use skills faster, you may be more prone to occasional lag spikes or disconnection due to a severely limited connection speed from your computer, especially on wireless connections. It is recommended that one finds a balanced MTU for your connection speed. You must able to change your MTU back to 1500 readily when you need to use an HTTP connection.

  • The minimum MTU that your TCP/IP connection can function with Mabinogi is 48 MTU, which is allows skills to cast/load/change faster than at 386 MTU most of the time. Lowering your MTU to 48 is not recommended unless you have high ranked connection speed. (IE: Optical Fiber)
  • If slow connection bothers you, consider making Batch files, one to lower the MTU for Mabinogi, and one to reset it afterwards.
  • Side Effects (Setting at 128~48 MTU):
    • Slow pet summon speed.
    • Slow shop opening speed.
    • High sensitivity to Server-Side Lag.
    • Unable to read books (HTTP connection).
    • Unable to view Exploration Chronicle.
    • Unable to search Housing Board.
      • To avert these side effects on Windows 7, 8 and Vista please change your MTU back to 1500 as soon as you are logged in a channel.
  • This the pattern; the lower the MTU the less the skill delay:
Skill Change Speed:
1500 <768 < 512 < 386 < 256 < 128 < 48
Slow------------------------------------>Fast
  • Decide for yourself which MTU is the best for what you are doing on mabi.
  • Note: Sometimes you will not see faster skill change times, if you encounter this, please change to a different channel, it is recommended to test all the channels in your server.

Change MTU on Software

  • This will only affect you and your current connection
Windows XP
  • (In the same way you disabled nagle:)
  1. Click Start – RUN and type “regedit” and press enter.
  2. Navigate to the following Registry Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<AdapterID>
  3. In the right-panel, create a new DWORD named “MTU” with the value (in Decimal).
  4. Restart your computer.

The classic XP MTU change methods do not work for Windows Vista/7/8.

Windows Vista and Windows 7/8.x
  1. Run: cmd.exe as Administrator
  2. Type/CopyPasteEdit:
  • (For wired connection - Windows Vista/7):
netsh interface ipv4 set subinterface "Local Area Connection" mtu=386 store=persistent
  • (For wireless connection - Windows Vista/7):
netsh interface ipv4 set subinterface "Wireless Network Connection" mtu=386 store=persistent
  • (For wired connection - Windows 8.x):
netsh interface ipv4 set subinterface "Ethernet" mtu=386 store=persistent
  • (For wireless connection - Windows 8.x):
netsh interface ipv4 set subinterface "Wi-Fi" mtu=386 store=persistent


3. Press Enter
4. Relog/change channels if you have mabi open already. Restarting computer is unnecessary on Windows Vista/7/8.x.
  • Some connections may not follow the standard names. To see your current connection name, right-click the network icon and click 'Network and Sharing Center'. In the first section, second row is your current connection name. Remember you must enter the exact name for it to work.


Change MTU on Hardware

  • This is not recommended for wireless connections.
  • This will affect ALL connections and everyone that is using it. Will decrease the overall bandwidth of all connections dramatically, but still has the same effect if you don't wish to change software/restart your computer (if you have xp).
  • DO NOT SET LOWER THAN 128 MTU ON YOUR ROUTER. You risk failing to connect the settings page.
  • Summary: use google to find where the MTU setting is in your router. The router settings are usually at 192.168.1.1

Port Forwarding

Server-Side

The result when one tries to manually call Elf Ranged Attack during "elf lag." As you can see, "elf lag" persists long after the "draw arrow" animation. The character is completely immobilized during this type of delay.

Server-side lag occurs on the server when it is unable to handle the large amount of data being sent at once to the server by many clients. In extreme cases the server can overload and crash, requiring a long amount of time before it can be online again. There is nothing you can really do about server-side lag except to wait it out and/or move to a less busy channel.

  • Causes your character (but not your environment) and everyone around you to freeze and unable to use skills or actions for a long period of time.