Respectfully disagree.root down wrote:server side lag can't be solved by getting a better somputer, only a better server/more bandwidth for the server's connection.

Server side lag can be caused by any of the following problems (and more that I haven't mentioned):
1. Bad scheduler. Running the server under Linux 2.6 or a Windows NT kernel is probably your best bet, I don't know if it'll run on Mac OS X, but Darwin should have a decent scheduler too. This only affects servers that run multiple processes/threads.
2. Bad threading model. As above, so it is here.
3. Slow processor. This isn't the most likely cause, most of the time.
4. Too little RAM. Depending on how much memory each connected client requires, but keep in mind that each client requires some memory just for upkeep of the connection, and then some memory for their movements, colors, name, and so forth. (name is probably under upkeep)
5. Bad IP stack. This shouldn't be a problem either, since all of the OSs in use right now use BSD-derived IP stacks and are pretty bulletproof in that regard.
6. Inadequate connection. Not necessarily too slow, just inadequate. A cable connection is bad for this application because of the disparity between upstream/downstream speeds. A slower downstream DSL connection will probably host a server much better than a cable connection. Still, many of us don't have the choice on connection.
7. Too many running processes. No matter how good your scheduler is, too many other running processes will still affect the load significantly.
8. Bad programming. Not necessarily bad, but in certain server applications it's definitely better to run a separate process for each client. In others it's better to just run threads instead (also known as lightweight processes). In still others a single thread is best. So the "bad programming" I'm referring to is just choosing the wrong model for the application, and in many cases it's not necessarily "bad", it's more "I chose this model and after hundreds of people started playing discovered it was the wrong model". "Good programming" in this case would allow the programmer to switch models without having to rewrite the whole application.
9. Latency. Latency in general, but I'm specifically thinking about kernel latency. How long it takes for someone's UDP datagram to get through the layers from the NIC to the application and then back again will certainly affect lag. General latency in other areas will as well, such as how many hops the datagram has to go through to get to the server (hence why some users have high pings while others have low, but we already knew that). Client machines will contribute to lag in this fashion because if your computer has to in translate the incoming data from the server and render it to the screen, which introduces some latency in every action you take. This latency can't be avoided either, but can be reduced.
How to cut down on lag?
First, does AA use a single thread, multiple threads, or multiple processes to manage each client connection? Some of these solutions won't make a difference, depending on this one single fact.
1. Get the best available kernel for your OS. If you're running Linux, upgrade to 2.6 if you haven't already. You might want to apply the low latency patches, I think they're badged Alan Cox but I could be wrong.
2. Same. If you're running any NT kernel, any Linux post 2.2 (possibly 2.2 has a good threading model too), and Mac OS X (or any BSD, for that matter), then this isn't a problem.
3. As the most expensive solution, hold off on this one until absolutely necessary. Some things to consider, though. If AA uses multiple threads, you might have some luck with a hyperthreading processor such as the Xeon. If AA uses multiple processes, then a dual-proc setup will help a *lot*. A beowulf cluster might help, but then you have added latency you don't really need, so I suspect building a supercomputer to host an AA server would be firing a shotgun at a mouse. Also, more L# cache is better, so if you're running a Duron, getting an Athlon of comparable speed will improve performance noticeably. Same if you're running a Celeron.
4. More RAM is the cheapest solution that requires money. Also look at the speed of the RAM and make sure you're running RAM that is the fastest your motherboard/processor can support. Faster swap space is an option, but usually more expensive than RAM, and I just can't see AA using all that much memory.
5. You can probably ignore this one unless you're interested in kernel hacking. If you are interested in kernel hacking, then you don't need anything *I* might be able to tell you, since I dont' know jack about kernel hacking.
6. You probably don't have a lot of choice in the matter, but I understand that SpeakEasy has one of the best-reputed DSL services for gaming.
7. If you're running an actual dedicated server, you solve this problem by running a very light weight Linux/BSD installation, where the only running processes are things you absolutely must have (iptables, syslog, a couple of others). If not, then you probably don't have an easy solution to this, other than to shut down all unnecessary services. If you're running a display manager because you use the computer for regular work, that's going to create a lot of lag, but you don't have much choice, do you? On a dedicated box, Windows is the absolute wrong OS for this, since it basically runs a display manager no matter what. There's a reason Linux and BSD servers routinely outperform Windows servers.
8. You have to ignore this one unless you want to hack on AA. Even then you might discover that AA already has the best model for its application, but there's almost certainly room for optimization. Until you've embedded assembly code everywhere, there's always room for optimization. Of course, assembly code isn't portable, but some projects have found ways around it (MPlayer being the most visible that I know of). But some performance gain might be found in rewriting the client connection code in C, if it's in C++ now. I'm not certain about that, but I understand that C++ bindings did turn out to affect performance, but there's almost always a bigger fish to fry than that.
9. The best known way to deal with latency is to compile your kernel, building in your NIC drivers and so forth rather than having them built as modules. The old performance hit of running modules is rumoured to have been fixed in linux 2.4, and is almost certainly fixed in Linux 2.6, but I don't know it for a fact. Switching the server to Gentoo Linux is the easiest way I know of to deal with this, since Gentoo optimizes itself for your system while you install it. If you're running Debian, switching to Mandrake, SuSE, or whatever, will also help a bit, since Debian is generally built for 386 processors where the others build for Pentium and above.
When you've done all of htis, you might find you have gained the ability to run lag-less with two or three more connected clients, or you might not.
