Tech question : Network & frame cap problems

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Lily

Biatch
Seems I have found out what was causing the weird lag I was experiencing on any crowded server lately, but this raises even more questions, so I'm seeking advices. Let me explain :

I have assymetric DSL, 608 kbps downstream / 152 upstream. For some reason (I guess because of the half duplex nature of the line), if i'm uploading too much data on the line, the down stream becomes slow and delayed.
When I'm playing UT with too many players and spammage all the way (your average 10 players pub), the traffic downstream increases, and I get weird lag. Much like playing with a modem with an inconstant bad ping and a bit of packet loss. Quite unplayable.
I believe that the lag is caused by quite a high upload rate to the server (or so it seems), and I'd like to work around that.
That's where things become tricky. Looking at F6 stats, it seems that UT sends a packet of data for every frame displayed. It sounds a bit stupid that the network traffic would be bound to how fast your computer can compute frames, but apparently, that's how UT handles the stuff. Seeing as my 1337 comp can deliver 100+ fps consistantly, the traffic generated into both directions can get quite high at times (Hell, do I hate flak spam).
Actually, my line should be able to handle the thing quite handily, even if we only take into account the upstream speed, so maybe the problem is not with my line. Whatever.

Now the questions :

1) Any way I can reduce the rate at which packets are sent to the server *without* affecting my framerate ? (sort of max tick rate for client side) ?

2) Any way I can fine tune the net-speed for up/down directions separately ?

3) Any way I can cap my framerate *without* turning vsync on ? (for some reason, I have more mouse lag than should be with vsync on, dunno why, and i'd like to save my eyes from the 60hz refresh rate)

4) Can someone rewrite UT netcode ? Please ? Pretty please ? :D

Hellllllp :(

Lily
 

Clayeth

Classic
Apr 10, 2000
5,602
0
0
41
Kentucky
what kind of lag are you getting, any PL? What netspeed are you set at (should probably be 10,000)

I'm not sure where you're getting that UT sends a packet for every frame, I would find it really hard to be able to tell the difference in packets sent between 50 and 80 fps :hmm:

I have ADSL but it's 1.5/256 and I am pretty much guaranteed my pings to be around or below 100 on domestic servers. I played on a euro server the other day pinging 150, and never get PL. Anyway, I would think 152 would hold up ok, from what I've heard dual ISDN (128) is plenty to get really good pings.

I'm still not sure if the framerate/packet idea is right, but that would explain why lower netspeeds limit your fps (which is something nobody had been able to give me a reason for BTW). Aside from playing around with different netspeeds I don't know what to tell you. If your lag IS being caused by what you think, lowering the netspeed might help, but that would also increase your lag in general. BTW: is the lag just increased ping or Packet Loss... or both?
 

Lily

Biatch
- Well, when it happens, F1 & F6 pings are ok (60-100ms), 0-4% packet loss, yet, I feel like I'm driving a tank at times, and everything is delayed. For instance, I can dodge past a corner, see that the way's clear and still eat a cluster of rockets from a player that was not there when I looked (nor the rockets, no sound either until it's too late). Well, it feels like the ping is real, yet everything is delayed *but* my character (ie, if it feels responsive enough if I dodge or fire, which is not the case with a ping of 200).
Hard to describe, really.

- As for the packets/s, if you look at F6 stats, you will see that the packets UT send per second match your framerate. I can't tell the difference between 20 or 200, it's just written there. All I know is that when the amount of data sent+received gets too high, I get weird lag that I shouldn't have. Actually, I'm still not even sure I'm right about the reason.

- I don't have a problem with my ping, I ping servers like I should ping them. My problem is that I have unexplained lag, and I'm trying to find out why and fix it. So far, I think I know what the problem is, as explained in the first post.

- The lag doesn't show up much in stats, a bit of packet loss, but that's only casual, also, ping spikes once in a while, but here too, nothing so unusual. I really wonder :( The only thing I'm sure of is that the problem gets worse with each player joining the server I'm playing (like, everything more or less ok with 6 players, laggy at 7, *really* laggy at 8, then completely unplayable). That's mostly why I think it's a problem with the bandwidth.

My only options so far :
- Playing with netspeed, problem is, It caps incoming packets as well as outgoing packets, and I'm probably not going to fix anything that way (like you say, I'm going to increase lag in general, not a very good idea when that's what you want to fix in the first place).

- Playing with the refresh rate of my monitor, and vsync, to artificially cap the framerate (and outgoing packets). Problem is : vsync = mouse lag & 60hz = headaches.

Thank you for your answer, anyway :)

Lily
 

Rooster

Local Legend
Jan 4, 2000
5,287
0
0
Fort Mill, SC
www.legionoflions.com
Let's just correct some misunderstandings here:
For some reason (I guess because of the half duplex nature of the line), if i'm uploading too much data on the line, the down stream becomes slow and delayed.
Every instance I've seen, DSL is full duplex, cable is half-duplex. Perhaps one of your other devices are half-duplex, but I believe most DSL routers are capable of full duplex.
I believe that the lag is caused by quite a high upload rate to the server (or so it seems), and I'd like to work around that.
You don't work around a server not having enough bandwidth unless you convince everyone on the server to go to netspeed 5000 or less.
Playing with netspeed, problem is, It caps incoming packets as well as outgoing packets, and I'm probably not going to fix anything that way (like you say, I'm going to increase lag in general, not a very good idea when that's what you want to fix in the first place).
You're not increasing lag, you're decreasing frequency of packets. While similar -- it's not quite the same. True, it won't have the rapid response of a perfect DSL connection, but it may be just enough for the server to smooth out.
Problem is : vsync = mouse lag & 60hz = headaches.
You play at a resolution where your monitor can only put out 60Hz? You should be at a resolution where your monitor can run at 85Hz or higher. I do know that when I turn on VSYNC, I do not get mouse lag -- so it's not directly connected, but it may have that affect on yours if you're capped at 60Hz.
Any way I can cap my framerate *without* turning vsync on ? (for some reason, I have more mouse lag than should be with vsync on, dunno why, and i'd like to save my eyes from the 60hz refresh rate)
Whether you have VSYNC on or off has nothing to do with "saving your eyes from 60Hz" -- if that's what your monitor is set to, that's all it will display. 60Hz, agreed, is very harsh.
What netspeed are you set at (should probably be 10,000)
Netspeed 8000 is what you should be at, especially with a limited upstream (less than 256k)

What OS are you running?

What are your system specs?
 

Lily

Biatch
Every instance I've seen, DSL is full duplex, cable is half-duplex. Perhaps one of your other devices are half-duplex, but I believe most DSL routers are capable of full duplex.

Well, I don't know if DSL is half or full duplex to tell you the truth, that was just a supposition (all I wrote is). Sure thing is, if i'm uploading anything at full rate (16KB/s), should that be FTP, HTTP, whatever, the download rate decreases toward 0. Maybe it's the USB modem, the driver, the Windows stack, I don't really know, but that's what happens with my connection, and I have all the reasons to believe it does the same with UDP & UT.

You don't work around a server not having enough bandwidth unless you convince everyone on the server to go to netspeed 5000 or less.

Granted, but seeing as I have the problem on every server I play, I think the bandwidth problem is on my side.

You're not increasing lag, you're decreasing frequency of packets. While similar -- it's not quite the same. True, it won't have the rapid response of a perfect DSL connection, but it may be just enough for the server to smooth out.

Ok, saying that it would increase lag in general was a shortcut. What I was trying to say is that i'm hardly going to fix my problem by setting netspeed too low (which I have to if I want to decrease the number of outgoing packets). That's also why I wanted to know if I could change the netspeed separately for up/down directions.

You play at a resolution where your monitor can only put out 60Hz? You should be at a resolution where your monitor can run at 85Hz or higher. I do know that when I turn on VSYNC, I do not get mouse lag -- so it's not directly connected, but it may have that affect on yours if you're capped at 60Hz.

I play at 1024x768 @ 100hz. The 60hz setting + vsync is the only other way I could think of to decrease the amount of outgoing packets (well, could be 75 or 85hz too). Problem is, 60hz is not too pretty, and I get slight annoying mouse lag if I enable vsync at such a frequency.

Whether you have VSYNC on or off has nothing to do with "saving your eyes from 60Hz" -- if that's what your monitor is set to, that's all it will display. 60Hz, agreed, is very harsh.

The two were unrelated :)
I don't want to set my monitor at 60hz because it gives me headaches, but on the other hand, changing the frequency and turning vsync on is the only way I know that let me cap the framerate, hence my dilemna :)

What OS are you running?
What are your system specs?

Relevant parts :
Windows 2000, (*clean* setup).
Athlon TB 1.4ghz, 256MB DDR, gfx = Kyro2 64MB, ADSL (608/152, USB modem).

Lily
 

Stillborn

PHEAR IS JUST ANOTHER 4 LETTER WORD...
Oct 14, 2000
1,167
0
0
Sweden
Visit site
I used to have a cable modem ISP (via the cable TV network) and the speeds were 512/128... I had to turn my netspeed down really low (modem = 2500 or there about) cause that was the only way for me to get playable pings with hardly no packetloss... This service was half duplex and if I (like you) were to upload something at the same time as I was downloading, both speeds would just plummit...:(
 

StarKilLer{MOK}

New Member
Nov 1, 2001
30
0
0
ATL
www.web-illusions.net
DSL is Full Duplex, the modem may not be. The USB Modem is probably the problem, Get a 3-Com PCI DSL modem or an External DSL Modem. Running the dsl modem on your pc can create some lag itself. Using a router will make it less laggy, it takes the translation process for dsl off of Your Machine, which means more cpu cycles if i

As for The Monitor Refresh rate having to do with the Network data sent, It doesn't, All the pc sends is location and action info roughly.
 

CrazyCougar

CATatonic
Jan 5, 2001
1,306
0
0
48
Ottawa, Canada
I just wanted to add my $.02 CDN...

Some servers have the maxclient rate set to a specific level so it won't matter what client rate your using if the server's max is below the one you've setup. This allows more connections over limited bandwidth.

Now imagine what would happen if the server is set to send at 5000 but it has become extremely busy and the server has 5 people trying to update at the same time. The server has to collect everything and send out one set of packets to each person.... so in effect it collects 5x 5000 and resends at 5000 to each person. If the information needed to keep everything smooth is higher than 5000 you will likely get packet loss or lag as the server has to send 2 packets to make up for the data that wasn't sent the first time.

I doubt that happens too often so it should be an issue. However if your max client rate is set too high you'll lag yourself too.

Now if your upload is capped at 152 and your lagging try setting your max rate to 7000-7500. That way your upload has more room to spare for overhead and other net congestion(what if that cap is being reduced further when it hits a bad router?)

BTW, I made all this up. I'm likely really far off in my assumptions. However I do know that if your client rate is too high you can lag yourself.

So if that server is sending at 10K and your only getting 8K due to your connection you've just created your own 2K packet loss. The server thinks you can handle the full 10K but your connection can't. However this should be showing as Packet Loss or high pings...
 

Clayeth

Classic
Apr 10, 2000
5,602
0
0
41
Kentucky
Originally posted by StarKilLer{MOK}
DSL is Full Duplex, the modem may not be. The USB Modem is probably the problem, Get a 3-Com PCI DSL modem or an External DSL Modem. Running the dsl modem on your pc can create some lag itself. Using a router will make it less laggy, it takes the translation process for dsl off of Your Machine, which means more cpu cycles
Yeah, I have a little to add here. When I first signed up for DSL they sent me a 3COM PCI DSL modem. It worked really well, and I was satisfied, no problems. After getting a second computer in our house I got a external (Alcatel Speedstream) and a linksys router. My max DL's are about the same, but my ping has improved on average by about 10ms. USB modems are NOT the best choice. The 3COM PCI is cheap, but make sure whatever you get will work with your ISP. The externals are more expensive, and a router will add even more to the cost.

VSYNC: I actually have the sensation of lag and loss of smoothness if I turn OFF vsync. Don't forget that the info on it is wrong in the preferences menu, when it says false, that means it's on... and true means off. If you can't get anything to work I would suggest trying a different modem. You might even be able to get your ISP to let you try ond and see if it solves the problem before having to buy it. In fact, the PCI's and USB's are usually free (enets might cost) and you could probably just switch them out and send the USB back.
 

Lily

Biatch
Originally posted by StarKilLer{MOK}
As for The Monitor Refresh rate having to do with the Network data sent, It doesn't, All the pc sends is location and action info roughly.

As I see it, UT sends data over the network for each and every frame it computes. Now, if you have vsync turned on, UT won't compute more frames than your monitor can display. So in this case (vsync on) the refresh rate has a direct impact on the (outgoing) network traffic. It also explains why changing the netspeed caps the framerate, as I've read here and there.

Actually, I just did the test, vsync on & 60hz screen mode, and I have ~60 packets/s sent to the server instead of the usual 100-120 (my framerate if I turn vsync off). Just doing that has reduced the amount of data sent to the server by half.

Unfortunately, it doesn't seem to improve anything, so my assumptions as to why I have unexplained lag may have been wrong in the first place. I'll have to do further testing. Gonna try low netspeed.

Lily
 
Last edited:

Lily

Biatch
StarKilLer, Clayeth :

Yeah, if I don't find a way to fix my connection, I'll eventually give a try to an ethernet modem, good idea, although I have some doubts that my problems would be caused by USB.

*Argh*, I hate computers :mad:

Lily
 

StarKilLer{MOK}

New Member
Nov 1, 2001
30
0
0
ATL
www.web-illusions.net
Originally posted by Lily
StarKilLer, Clayeth :

Yeah, if I don't find a way to fix my connection, I'll eventually give a try to an ethernet modem, good idea, although I have some doubts that my problems would be caused by USB.

*Argh*, I hate computers :mad:

Lily

USB is good, but not for Networking, It isn't as stable as the PCI bus.
As for the frames affecting network, I am going to ask and epic guy about that, seem really fishy
 

Clayeth

Classic
Apr 10, 2000
5,602
0
0
41
Kentucky
Originally posted by StarKilLer{MOK}


USB is good, but not for Networking, It isn't as stable as the PCI bus.
As for the frames affecting network, I am going to ask and epic guy about that, seem really fishy
Plus, it shares the bus/bandwidth between all the things at once. So, the more things you have going on it at once, the worse all of them will perform. You talk about also experiencing mouse lag... is your mouse also USB? This could be part of the problem.
 

Lily

Biatch
Originally posted by Clayeth|BuF

Plus, it shares the bus/bandwidth between all the things at once. So, the more things you have going on it at once, the worse all of them will perform. You talk about also experiencing mouse lag... is your mouse also USB? This could be part of the problem.

Nah, it's PS/2 :(

Oh well, I still have the option of raping newbs :(

What I don't understand is why it has gotten worse recently, even though my 'ping' has never been so good ... That's frustrating.

Lily
 

Rooster

Local Legend
Jan 4, 2000
5,287
0
0
Fort Mill, SC
www.legionoflions.com
usb modem =
fuct.gif