Test how many players can be connected in a single computer
by Yong-rui Wang · in Torque Game Engine · 09/14/2006 (2:31 am) · 10 replies
I want to test how many players can be connected in one single computer.
As it's said a server can only support 128 clients, I take it means a game room can support 128 players to join in right? . so does anybody know how many game rooms can be openned in a single computer? and how to open many rooms in one computer? I run many torqueDemo.exe instance in one computer with the param "-dedicated -mission starter.fps/data/missions/stronghold.mis " but it seems the clients can only see one server created. does anybody know what's going on?
As it's said a server can only support 128 clients, I take it means a game room can support 128 players to join in right? . so does anybody know how many game rooms can be openned in a single computer? and how to open many rooms in one computer? I run many torqueDemo.exe instance in one computer with the param "-dedicated -mission starter.fps/data/missions/stronghold.mis " but it seems the clients can only see one server created. does anybody know what's going on?
#2
09/14/2006 (3:22 pm)
The limitations have to do with RAM and CPU usage, so adding more than one game level on the same machine does not make sense (unless that machine is dual-core or dual-CPU).
#3
I think you made sense, we are making a game which offers thounsands of rooms , each room hold one battle which allow dozens of players join in and play together. so I think we have to change the structure of the original starter.fps, right? because the original structure of dedicated server only hold one battle. Now I have a new question, because we want to test how many players one server can handle, so I am going to simulate many players in each client pc , but since I can't run more than one torqueDemo.exe instance, do you know or anybody know how to implement it?
Great thanks!
09/14/2006 (9:06 pm)
Thanks! I think you made sense, we are making a game which offers thounsands of rooms , each room hold one battle which allow dozens of players join in and play together. so I think we have to change the structure of the original starter.fps, right? because the original structure of dedicated server only hold one battle. Now I have a new question, because we want to test how many players one server can handle, so I am going to simulate many players in each client pc , but since I can't run more than one torqueDemo.exe instance, do you know or anybody know how to implement it?
Great thanks!
#4
Then fire up multiple copies of this client, and point them at the single server instance. With luck, you can get 10 or so of these "headless" clients on a single machine, so with 15 test machines and one server, you should be able to generate decent load.
09/14/2006 (10:22 pm)
You can write a custom client that allows starting more than one, and that doesn't actually do any rendering (so that you can run more of them at once). Make this client do some actions (like fire once every 10 seconds, run around in a circle, etc) so that the server actually sees some action.Then fire up multiple copies of this client, and point them at the single server instance. With luck, you can get 10 or so of these "headless" clients on a single machine, so with 15 test machines and one server, you should be able to generate decent load.
#5
Could you please explain in more detail?
09/14/2006 (11:23 pm)
Quote:You can write a custom client that allows starting more than one
Could you please explain in more detail?
#6
2) Remove the rendering calls, or target the OpenGL calls to functions that do nothing (a "stub" implementation)
3) Remove code that checks for multiple instances running.
4) Add code that lets you specify server to connect to, and client script (to generate actions) to run, on command line
Yes, this means you have to work hard. That's because you're trying to do something that's fairly involved.
09/15/2006 (12:23 pm)
1) Start out with Torque C++ code2) Remove the rendering calls, or target the OpenGL calls to functions that do nothing (a "stub" implementation)
3) Remove code that checks for multiple instances running.
4) Add code that lets you specify server to connect to, and client script (to generate actions) to run, on command line
Yes, this means you have to work hard. That's because you're trying to do something that's fairly involved.
#7
Thanks!
09/15/2006 (7:32 pm)
I think the real problem is one client computer can only build one GameConnection with the server, I tried to new many GameConnection with one server, it turned out the server detected same IP address with all those connections, so server treat them as one connection. I wonder if a client can build the GameConnection to the server with specified port so they are different IP address(with different port), it seems the port of client side is assigned automatically, I didn't find where to specify it. any idea?Thanks!
#8
09/15/2006 (9:32 pm)
I think the problem is that GameConnection is a singleton within the game engine. I would suggest creating one process per fake client, and start all those processes on your machine. You can take out the check for multiple instances, especially if you disable rendering.
#9
btw, I found out how to run multiple instances, just take out the codes "if(!Platform::excludeOtherInstances(..)" , and each instance will create a gameconnection with different port , so the server program will differ them by different ports alghouth with same ip address. also in server part, we can run many torqueDemo.exe instances too, they will create connection with ports from 28000 , 28001 to whatever mounts you run the instance, and your client can specify to connect to which server by specify something like "-connect IP:10.172.1.100:28001". I wish somebody who has same problem will get help !
09/20/2006 (8:49 pm)
Hi, thanks! yes, I tried to run multiple clients by running many torqueDemo.exe instance, and I took out the rending part, but the cpu(3G) can only hold 10 clients running, so it means I need 100 pc to test a 1000 connection!:( btw, I found out how to run multiple instances, just take out the codes "if(!Platform::excludeOtherInstances(..)" , and each instance will create a gameconnection with different port , so the server program will differ them by different ports alghouth with same ip address. also in server part, we can run many torqueDemo.exe instances too, they will create connection with ports from 28000 , 28001 to whatever mounts you run the instance, and your client can specify to connect to which server by specify something like "-connect IP:10.172.1.100:28001". I wish somebody who has same problem will get help !
#10
Yeah, that's pretty typical. We just get a few racks of 1U headless machines and aim them all at our cluster (at work, testing our non-Torque platform).
09/20/2006 (9:05 pm)
Quote:so it means I need 100 pc to test a 1000 connection!:(
Yeah, that's pretty typical. We just get a few racks of 1U headless machines and aim them all at our cluster (at work, testing our non-Torque platform).
Torque Owner ysun
FPSCHINA.COM
I guess you need to set different ports to make multi-hosts possbie as the other game did.