This is a document designed to help one troubleshoot Internet issues. Internet routing is complicated and frequently, there's very little you can do to solve problems with connections. We will go over the technical reasons why you might be experiencing lag and what you might do at any point to troubleshoot. If you feel your issues may be computer-related, please check out the sister guide. If you have desync and you think internet-related issues are the cause of the desync, this is not correct.
speedtest.net is an unreliable testing tool. I do not recommend using it for the purposes of this guide except possibly in the case of bandwidth to determine whether your connection has access to enough bandwidth at all. If you have almost any consumer-grade broadband connection it's likely that you have enough.
First and simplest to troubleshoot is bandwidth. This is typically the basis upon which connections are marketed. They are marketed as having 50Mbps speeds etc. Bandwidth is completely separate from latency and other connection metrics. As such, the only way bandwidth could cause "lag" is by not having enough or by other users overwhelming the network with packets.
Fortunately, this is very simple to compute. A single controller state poll packet for Dolphin composes 96 bits at the time of writing or 12 bytes. Even if we assume the worst case scenario, that every buffer is filled every frame (which is not how it actually works, it ends up being more efficient than this), that means that at 30 buffer, you'd be exchanging about 42KB/s of bandwidth. 21KB/s of bandwidth for downstream and 21KB/s of bandwidth for upstream. As you can see, you do not need much bandwidth whatsoever to play. A 1Mbps connection is equivalent to 125KB/s.
However, if somebody else is saturating the bandwidth of your connection (such as watching Netflix, Netflix is brutal on bandwidth), you may not have bandwidth available or the packet traffic on the network may be such that it takes extra time for your game packets to get through the network, increasing latency. These are the only conditions on the bandwidth side that will be relevant to you.
If someone else is saturating the bandwidth, your options consist of:
- Implement bandwidth-limiting on others on your network. This can be done with many routers.
- Increase the priority of your own packets through Quality of Service (QoS).
In general you must have access to the networking hardware in order to implement these changes, so you are out of luck if you're on a college connection or something like that. The best you can do there is complain to the network techs at school.
Secondly, we'll look at packet loss. This is a complex metric to measure but it is likely to cause latency. The reason for this is that like Transmission Control Protocol (TCP), Dolphin uses a layer over User Datagram Protocol (UDP) to get reliable, ordered delivery of packets. This means that when you hit up and then right, your opponent will always see them in that order and if the packets arrive at all, you can guarantee that up and right presses were the presses that you sent.
When a packet is not delivered to the other person and acknowledged in a timely manner, TCP (and this UDP layer) will go into recovery mode. If the packet loss is high, it could take 10 packets being sent out before the other player gets them. This will mean significant latency spikes as the average time for arrival is quite different depending on how frequently packets make it through on the first try.
Packet loss is generally a property of routing rather than of a connection itself. This will require a brief introduction to how the Internet fundamentally works.
When your machine sends a packet, it doesn't simply arrive at the destination. The Internet is a redundant web of computers all sending traffic from one to another. When your packet leaves your computer, it hits your router (also a computer), which hits your modem (also a computer), which hits your ISP on their computers, gets sent internally through the ISP until it reaches a backbone, and then it proceeds between backbones until it finds the one that the other person's ISP leases bandwidth from, continues down and through to the ISP's local network, down to the other player. As you can tell, this is a lot "hopping" that happens to a packet after it leaves your computer.
At all points, the computer must choose where to send the packet to get it "closer" to the destination. Every single packet may make a different journey to the destination, although in practice, routes are frequently cached for performance reasons. Any performance metric may be used in the decision to route a packet a specific way.
As such, it's difficult to troubleshoot if there is packet loss and it's not coming from you. You can troubleshoot your own network and you should do this first before calling your ISP.
- If you can, try connecting directly to your modem. See if the situation improves.
- If you can, try swapping out your networking cables for new cables. See if the situation improves.
- If you use wireless, don't use wireless. Wireless introduces unrecoverable overhead even without packet loss and it may introduce packet loss as well, depending on how crowded the signal spectrum is. You could try switching wireless channels to something less crowded.
- Check the backbones (if you live outside the United States, there are alternatives) to ensure that there aren't more general problems with Internet routing at the moment. If the backbones are suffering packet loss, there's no hope of obtaining good metrics.
In particular, you'll be looking at the current index, average response time, and average packet loss metrics. A current index of 95+ probably means that the backbones are fine. An average response time of 10-35 is expected and ideally the average packet loss should be 0%. You can start to expect major problems around even 5-10% average packet loss. The further away from the ideal numbers these are, the more significant problems you can expect.
- You can also see if your ISP is having problems.
- Or if there are more general problems between markets.
If you have done these things and you are still experiencing packet loss, you might use something like the tracert tool on Windows to see specifically where packet loss is happening. This will be useful information when talking with your ISP. If the packet loss is not being produced by your local network, complaining to someone is your only option.
Lastly, we have latency. This is typically referred to as "ping." It's very difficult to address ping because frequently, the ping is simply a function of routing only. There are very few circumstances where you can exert control over latency.
Pings also have a connection metric known as "jitter," which in this context refers to the deviation of ping. A connection that has a latency of 50ms with a 10ms jitter would appear as 40ms-60ms. The vast majority of connections do not have more than 15ms jitter, so if you see pings spiking that way, typically there is something more significant at hand. Either packet loss or a local computing resource issue that looks like a ping issue.
The ping display in Dolphin is somewhat unreliable in that it may show ping spikes for simply lacking the local resources (i.e. CPU) to run Dolphin smoothly.
The steps for improving latency look very much like packet loss. If none of those solve the problem, the problem is either not latency at all or the problem is not solvable. There is almost no direct control you can exert over latency assuming that latency is the problem in the first place.
If you can figure out a common underlying issue, for example you only lag badly to AT&T customers, you can call your ISP and report that information. It's not likely to lead to much but if they don't know there's a problem in the first place, there's 0% chance of getting help. Most people just assume these things are normal and that the Internet sucks and do not call to report these things.
Can't connect at all
If you cannot connect to your opponent or vice-versa, you should see if you get an error message while trying to connect. If you do not get an error message, the room host must ensure that the game is closed and the build should be verified to be the same. You can use this resource to check your build information or download different builds.
If you get a failed to connect error message, it's likely that there's a software or hardware firewall in the way. If you set up a DMZ on the router, it may be the case that you can't connect to others but can host. Removing the DMZ entirely or putting yourself in the DMZ will solve that issue.
Dolphin contains code that typically punches through router firewalls and allows people to connect to you even if the router isn't set up to do so. It's also very uncommon in the US for ISPs to implement a firewall on their end. There are cases where this will happen and if so, there's not much you can do but complain.
If you use Windows 8.1 or Windows 10, this is how you add or edit the firewall exception for Dolphin. You'll want inbound/outbound capability.
If you use Windows 7, this is how you add or edit the firewall exception for Dolphin. You'll want inbound/outbound capability.