• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 23:03
CEST 05:03
KST 12:03
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Team TLMC #5 - Finalists & Open Tournaments1[ASL20] Ro16 Preview Pt2: Turbulence10Classic Games #3: Rogue vs Serral at BlizzCon9[ASL20] Ro16 Preview Pt1: Ascent10Maestros of the Game: Week 1/Play-in Preview12
Community News
StarCraft II 5.0.15 PTR Patch Notes133BSL 2025 Warsaw LAN + Legends Showmatch2Weekly Cups (Sept 8-14): herO & MaxPax split cups4WardiTV TL Team Map Contest #5 Tournaments1SC4ALL $6,000 Open LAN in Philadelphia8
StarCraft 2
General
#1: Maru - Greatest Players of All Time StarCraft II 5.0.15 PTR Patch Notes Team TLMC #5 - Finalists & Open Tournaments Team Liquid Map Contest #21 - Presented by Monster Energy Weekly Cups (Sept 1-7): MaxPax rebounds & Clem saga continues
Tourneys
KSL Week 80 Stellar Fest StarCraft Evolution League (SC Evo Biweekly) RSL: Revival, a new crowdfunded tournament series SC2's Safe House 2 - October 18 & 19
Strategy
Custom Maps
External Content
Mutation # 491 Night Drive Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around
Brood War
General
ASL20 General Discussion BW General Discussion Diplomacy, Cosmonarchy Edition Soulkey on ASL S20 ASL TICKET LIVE help! :D
Tourneys
[ASL20] Ro16 Group D BSL 2025 Warsaw LAN + Legends Showmatch [ASL20] Ro16 Group C Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Borderlands 3 Path of Exile Nintendo Switch Thread General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine The Big Programming Thread UK Politics Mega-thread Russo-Ukrainian War Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
BarCraft in Tokyo Japan for ASL Season5 Final The Automated Ban List
Blogs
Too Many LANs? Tournament Ov…
TrAiDoS
i'm really bored guys
Peanutsc
I <=> 9
KrillinFromwales
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1136 users

Things about Latency

Forum Index > Tech Support
Post a Reply
Manaldski
Profile Joined January 2004
229 Posts
Last Edited: 2011-09-20 18:11:16
September 20 2011 13:55 GMT
#1
I did some research and here are some things about the latency in Starcraft2.

1. Battle.net Structure

When you login to Battle.net you connect to the logon server and a few other servers you fetch web content from. The logon server provides the menu interface, the games are played on different servers you connect to when you host/join a game. These servers are clustered in different server groups and can have different geographical locations. To which server group you will get assigned doesnt look to depend on your geographical location. Also you are not assigned only to a specific server group. Below is a list of the different server groups.

+ Show Spoiler +

EU: 80.239.188.* - Frankfurt 195.12.229.* - Paris
NA: 12.130.193.* - New York 12.129.202.* - Los Angeles
KR/TW: 222.231.22.* - Seoul
SEA: 202.9.67.* - Singapore



As we can see the NA game servers are located on the opposite sides of the US, which means that your in-game latency can vary depending on your location and the server you are assigned to.


2. Correlation between in-game latency and ping. In-game latency estimation.

I did several in-game latency tests on the different servers from two different internet connections and then a simple linear regression on the results. The test procedure is described below.

+ Show Spoiler +

Recording with FRAPS at 60fps, the fps should not drop under 60 during recording, else "recording lag" can skew the measurements. A unit is given the move command 20 times. The recorded movie is loaded in VirtualDub, for each "move sequence" the time of the first frame where the cursor animation appears and the time of the first frame where the move arrow lights up are recorded. Then the 2 values are subtracted, the average of the 20 values is build. Sporadical lag spikes are disregarded, if there are more then 2-3 lag spikes in a set (indicates unstable connection with the server) the set is not evaluated. The tests are conducted during off-peak server hours.
The average ping to the server is build from the average readings of the last two hops from a few traceroutes to the specific game server (not the logon server), again if the readings fluctuate an in-game latency test is not conducted.



[image loading]

The red line is the regression line and it gives you the formula to estimate your average in-game latency based on your average ping to the game server (the conditional mean of Y for a given value of X, X is assumed to be fixed in repeated sampling), each dot is a pair of values obtained through the above procedure. The area between the green lines is a 95% confidence interval for an individual Y (Avg. In-game Latency) corresponding to a given X (Avg. Ping), i.e. 95 out of 100 times the true value of Y for a given X will be in this interval.
As we can see there is a minimal in-game latency of about 200 on top of which your ping to the server is added in almost 1:1 ratio.
To get a good estimate using the above formula a stable ping to the game server is assumed (your last hop ping values from a few traceroutes should not fluctuate much).


3. Differences between UDP and TCP modes.

Starcraft 2 supports both the TCP and UDP protocols. By default it uses UDP, but it switches to TCP if UDP is blocked.

-TCP: breaks the data into packets, retransmits the data if a packet gets lost or it arrives out of order
-UDP: sends the data as fast as possible, doesnt care if it arrives out of order or it gets lost

Obviously for gaming UDP is the better protocol, especially for lousy internet connections. Now lets see how Starcraft2 will behave on a stable connection using the different protocols. A few tests were conducted using the procedure described above on the same server groups using UDP, TCP and TCP with Nagle's algorithm disabled (this makes TCP to send small packets immediately without combining them into larger packets). The results are below.

+ Show Spoiler +


32/240.21 EU UDP [RTT/In-game Latency/Location/Protocol]
32/243.94 EU TCP
32/233.15 EU UDP
32/229.78 EU TCP/AckFreq=1
32/239.31 EU TCP/AckFreq=1


190/392.05 LA TCP
190/391.10 LA UDP
190/384.15 LA UDP
190/381.47 LA TCP/AckFreq=1
190/381.57 LA TCP/AckFreq=1
185/380.78 LA TCP/AckFreq=1


330/536.78 KR UDP
335/537.22 KR TCP
335/535.10 KR TCP/AckFreq=1


As we can see the differences between the three are insignificant. The advantage of using TCP over UDP is that you can tunnel it over the SSH protocol to a server and use the alternative route to avoid connection issues between you and the game server. Of course you can use UDP too with a VPN.


4. Calculating the room for improvement.

Using the above formula you can calculate the "best case" in-game latency you will get with your internet connection from your geographical location to a given server. As the formula is a function of your ping to the server the best possible in-game latency will be given by: Your latency to the nearest big internet-hub city + lowest possible latency from there to the destination. The second part you can calculate from the latency map.

[image loading]

Once you have determined the best ping you can get you can compare it with the ping you are actually getting. The difference will be the amount by which you can potentially decrease your in-game latency. A decent value will be under 20ms over the optimal value.


5. Possible ways of lowering your latency.

If your "best case" latency is much lower then your actual latency and you think the game is playable at this level of latency you can improve it by connecting to an intermediate server which can help you by either routing you through a shorter path or through a different non-congested path. You can view it as a "virtual multihoming" for the home user. The intermediate server can either be a VPN or some of these "low latency" services which run over SSH, or something else. What you want is the sum "latency to the intermediate server + latency from the intermediate server to the destination server" to be as close as possible to the optimum latency for you. There are a few problems with that concept:

(1) Most of the time you dont know what the routing from intermediate server to the destination server will be (i.e. you cant free trial VPNs or you use an SSH tunnel) . The route may not be optimal.
(2) Routing tables change. The good route you got can change.
(3) The route from the intermediate to the destination server can get congested too.
(4) The route from you to the intermediate server can get congested too.

Because of these problems its advisable to choose a server that gives you a good latency and is located as close as possible to your destination server (to avoid (1) and (3)) and to have as much as possible alternative servers in the same location (to avoid (2) and (4)). Below are two examples.

+ Show Spoiler +


Example: You want to play on the Korean server from NA but your ping to it is much higher then it should be. Lets assume that the lag is not caused by your internet provider but by the uplink provider of the Bnet server. Obviously the route to the Bnet server is congested/sub-optimal and you want to use a better route to Korea. You need to find a Korean based server which has low latency to you (so you dont lag) and will hopefully have a direct local peering with the Bnet upstream provider. In Asia most of the ISPs are not very peering friendly so the closer the server is to its destination the better. Also you will want to have at least a few Korean servers with decent routes you can connect to (mainly because of (2)+(4)).
It will be wrong to connect to a West Coast server instead since it will be very likely that it will route the data through to the same congested upstream provider and it will lag again.

Example 2: You are in Australia and you are lagging to NA. Normally you would want to connect to a low-latency West Coast server but if you are using Optus it can turn out that you are lagging to all West Coast servers too (since Optus routes almost everything to its West Coast POP and then peers with International ISPs). In this case you would need to connect to a domestic server and hope that it will use a non-congested network for transit to the West Coast. Since you may not know what the routing will be you will need to test the in-game latency and match it to the average ping expected for such a latency. If the expected ping for such in-game latency is too high then the routing from the AUS server to the West Coast is not good and you need to find a different server.



-When these services could be useful:

1) For NA to KR. Since most of the internet traffic stays in Korea (Koreans browse Korean sites) and international bandwidth is expensive the telecom companies dont purchase a lot of international capacity, this creates congestions during peak hours.
2) For AUS/NZ/SEA to SEA/KR/NA. Again congestions + routing issues.

-When you will probably have no gain from using such a service:

1) Your latency to the game server is already low enough. Then using such a service will be useless. Examples below.

+ Show Spoiler +

Both Proxy servers are located in the same city as the Bnet servers.

30/242 EU Direct
39/243 EU Proxy TCP/SSH

190/391.10 LA Direct
180/387.68 LA Proxy TCP/SSH



2) EU to NA. EU-NA links usually dont suffer from congestion problems and bad routes dont increase your latency with more then 20ms.
3) EU to KR. EU to KR routed through either NA or the Indian Ocean is about 280-300ms latency in the best case, which is probably still too high. The only low-latency route to Korea is through Russia but it will be costly.

The good thing is that most "low-ping" services offer free trials so you can test them out to check if they will be useful.


6. Tunneling Starcraft 2 through SSH.

If you want to try out these "low ping" services here is how to tunnel Starcraft2 over SSH.
You can play now on the different servers in "Starter Edition" mode.

Note that you should use SSH tunneling on your own risk, Blizzard can ban you for using such services.

1. Block UDP for the latest version of SC2.exe . This will make SC2 switch to TCP mode. SSH supports only TCP port forwarding.

2. Get an SSH client you will use to connect to the remote SSH server, for example Putty.

3. Go to the websites of these "low-ping" services and find their server list. Most of them offer preconfigured Putty clients that are loaded with the server list. If you dont have a preconfigured Putty client just enter the IP of the server and connect either to the default port 22 or to port 443, most of the time the SSH servers listen on these ports. Dont download their "proxy software", it does the same thing you will do but it doesnt allow for any kind of customization (i.e. what program to tunnel, to which destination to tunnel).

4. Once you have established a connection to the remote SSH server your SSH client will usually create a local SOCKS service listening on some port. If you are using Putty the default port for the SOCKS service is 443, if you are using some preconfigured version of Putty this can be changed, so check in your firewall on which local port Putty is listening. You can change this port under SSH->Tunnels.

5. Now you need a program that will allow you to redirect the traffic for Starcraft2 through the local SOCKS server which your SSH client created. There are many clients, good ones for Windows are ProxyCap or Proxifier.

6. Next you need to add this SOCKS server in your SOCKS client and create rules for the traffic to be proxied. Add a SOCKS5 type server with 127.0.0.1 as an address, the server port should be the same port as the one your SSH client is listening to.
Change the rules to "Proxy only" and add the latest version of SC2.exe. Add only the IP range(s) of the game servers and port 1119. Doing so will make that only traffic generated by SC2.exe to the game servers is being tunneled through the SSH connection, this means that your direct connection will be used to download patches and you login with your own IP (so your account data doesnt pass through the proxy tunnel and you dont login using different IPs).
ArhK
Profile Joined July 2007
France287 Posts
September 20 2011 14:08 GMT
#2
Thank you for the article !

As stated previously, there is no magical formula to play in KR with lan like latency..
nkwd
Profile Blog Joined February 2010
United States99 Posts
September 23 2011 08:02 GMT
#3
Good article! And you can also try WinMTR for much faster traceroute results.
Team MnM http://mnmsc2.com http://www.sc2ranks.com/c/823/
eleaf
Profile Joined September 2011
526 Posts
September 28 2011 06:00 GMT
#4
Very very nice article. It explain many concerns I was thinking while I play from NA to KR.

According to your map I should get theoretically 180ms ping to the KR server yet my real ping is always 230-250ms. Trying to look for good vpn in Korea but all of them seems have 220ms+ ping to me.

The strange thing in starcraft is: when I play on EU server with about 150ms ping, the latency is negligible; but while playing in KR, the 235ms ping is killing me. Basically you can no longer do any detail micro like marine hit and run/ banshee micro etc... The plus 100ms ping seems change everything.
grs
Profile Blog Joined April 2011
Germany2339 Posts
September 28 2011 06:42 GMT
#5
Very good article. Could you explain, why you think this
Note that you should use SSH tunneling on your own risk, Blizzard can ban you for using such services.

is the case?

The only thing you do, is redirect your traffic.
HellGreen
Profile Joined September 2010
Denmark1146 Posts
September 28 2011 11:46 GMT
#6
Excellent work. Thorough job. I think this post will clarify some things about B.Net, VPNs and lag in general. Thanks.
Free to do whatever I want!
Issamu
Profile Joined January 2011
Brazil126 Posts
November 06 2011 19:56 GMT
#7
How can I block my SC2's UDP ports?
"You break my record, now I break you" - Chong Li
QuackPocketDuck
Profile Joined January 2011
410 Posts
November 06 2011 21:03 GMT
#8
On November 07 2011 04:56 Issamu wrote:
How can I block my SC2's UDP ports?

Same question here, I tried google but it did not get me too far
I use a paid VPN service to play with 160-170ms on SEA otherwise its 400ms for me (being with Optus who routes SEA to Aus via US) however the same VPN has a much higher ping to NA than my ISP.
Good post, people will always have latency related questions, perhaps this deserves a sticky
I bought a pack of cigarettes for $20, What have you done for your country today?
Elvex
Profile Joined August 2010
United States191 Posts
November 06 2011 21:23 GMT
#9
You can try blocking SC2's UDP ports via DD-WRT. It's listed under Access Restrictions > WAN Access. I haven't tried it though, so I don't know if or how well it works.
Phayze
Profile Blog Joined June 2009
Canada2029 Posts
November 06 2011 23:02 GMT
#10
I also believe you kinda forgot to mention Blizzards built in latency. It's something like 100ms if I recall.
Proud member of the LGA-1366 Core-i7 4Ghz Club
QuackPocketDuck
Profile Joined January 2011
410 Posts
November 07 2011 03:10 GMT
#11
100ms would feel like a lan ping for someone who is playing on 200ms+
I bought a pack of cigarettes for $20, What have you done for your country today?
Falling
Profile Blog Joined June 2009
Canada11363 Posts
Last Edited: 2011-11-07 03:32:00
November 07 2011 03:24 GMT
#12
On November 07 2011 12:10 QuackPocketDuck wrote:
100ms would feel like a lan ping for someone who is playing on 200ms+


How do either of those numbers compare to iCCup or actual LAN latency? Because I've always found SC2 unit response and even mouse scrolling sluggish, especially when I switch immediately from SC2 to iCCup. It's hard to describe, but everything feels crisper on iCCup, but maybe unit movement is designed different on 3D engines?
Moderator"In Trump We Trust," says the Golden Goat of Mars Lago. Have faith and believe! Trump moves in mysterious ways. Like the wind he blows where he pleases...
Phayze
Profile Blog Joined June 2009
Canada2029 Posts
Last Edited: 2011-11-07 04:23:12
November 07 2011 04:22 GMT
#13
It's because Starcraft 2, as I said, has built in latency on every command. You only feel "more" lag than the already "sluggish" controls when you go above that number. You dont get any advantage going from 70 down to 50, because every command has 100 (I believe).
Proud member of the LGA-1366 Core-i7 4Ghz Club
Manaldski
Profile Joined January 2004
229 Posts
Last Edited: 2011-11-07 12:13:06
November 07 2011 11:31 GMT
#14
On November 07 2011 04:56 Issamu wrote:
How can I block my SC2's UDP ports?


You can check if your software firewall has options to block a specific IP range + ports for a specific program. Else you can do it through the system security policies. Go to Control Panel -> Administrative Tools -> Local Security Policy -> IP Security Policies on Local Computer then create a new policy with a block filter action and create a new filter from your IP to the subnet(s) of the game servers for the UDP protocol, use google if you dont know how create filters.

On November 07 2011 12:24 Falling wrote:

How do either of those numbers compare to iCCup or actual LAN latency?


Check Sonuvbob's post here:

http://www.teamliquid.net/forum/viewmessage.php?topic_id=59178&currentpage=2

I haven't checked these numbers but if they are accurate and you have <20ms ping to the SC2 game servers you will have an ingame delay similar to that when playing BW over LAN with no LatencyChanger, that's also the default latency setting on ICCUP.. ICCUP uses the LatencyChanger ( http://www.teamliquid.net/forum/viewmessage.php?topic_id=65901 ), what it does is that it lowers down the game's latency-buffers so less forced command delay is applied to your commands (assuming BW works in the same way as SC2) it can also change the default latency for LAN to the SP (single player) latency level. Keep in mind that BW uses P2P so the latency will also depend on who you play against.

On November 07 2011 13:22 Phayze wrote:
It's because Starcraft 2, as I said, has built in latency on every command. You only feel "more" lag than the already "sluggish" controls when you go above that number. You dont get any advantage going from 70 down to 50, because every command has 100 (I believe).


That's not true SC2 has an inbuilt delay that goes on top of your latency. Check the graphic.
QuackPocketDuck
Profile Joined January 2011
410 Posts
November 07 2011 12:45 GMT
#15
Think I managed to block my sc2 udp traffic following your instructions I blocked udp ports 1119&11120
may have achieved a 10ms improvement or just a placebo effect .. I'm happy happy with either.
I bought a pack of cigarettes for $20, What have you done for your country today?
Grinkers
Profile Joined May 2011
Japan13 Posts
January 05 2012 15:25 GMT
#16
Great thread.

I was wondering if anybody else has found any good services to tunnel starcraft 2.

Currently I'm playing on the TW/KR server from Japan, which should be <100 ms, but I'm getting 300+ due to some bad routing. I'm able to ping Korea at <100ms, so I was hoping to find a good tunneling service I could use inside Korea. So far I've only seen services for connecting to NA from Asia.

Anybody else have problems connecting to TW/KR with decent pings?
Please log in or register to reply.
Live Events Refresh
Korean StarCraft League
03:00
Week 80
davetesta39
HKG_Chickenman12
CranKy Ducklings5
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft423
NeuroSwarm 189
RuFF_SC2 167
Nathanias 72
Nina 39
PiLiPiLi 19
StarCraft: Brood War
ggaemo 82
Noble 39
Icarus 10
Bale 4
Dota 2
LuMiX1
League of Legends
JimRising 440
Trikslyr66
Cuddl3bear3
Counter-Strike
Coldzera 647
Other Games
summit1g8941
C9.Mang0325
ViBE196
Maynarde191
XaKoH 136
Organizations
Other Games
gamesdonequick971
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH138
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• RayReign 53
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Stunt342
Other Games
• Scarra1378
Upcoming Events
BSL Open LAN 2025 - War…
4h 57m
RSL Revival
6h 57m
Reynor vs Cure
TBD vs Zoun
OSC
17h 57m
BSL Open LAN 2025 - War…
1d 4h
RSL Revival
1d 6h
Classic vs TBD
WardiTV Invitational
1d 7h
Online Event
1d 12h
Wardi Open
2 days
Monday Night Weeklies
2 days
Sparkling Tuna Cup
3 days
[ Show More ]
LiuLi Cup
4 days
The PondCast
5 days
CranKy Ducklings
6 days
Liquipedia Results

Completed

Proleague 2025-09-10
Chzzk MurlocKing SC1 vs SC2 Cup #2
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
2025 Chongqing Offline CUP
BSL World Championship of Poland 2025
RSL Revival: Season 2
Maestros of the Game
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

IPSL Winter 2025-26
BSL Season 21
SC4ALL: Brood War
BSL 21 Team A
Stellar Fest
SC4ALL: StarCraft II
EC S1
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.