Personal computing discussed

Moderators: renee, Flying Fox, Ryu Connor

 
|FN|Steel
Minister of Gerbil Affairs
Topic Author
Posts: 2172
Joined: Wed Dec 26, 2001 7:00 pm
Location: Kansas

Windows 7 Lag in Online Games

Wed Mar 17, 2010 4:19 am

I've Googled this extensively, and many people seem to agree it's a problem ("never had this problem in XP, but since installing 7"), but no one seems to agree on a fix or cause. I've seen far too many "fixes" to go through and try them all until I learn a bit more.

Does anyone know something reliable about what would be causing my connection in games to lag out. It seems like information being sent is the problem. For instance, I can't move my character in a game, but can still see everyone else move, read chat, and receive voice com.
Sucking down the easy flowing milk from society's warm breasts.
 
Dizzytaz00
Gerbil Team Leader
Posts: 279
Joined: Sat Dec 24, 2005 2:50 pm
Location: Berwick , PA USA

Re: Windows 7 Lag in Online Games

Wed Mar 17, 2010 4:58 am

I have been having lag in Battleforge Lost souls , only when someone connects to my wifi & the router gives more bandwith to the wifi.
Image
 
Aphasia
Grand Gerbil Poohbah
Posts: 3710
Joined: Tue Jan 01, 2002 7:00 pm
Location: Solna/Sweden
Contact:

Re: Windows 7 Lag in Online Games

Wed Mar 17, 2010 12:32 pm

Take a look on if the Multimedia Class Schedular is active, becuase if it works as it did in Vista, it will trottle some things as long as you have any media application running. Although it usually throttles high bandwidth things, i cant say that it wouldnt effect other things as well. The easiest way to disabled it by setting a few values in the registry, since other services require the MMCS to function.
 
|FN|Steel
Minister of Gerbil Affairs
Topic Author
Posts: 2172
Joined: Wed Dec 26, 2001 7:00 pm
Location: Kansas

Re: Windows 7 Lag in Online Games

Wed Mar 17, 2010 4:07 pm

Aphasia wrote:
Take a look on if the Multimedia Class Schedular is active, becuase if it works as it did in Vista, it will trottle some things as long as you have any media application running. Although it usually throttles high bandwidth things, i cant say that it wouldnt effect other things as well. The easiest way to disabled it by setting a few values in the registry, since other services require the MMCS to function.
This is one of the solutions I was reading online. Some users were saying it did nothing, others reported it to work. Some said it worked on their 32 systems, but not on their 64.

Would a similar solution be to simply have absolutely nothing touching the net other than my game at the time? So, close out any web browsers, etc.?
Sucking down the easy flowing milk from society's warm breasts.
 
Aphasia
Grand Gerbil Poohbah
Posts: 3710
Joined: Tue Jan 01, 2002 7:00 pm
Location: Solna/Sweden
Contact:

Re: Windows 7 Lag in Online Games

Thu Mar 18, 2010 6:08 pm

Even Steam counts as a media application with regards to the class schedular, so, it depends. And i did a rather heavy work on it, and if you set it correctly in the registry, it doesnt throttle. Easy as that. What started it all was getting a very low through put against my file server. When i finally narrowed it down to the fact that if winamp, wmp, skype or steam was started, i got crappy throughput in one direction, it nailed it. So with crappy i mean 13MB/s, after the registry entry, 110MB/s+

Thats the difference it can make with and without throttling.
 
sweatshopking
Graphmaster Gerbil
Posts: 1464
Joined: Fri Aug 15, 2008 10:37 am

Re: Windows 7 Lag in Online Games

Thu Mar 31, 2011 5:32 am

have you checked for packet loss? try a test at pingtest.net, and see how it goes.
 
FubbHead
Grand Gerbil Poohbah
Posts: 3482
Joined: Mon Apr 08, 2002 9:04 pm
Location: Borås, Sweden

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 2:44 am

I guess it doesn't help just disabling QoS for the NIC?
Amiga 1200, 68020@28MHz, 4MB+2MB RAM, Conner 80MB harddrive
 
Aphasia
Grand Gerbil Poohbah
Posts: 3710
Joined: Tue Jan 01, 2002 7:00 pm
Location: Solna/Sweden
Contact:

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 8:33 am

TLDR - Usually QoS is more trouble then its worth unless you are seriously congested. And no, QoS setting on the NIC shouldnt do anything to lag unless you have some seriously weird configuration upstream. You are right in that its worth a shot do and try turning it off unless its already off.


The long answer is that QoS might sound, easy, but in practice it's quite hard to get working properly. If you dont have seriously congested links that you really need to pass, dont bother and design for the real usage pattern instead. For QoS to actually work properly you really have to have support end-to-end, otherwise it might fail right in the middle. In many networks you also have to take great care with the design if it is to work. Especially since there are several different standards to adhere to which means that you might have to remark from one standard to the other when you pass from say the distribution layer into the core layer of larger networks. Then remark it back on the way out to the other end.

The QoS on the nic is 802.1p, which is the QoS part of the 802.1q header. And some bad cards cant mark a packet with 802.1q without going to CPU. Most cards would probably be able to mark the frame with 802.1p(COS) value, but not apply a full vlan-tag without a filter driver. Some cheaper NIC use a vlan filter drivers that apply the full vlan tag in 802.1q as a software thing and not in asic, which drops performance down to 30MB/s or something on a Gbit card as an example. Had that problem with my on board marvell nic on my former home server. Many intel cards can handle vlan in hardware.

What the QoS in the NIC does is mark the frame with a 802.1p field. That is also something that can be marked in the switch if you have both a voip phone and comp on a certain port. But COS is a layer-2 part... to get it to work over a router you need to either translate the COS into either a TOS or DiffServ field, nowdays Diffserv is the most common, which resides in the IP-header and not in the ethernet frame header as does COS. This is usually done in the closest router, or the IP-packet might already have the DSCP set if it comes from a VOIP-phone. Many routers/firewalls, especially enterprise gear can either honour or mark DSCP values in the packets accourding to firewall policies, or remark frame with incomming COS-fields. In other networks where you have normal routers the only thing you might have to do is remark the packets TOS value accourding to the incomming COS value.

The other important thing is that often the QoS is disregarded on the ISP-side right off if you are a home user, or they remark it to their own values. Especially with ISP-supplied VOIP its usually you have a special port on the modem that uses some form of QoS. But thats not something you can access yourself.

Some reserverations for the above in that I wrote it from memory so...
 
FubbHead
Grand Gerbil Poohbah
Posts: 3482
Joined: Mon Apr 08, 2002 9:04 pm
Location: Borås, Sweden

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 8:39 am

Actually, I just wondered if Windows Vista/7 uses QoS to throttle the traffic, or if it's more low-level than that (IRQ-routing, etc, etc). :)
Amiga 1200, 68020@28MHz, 4MB+2MB RAM, Conner 80MB harddrive
 
Aphasia
Grand Gerbil Poohbah
Posts: 3710
Joined: Tue Jan 01, 2002 7:00 pm
Location: Solna/Sweden
Contact:

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 8:46 am

There is another thing that might be an issue, and that is the delayed packet ack together with Nagle's algoritm that Windows might take a hit on. IIRC Tribes had an issue with this at some point.

For more info, read these, especially the first two...
http://www.stuartcheshire.org/papers/NagleDelayedAck/
http://www.windowsreference.com/windows ... ows-vista/

http://en.wikipedia.org/wiki/TCP_delayed_acknowledgment
http://en.wikipedia.org/wiki/Nagle's_algorithm
 
Aphasia
Grand Gerbil Poohbah
Posts: 3710
Joined: Tue Jan 01, 2002 7:00 pm
Location: Solna/Sweden
Contact:

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 9:11 am

FubbHead wrote:
Actually, I just wondered if Windows Vista/7 uses QoS to throttle the traffic, or if it's more low-level than that (IRQ-routing, etc, etc). :)

As I said i my last post, CoS resides on Layer-2(Ethernet frame header), ToS/Diffserv on layer-3(IP packet-Header)

QoS in the client shouldnt trottle anything as far as I know. But I have no idea if Windows uses any other weird way except the Multimedia Class Schedular to throttle traffic. The throttling should be done in the a router somewhere on the way if the links are filled.
 
anotherengineer
Gerbil Jedi
Posts: 1688
Joined: Fri Sep 25, 2009 1:53 pm
Location: Northern, ON Canada, Yes I know, Up in the sticks

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 9:30 am

I would have to agree. CS:S seems more fluid in XP than it is in w7 x64. I actually have 2 hdds so I dual boot w7 and xp. I don't know if it's because the windows on windows 32 to 64 bit or other issue.

XP ftw for gaming.......for now.

edit: grammar
Last edited by anotherengineer on Wed Jun 29, 2011 10:20 am, edited 2 times in total.
Life doesn't change after marriage, it changes after children!
 
morphine
TR Staff
Posts: 11600
Joined: Fri Dec 27, 2002 8:51 pm
Location: Portugal (that's next to Spain)

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 9:56 am

Aphasia wrote:
Even Steam counts as a media application with regards to the class schedular, so, it depends. And i did a rather heavy work on it, and if you set it correctly in the registry, it doesnt throttle. Easy as that. What started it all was getting a very low through put against my file server. When i finally narrowed it down to the fact that if winamp, wmp, skype or steam was started, i got crappy throughput in one direction, it nailed it. So with crappy i mean 13MB/s, after the registry entry, 110MB/s+

Thats the difference it can make with and without throttling.

What did you change and where, exactly? I'm interested in this, as I've long suspected that there's something funny going with my installation regarding ping/lag.
There is a fixed amount of intelligence on the planet, and the population keeps growing :(
 
TheEmrys
Minister of Gerbil Affairs
Posts: 2529
Joined: Wed May 29, 2002 8:22 pm
Location: Northern Colorado
Contact:

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 10:03 am

Run a traceroute from XP and from 7 to the same CS:S server and see if there are any glaring discrepencies. They may just be taking different paths. But its at least worth looking into.
Sony a7II 55/1.8 Minolta 100/2, 17-35D, Tamron 28-75/2.8
 
morphine
TR Staff
Posts: 11600
Joined: Fri Dec 27, 2002 8:51 pm
Location: Portugal (that's next to Spain)

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 4:40 pm

A lot of Googling came up with these proposed solutions:

---

#1 - Disable TCP autotuning

Open a command line as administrator,

netsh
interface
tcp
set global autotuning=disabled


#2 - Multimedia Class Scheduler

Disabling the service is a bad idea, as it will break audio. Instead, use the registry editor as administrator, go to

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile

Add a DWORD key, "NetworkThrottlingIndex", set to FFFFFF (in hex, those are eight Fs). If this key already exists, simply change its value.


#3 - Increase the frequency of TPC ACKs

Potential for things breaking with this is pretty high, nevertheless:

http://www.wowinterface.com/downloads/i ... cyFix.html


#4 - Similar to above, adds the TCP_NODELAY flag

http://lifeandcode.net/2009/05/reduce-g ... /#comments

· From a command prompt (usually in All Programs -> Accessories -> Command Prompt) run “regedit”
· Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces
· Browse the items under interfaces until you find one that has an IPAddress entry matching the network interface you want to affect (typically LAN IP addresses start with 192.168 or 10.0); note that if your IP address is automatically assigned by a DHCP server you may need to look for a matching DhcpIPAddress instead of IPAddress
· Right-click on the interface and select New > DWORD (32-bit) Value, name it “TcpAckFrequency”
· Right-click the new TcpAckFrequency value and select Modify, enter “1″ (Hexadecimal radio button should be selected)
· Right-click on the interface and select New > DWORD (32-bit) Value, name it “TCPNoDelay” (note that TCP is all uppercase this time – that’s intentional)
· Right-click the new TCPNoDelay value and select Modify, enter “1″ (Hexadecimal radio button should be selected)
· Verify that both TcpAckFrequency and TCPNoDelay now show up in the adapter’s property list with types REG_DWORD and values 0×00000001
· Exit regedit and reboot (reboot is necessary for the changes to take effect!)
· Play a game and enjoy your new low ping
There is a fixed amount of intelligence on the planet, and the population keeps growing :(
 
Aphasia
Grand Gerbil Poohbah
Posts: 3710
Joined: Tue Jan 01, 2002 7:00 pm
Location: Solna/Sweden
Contact:

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 6:24 pm

I did a post some time ago on Ars technica when i first discoverd it so... and since stuff like this always crop up when switching comps, I saved a textfile of it :wink:
Although I remembered that I havent done the modifications on my current win 7 sp1 install, and it works very well in spite of that. My current values is at 10 and 20 for index and responsiveness, so it seems Microsoft changed how the scheduler works with either win7 or sp1. In Vista it was a dead givaway.


*** Ars post ***
Right now i put the main reg-keys to the folliwing valued. The throttling index is the amount of packets it lets through without throttling where FFFFFFFF is supposed to be the max(or disabled accourding to some articles. The second value is how many percent of the cpu-cycles that the MMCSS reservers for non-multimedia use.
key - NetworkThrottlingIndex = FFFFFFFF(hex)
key - SystemResponsiveness = 20(dec)

These keys can be found under the heading:
HKLM\Software\Microsoft\Windows NT\Currentversion\Multimedia\SystemProfile\

I havent gotten around to fiddling with the task-specific profiles yet though. They are under the heading:
HKLM\Software\Microsoft\Windows NT\Currentversion\Multimedia\SystemProfile\Tasks
 
Aphasia
Grand Gerbil Poohbah
Posts: 3710
Joined: Tue Jan 01, 2002 7:00 pm
Location: Solna/Sweden
Contact:

Re: Windows 7 Lag in Online Games

Wed Jun 29, 2011 6:46 pm

What you never ever want to do, even if you have a ECN capable router, is to switch that on. It will break things. I tried it out and had forgotten I added it. And suddenly Battlefield 2142 couldnt connect to master server. Battlefield 2 on the other hand worked fine. All due to the other end point having a broken ECN implementation.

Nowdays with broadband though, theres much less need to fiddle with settings. In the modem times, fiddling with just MTU could work wonders for some games. Thats another thing that can break performance though, if some network you are passing have a lesser MTU settings. We had that problem for a client we manage networks for. One of the vendors supplying connections over a part of the country had an erranous MTU-setting.

The only thing left is if you for some reason crash into that delayed ack, nagle problem, but most people wont see that at all.

As for me netsh settings... these seems to work just fine.

TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State : enabled
Chimney Offload State : automatic
NetDMA State : enabled
Direct Cache Acess (DCA) : disabled
Receive Window Auto-Tuning Level : normal
Add-On Congestion Control Provider : none
ECN Capability : disabled
RFC 1323 Timestamps : disabled
** The above autotuninglevel setting is the result of Windows Scaling heuristics overriding any local/policy configuration on at least one profile.

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On