[erlang-questions] openpoker: 25k players on a physical machine

Joel Reymont <>
Thu Oct 30 22:41:09 CET 2008


I'm happy to report great results after following Kenneth's advice to  
reduce the size of the process table.

I'm testing on a 3Gb Joyent Accelerator running Solaris 5.11.

I'm launching 5000 games with 25000 players on 5 game servers and 5  
bot nodes, all running on the same physical machine. I'm hitting the  
65000 socket maximum so the way to scale out is by adding more  
physical servers to the cluster.

A starter gun fires when all the players join their respective tables.  
All games start at the same time and players act in rapid fire, with  
no delay between bet request and response. Think of it as a 25000  
player tournament, running full-speed!

The interesting part is that poker does not consume any significant  
amount of CPU time so the way to scale is to run OpenPoker on a bunch  
of cheap machines with a decent (1-2Gb) amount of memory.

     ()1> schema:install().

     =INFO REPORT==== 30-Oct-2008::20:49:19 ===
         application: mnesia
         exited: stopped
         type: temporary
     ok
     ()2> dmb:run(5000, 5, 5, 60000).
     : game server on port 3001
     : port server on 3001...
     : game server on port 3002
     : port server on 3002...
     : game server on port 3003
     : port server on 3003...
     : game server on port 3004
     : port server on 3004...
     : game server on port 3005
     : port server on 3005...
     cluster: [,
                
,
               ]
     bot launchers  :  
[<7615.83.0>,<7614.78.0>,<7613.73.0>,<7612.68.0>,<7611.62.0>]
     game launchers :  
[<8822.485.0>,<8820.498.0>,<7610.582.0>,<7609.416.0>,
                       <7608.252.0>]
     game servers   :  
[<8822.322.0>,<8820.335.0>,<7610.419.0>,<7609.253.0>,
                       <7608.89.0>]
     gateway:start('', 4000, 500000)
     Waiting for game servers...
     '': port server on 4000...
     Simulating gameplay with 5000 games...
     50 games started, 262 players
     ...
     5000 games started, 25404 players
     dmb: 5000 games will be launching simultaneously
     dmb: waiting for games to end...

     =INFO REPORT==== 30-Oct-2008::20:50:59 ===
         module: stats
         elapsed: 60.003419
         {total_bots_connected,0}: 8904
         {bots_connected,0}: 8904
         {games_launched,0}: 1820

     =INFO REPORT==== 30-Oct-2008::20:51:59 ===
         module: stats
         elapsed: 59.99997
         {total_bots_connected,1}: 17961
         {bots_connected,1}: 9057
         {games_launched,1}: 1811

     =INFO REPORT==== 30-Oct-2008::20:52:59 ===
         module: stats
         elapsed: 60.000001
         {total_bots_connected,2}: 24494
         {bots_connected,2}: 6533
         {games_launched,2}: 1198

     barrier: reached target of 5000
     50 games finished
     50 games finished

     =INFO REPORT==== 30-Oct-2008::20:53:59 ===
         module: stats
         elapsed: 59.996606
         {total_bots_connected,3}: 25404
         {total_bots_disconnected,3}: 742
         {total_games_ended,3}: 188
         {total_games_started,3}: 5000

     50 games finished
     ...
     1000 games finished
     dmb: exited successfully, 269.970918 seconds elapsed
     dmb: exited successfully, 269.971041 seconds elapsed
     dmb: exited successfully, 269.97109 seconds elapsed
     dmb: exited successfully, 269.971134 seconds elapsed
     dmb: exited successfully, 269.971178 seconds elapsed
     ok
     ()3>
     =INFO REPORT==== 30-Oct-2008::20:54:59 ===
         module: stats
         elapsed: 60.000917
         {total_bots_connected,4}: 25404
         {total_bots_disconnected,4}: 30404
         {total_games_ended,4}: 5000
         {total_games_started,4}: 5000

--
wagerlabs.com








More information about the erlang-questions mailing list