Transactional memory support for scalable and transparent parallelization of multiplayer games

In this paper, we study parallelization of multiplayer games using software Transactional Memory (STM) support. We show that the STM provides not only ease of programming, but also better performance than that achievable with state-of-the-art lock-based programming, for this realistic high impact application. For this purpose, we use a game benchmark, SynQuake, that extracts the main data structures and the essential features of the popular game Quake. SynQuake can be driven with a synthetic workload generator that flexibly emulates client game actions and various hot-spot scenarios in the game world. We implement, evaluate and compare the STM version of SynQuake with a state-of-the-art lock-based parallelization of Quake, which we ported to SynQuake. While in STM-SynQuake support for maintaining the consistency of each complex game action is automatic, conservative locking of surrounding objects within a bounding box, for the duration of the game action is inherently needed in lock-based SynQuake. This leads to higher scalability of STM-SynQuake versus lock-based SynQuake, due to a higher degree of false sharing in the latter. Task assignment to threads has a second-order effect on the scalability of STM-SynQuake, due to its impact on the application's true sharing patterns. We show that a dynamic locality-aware task assignment to threads provides the best trade-off between load balancing and conflict reduction.

[1]  Torvald Riegel,et al.  Dynamic performance tuning of word-based software transactional memory , 2008, PPoPP.

[2]  Nir Shavit,et al.  Understanding Tradeoffs in Software Transactional Memory , 2007, International Symposium on Code Generation and Optimization (CGO'07).

[3]  Jin Chen,et al.  Locality aware dynamic load management for massively multiplayer games , 2005, PPoPP.

[4]  Nir Shavit,et al.  Transactional Locking II , 2006, DISC.

[5]  David Eisenstat,et al.  Lowering the Overhead of Nonblocking Software Transactional Memory , 2006 .

[6]  L. Chew,et al.  Using Transactions in Delaunay Mesh Generation , 2006 .

[7]  Torvald Riegel,et al.  Time-based transactional memory with scalable time bases , 2007, SPAA '07.

[8]  Bratin Saha,et al.  McRT-STM: a high performance software transactional memory system for a multi-core runtime , 2006, PPoPP '06.

[9]  Angelos Bilas,et al.  Parallelization and performance of interactive multiplayer game servers , 2004, 18th International Parallel and Distributed Processing Symposium, 2004. Proceedings..

[10]  Eduard Ayguadé,et al.  QuakeTM: parallelizing a complex sequential application using transactional memory , 2009, ICS.

[11]  Eduard Ayguadé,et al.  Atomic quake: using transactional memory in an interactive multiplayer game server , 2009, PPoPP '09.

[12]  Rachid Guerraoui,et al.  Stretching transactional memory , 2009, PLDI '09.

[13]  Sugih Jamin,et al.  An Efficient Synchronization Mechanism for Mirrored Game Architectures , 2002, NetGames '02.

[14]  Rachid Guerraoui,et al.  Dividing Transactional Memories by Zero , 2008 .

[15]  Michael F. Spear,et al.  Delaunay Triangulation with Transactions and Barriers , 2007, 2007 IEEE 10th International Symposium on Workload Characterization.

[16]  David A. Bader,et al.  An efficient transactional memory algorithm for computing minimum spanning forest of sparse graphs , 2009, PPoPP '09.

[17]  Angelos Bilas,et al.  Behavior and Performance of Interactive Multi-Player Game Servers , 2004, Cluster Computing.

[18]  Torvald Riegel,et al.  A Lazy Snapshot Algorithm with Eager Validation , 2006, DISC.

[19]  Adam Welc,et al.  Design and implementation of transactional constructs for C/C++ , 2008, OOPSLA '08.

[20]  Rynson W. H. Lau,et al.  A multi-server architecture for distributed virtual walkthrough , 2002, VRST '02.

[21]  Michael F. Spear,et al.  Conflict Detection and Validation Strategies for Software Transactional Memory , 2006, DISC.