Lag, Lag, Lag

Help with Setup, Hardware, Performance or other Issues...Or just pimp your rig.
Post Reply
User avatar
OR13
Private
Private
Posts: 3
Joined: Fri Jun 23, 2006 1:45 pm

Lag, Lag, Lag

Post by OR13 »

Hello!
I'm new here, and (surprisingly) I have a question.

Whenever I play BZFlag, I receive warnings of lag too high, and at some point even get kicked.
I do not know what lag is, but I know it has something to do with the network communication - and my network is generally quick (768 Kbps = 96 KBps) and I don't experience regular network problems (maybe in uploading, but never in downloading).

Can someone please explain what lag is, and how I can lower it, making it possible for me to play BZFlag w/o being kicked-out?

Thank you dearly!
O.R. :mrgreen:
User avatar
tw1sted
Private First Class
Private First Class
Posts: 849
Joined: Tue Feb 21, 2006 10:21 pm

Post by tw1sted »

lag is the time it takes for your info to get to the server and back to you.

Edit: my bad, thanks for correcting me. It is the server your playing at, not the list server
Last edited by tw1sted on Fri Jun 23, 2006 9:31 pm, edited 1 time in total.
User avatar
Winny
Grouchy
Grouchy
Posts: 2381
Joined: Wed Aug 24, 2005 12:27 am
Location: Ottawa eh?
Contact:

Post by Winny »

A Heart Attack wrote:lag is the time it takes for your info to get to the list server and back to you.
Nope...

Lag is the time it take the packets from your pc to get to the server you are playing on....not the list server....
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

Correct XP. Now what to do about it (I am assuming you have DSL based on your connection speed quoted above). The initial things are (try them to see if they help):

1. Make sure that all applications are closed
2. Make sure that any P2P software like eMule, eDonkey, Gnutella, Freenet is shutdown
3. Make sure that your internet radio/ music software is shutdown

Now start BZFlag to see if your lag problem is better.

OK. if it is better after closing all of these applications, you can try starting them one at a time and then trying BZFlag each time you start a new one. If the high lag doesn't return with that App it is probably OK to run while playing. If the lag does return when you start the app, close the app before playing BZ.
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

Uploading (without doing some sort of traffic shaping) will kill your download speed (and, of course, your upload which BZFlag does need). Close anything that might be using your network and try playing BZFlag.

Also, some good points there donny_baker. :)
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
OR13
Private
Private
Posts: 3
Joined: Fri Jun 23, 2006 1:45 pm

Post by OR13 »

Thanks to all for your advice, but...

a) I use Linux. All of your inferior Windows problems do not apply here. ( :rock: sorry, a linux user must always mock Win users... :lol-old: It's just called-for... :twisted: ).
b) I've closed everything (though it shouldn't have any effect...) and it made the lag 11ms better (it was 305 last time, and now it's 294). Though this way I can play w/o being kicked-out, it's quite on-the-edge...
c) I don't know whether this is important, but I do not use ADSL, but rather Cables.

donny_baker
1. As I said, I both tried this and have Linux.
2. Don't use any P2P programs.
3. Don't use these either.

A Meteorite
I didn't upload anything while playing, but this note made me think... I do experience (as I mentioned earlier) problems with upload pace etc. sometimes - maybe this is a problem with my ISP? Maybe they doesn't provide proper uploading?


Thank you dearly,
O.R. :mrgreen:
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

OR13 wrote:a) I use Linux. All of your inferior Windows problems do not apply here. ( :rock: sorry, a linux user must always mock Win users... :lol-old: It's just called-for... :twisted: ).
If someone doesn't specify their OS we usually take Windows as a given. ;)
OR13 wrote:c) I don't know whether this is important, but I do not use ADSL, but rather Cables.
Aha, there's the problem. When you have cable you share your net connection with your whole neighborhood (that's the way cable works). So, if just a couple people got cable on your block (I don't know how far cable companies go - it could be as much as three-four blocks) and like to download huge files all the time that will bring up your lag.
OR13 wrote:A Meteorite
I didn't upload anything while playing, but this note made me think... I do experience (as I mentioned earlier) problems with upload pace etc. sometimes - maybe this is a problem with my ISP? Maybe they doesn't provide proper uploading?
Upload is always less than download. And when you start uploading a lot it kills your download. Here's a good explanation why:
www.dslreports.com/speed wrote:Back to upload speed.. what is it good for? A download is not just a download of data, the aforementioned protocol involved in downloading data requires a back channel to communicate messages to the sender... as in conversation, it is very hard for a speaker to know he is being understood if he does not get a fairly continuous stream of affirmations by the listener.

Your maximum upload speed is something you need to include as a possible factor in reductions in download speeds. Lets take Bell Atlantics 90/640 ADSL product as an example. For every packet received on the download channel, a 40 byte packet must come back (a zero data length TCP packet). If the link was running at full speed 640kbps, you would need a back channel capacity of more than 640 x 6% = 40 .. so your return channel is half used for just a download! for Bell Atlantic 90/1600 ADSL, things are even more dire, and you may have trouble seeing 1600kbps! If you actually wish to transmit any _data_ on your upload channel (say, an email with large attachment or someone is using your FTP server, or taking an mp3 from your Napster cache), then download speed will be severely impacted..
If closing everything and not playing in "Internet rush hours" (evening, lunch, etc) helps it may not hurt trying DSL out. I got DSL currently (1.5Mbit/384Kbit - the cheapest plan when I got it ~2 years ago) and I have about 40ms lag to a server in San Diego (I live a couple hundred miles north).
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
Longhair
Private First Class
Private First Class
Posts: 330
Joined: Tue Feb 08, 2005 6:06 pm
Location: Lancaster, PA
Contact:

Post by Longhair »

a) I use Linux. All of your inferior Windows problems do not apply here. ( Slightly Miffed sorry, a linux user must always mock Win users... Laughing It's just called-for... Twisted Evil ).
I, too, use Linux, but despite all of us feeling smug about our lightweight window managers, etc, you can still be subject to lag due to IRC, IM, Bittorrent, etc. Basically, it's dependent on how much RAM you have. I used to have a machine with 256 megs of ram and running KDE. If I left IM open, somebody would buzz me, and my lag would spike. Now that I have a fast box w/ a gig of ram, it's totally no problem at all. Minimizing the bzflag window would create havoc with lag too.

Another factor is the distance from your home to the server you're playing on. East coast USA to Australia, for instance, can be rather laggy, and there's not much you can do about it.

A notorious culprit is having Apache running in the background. Basically, if you have a web server on your home connection, you can forget playing BZFlag. Somebody correct me if I'm wrong here.

One last comment, fun as it is to bash other Operating Systems, it doesn't really make people want to try out yours. They get the idea that they have to be some sort of computer geek/snob/l33t to run Linux and forget about it. Less users == less hardware/software support for us.
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

OR13 wrote:Thanks to all for your advice, but...

a) I use Linux. All of your inferior Windows problems do not apply here. ( :rock: sorry, a linux user must always mock Win users... :lol-old: It's just called-for... :twisted: ).
b) I've closed everything (though it shouldn't have any effect...) and it made the lag 11ms better (it was 305 last time, and now it's 294). Though this way I can play w/o being kicked-out, it's quite on-the-edge...
c) I don't know whether this is important, but I do not use ADSL, but rather Cables.

donny_baker
1. As I said, I both tried this and have Linux.
2. Don't use any P2P programs.
3. Don't use these either.

A Meteorite
I didn't upload anything while playing, but this note made me think... I do experience (as I mentioned earlier) problems with upload pace etc. sometimes - maybe this is a problem with my ISP? Maybe they doesn't provide proper uploading?


Thank you dearly,
O.R. :mrgreen:
To start off, the speeds you mentioned in your original post isnt very high for cable. As it was last night I ran 4 tests, the average downstream speed I recieved was 6300kbps and the average upstream was around 700kbps. I also use cable, and all of these tests were done at about 8pm here when youd expect it to be kind of laggy on a friday night.

But lets start with
X: a) I use Gentoo as my main OS, and although I love to bash Windows users once in a while, it's quite the normal to assume, here, that when someone doesnt mention a OS type in the original post, they're windows users.

X: b) Remember that programs also vary on how they cause lag by your OS Configuration options as well as your hardware itself. For example, Gentoo is made to compile everything to optimize to that particular system. In my case I'm running a AMD XP 3200+ with 2GB Ram and a old but good GeForce 5200 FX PCI and use a Sound Blaster Live 24Bit for sound. What I mean with this is that I run irssi through screen, gaim on the 4th desktop and sometimes 3 or 4 xterms on desktop 2 with various programs or ssh connections open, and i top it off with banshee running. Banshee is the only thing that causes any lag change, so i occassionally run xmms because, although it lowers my fps by 10, i dont see a spike. (This is only because I run the unstable versions of everything, so I tend to learn things the hard way, which is how I tend to like it.)

X: c) Refer to my beginning thinger. Cable is usually much much faster then ADSL at off peak times, but that depends on what your ISP offers. In my case I use Comcast and get great speeds throughout the day and about the same at night. I pay for a 6mbit/768kbit connection and I get better download speed thats better then promises and upstream right around what I pay for. I intend to get the Gamers Special, (8mbit/768kbit). And also, to add to my original thing, I also tend to be downloading on an almost constant basis. So when I get my 6mbit used through the game, im really not even coming close to that.

to the AM: 1) thing. You never really see all of your advertised bandwidth, there is ALWAYS overhead. There's nothing you can do about it. So to be realistic, as it sits, you send out overhead with every packet of data, this includes source, destination, headers and trailers really... they dont take up much, but it adds up really, especially on 56k and slower broadband as you have. Then to add to lag on top of overhead, every time you pass to a Level 3 OSI Model switch or router (I forget if the Level 2 switch does it, I sleep at class), they retime and regenerate your packet to ensure it is good. Some use a way to check for bad packets to stop them from going beyond that router, saving bandwidth but at the cost of time. The only way to CRC Check a packet is to recieve the whole packet. By doing so, they add time to the entire process as opposed to a pass-through router which does the opposite and lets the users OS sort it out.


-pyr0
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

OK, So it wasn't that...

You are correct Longhair. The next thing it could be is your location in relation to the server you are playing on. Most servers are in North America or Europe. European players on North American servers are usually in the 240-300ms lag area and the same for North Americans on Eoropran servers. Your proximity to the server plays a big part in lag, and there is not much you can do if that is the issue, except to find servers closer to you.

Other issues could be: misconfigured routers, misconfigured iptables, flakey network cable, mismatched dupexing between you switch/network card... in otherwords network layer stuff.
User avatar
Swordfish
Private First Class
Private First Class
Posts: 19
Joined: Sat Nov 19, 2005 4:25 pm
Location: Montréal, Canada

Post by Swordfish »

Longhair wrote:A notorious culprit is having Apache running in the background. Basically, if you have a web server on your home connection, you can forget playing BZFlag. Somebody correct me if I'm wrong here.
OMG... I totally forgot I enabled Apache months ago, and was wondering why I had high lag recently. Thanks for the reminder!
User avatar
G-MAN
Private First Class
Private First Class
Posts: 85
Joined: Fri Aug 05, 2005 10:12 pm
Location: Location, Location, Location. This house has it all.

Post by G-MAN »

Why we're you using Apache anyway?? Web site?
User avatar
Swordfish
Private First Class
Private First Class
Posts: 19
Joined: Sat Nov 19, 2005 4:25 pm
Location: Montréal, Canada

Post by Swordfish »

G-MAN wrote:Why we're you using Apache anyway?? Web site?
Well kinda. For me, Adium file transfers are very slow (10kpbs) and unreliable. So I put the files I want to transfer in my Sites folder (I'm on Mac OS X) and give the link to my buddies. Much faster (80kbps), but now that I disabled Apache I don't know what I'm gonna do. Wait for an Adium update I guess.
pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 »

Swordfish wrote:
G-MAN wrote:Why we're you using Apache anyway?? Web site?
Well kinda. For me, Adium file transfers are very slow (10kpbs) and unreliable. So I put the files I want to transfer in my Sites folder (I'm on Mac OS X) and give the link to my buddies. Much faster (80kbps), but now that I disabled Apache I don't know what I'm gonna do. Wait for an Adium update I guess.
try an ftp server. its always been around equal for uploads when i used to run one on windows and still as i run one on gentoo linux
Longhair
Private First Class
Private First Class
Posts: 330
Joined: Tue Feb 08, 2005 6:06 pm
Location: Lancaster, PA
Contact:

Post by Longhair »

try an ftp server
Good idea, but make sure you take the time to RTFM about how to keep your FTP server secure. FTP can be a security nightmare if set up improperly.
User avatar
OR13
Private
Private
Posts: 3
Joined: Fri Jun 23, 2006 1:45 pm

Post by OR13 »

Thanks to all of you,
I'll try some of your suggestions.
I'm now working on a kernel I compiled myself, and BZF doesn't work properly at all, so I have grounds to believe that there is some problem with the network configuration in some level, which (hopefully) doesn't interrupt usual networking, but interrupts BZF.
About the distance from the server, I live in Israel, so there is no chance I can find a server near me, certainly not a popular one... :cry:

Tough luck, huh?
O.R. :mrgreen:
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

I wouldn't be so sure. There are quite a few European servers that should give you very good lag times. I might suggest viper2.pimpi.org:5154 The Two Castles. It is almost always at the top of the list and located in Europe if I am not mistaken.
mr manalishi
Private First Class
Private First Class
Posts: 64
Joined: Tue May 10, 2005 6:13 pm

Post by mr manalishi »

your firewall (if you have one) could also be making you drop/hide packets from the server.
User avatar
Saber
Private First Class
Private First Class
Posts: 207
Joined: Tue Nov 01, 2005 9:27 pm
Location: ¨¨¨¨¨

Post by Saber »

I know it might be a nonsense post but you could change your graphic settings. Your lag could get lower and let you play without getting kicked.
Post Reply