Top Banner
QUAKEWORLD: REAL-TIME LOAD BALANCING James Munro & Dr. Patrick Dickinson University of Lincoln EUROSIS GAME-ON 2010 17 th – 19 th November
14

Real-Time Load Balancing of an Interactive Mutliplayer Game Server

Nov 22, 2014

Download

Technology

James Munro

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

QUAKEWORLD: REAL-TIME LOAD BALANCING

James Munro & Dr. Patrick DickinsonUniversity of Lincoln

EUROSIS GAME-ON 201017th – 19th November

Page 2: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

INTRODUCTION

Parallel/multi-threaded programming: Emerging trend of game development. Crucial to leverage power of modern

hardware. Can be difficult: we’re still learning!

Two approaches in research: Client-side (directly effects end-user). Server-side (indirectly effects end-user).

Page 3: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

AN EXISTING SYSTEM

Multi-threaded QuakeWorld: Exploits COW semantics of Linux kernel. Entity pre-processing allows lockless

execution. Dynamic load balancing strategy. Improved performance over previous work.

We used this as the starting point for our work.

Cordeiroet al

Page 4: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

PARALLEL QUAKEWORLD FRAME

Update world state

Wait for client input

Entity pre-processing

Load balancing

Launch child

threads

Process client

requests (parallel)

Send responses (parallel)

Synchronise with main

thread

We’re mostly interested in this step

Page 5: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

EXPERIMENTAL SETUP

Seven quad-core PCs. One server (32-bit Linux). Six clients (32-bit Windows).

Using headless automated player “bot”. Up to 32 bots per-machine.

Four load balancing algorithms: Longest Processing Time First (LPTF) – good performance. Shortest Processing Time First (SPTF) – worse performance. Round-Robin (RR) - unsure. Sorted Round-Robin (SRR) - unsure.

Page 6: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

METRICS / INITIAL RESULTS

We use the following set of metrics: FPS. Workload distribution. Server throughput. Intra-frame wait time.

Performed an initial benchmark: Serial, 2, 3, 4 threads. Discovered that 4 threads is best. Cordeiro et al needed to consider further metrics. Had to artificially limit performance due to bandwidth. Uncapped, could support 400-600 players.

Page 7: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

WORKLOAD DISTRIBUTION (LPTF)

1 2 3 40

200,000

400,000

600,000

800,000

1,000,000

1,200,000

1,400,000

Thread ID

Accu

mu

late

d W

ork

gro

up

W

eig

ht

Page 8: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

WORKLOAD DISTRIBUTION (SPTF)

1 2 3 40

200,000

400,000

600,000

800,000

1,000,000

1,200,000

1,400,000

Thread ID

Accu

mu

late

d W

ork

gro

up

W

eig

ht

Page 9: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

WORKLOAD DISTRIBUTION (RR)

1 2 3 40

200,000

400,000

600,000

800,000

1,000,000

1,200,000

1,400,000

Thread ID

Accu

mu

late

d W

ork

gro

up

W

eig

ht

Page 10: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

WORKLOAD DISTRIBUTION (SRR)

1 2 3 40

200,000

400,000

600,000

800,000

1,000,000

1,200,000

1,400,000

Thread ID

Accu

mu

late

d W

ork

gro

up

W

eig

ht

Page 11: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

SERVER THROUGHPUT – ALL ALGORITHMS

96 112 128 144 160 1762,750

3,250

3,750

4,250

4,750

5,250

LPTFSPTFRRSRR

Number of Clients

Th

rou

gh

pu

t (R

PP

/s)

Page 12: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

IFWT– ALL ALGORITHMS

96 112 128 144 160 1760

0.5

1

1.5

2

2.5

3

3.5

4

LPTFSPTFRRSRR

Number of Clients

Wait

Tim

e (

ms)

Page 13: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

STANDARD DEVIATION (LPTF, SPTF, SRR)

1 2 3 40

2

4

6

8

10

12

14

LPTFSPTFSRR

Thread ID

Std

.Dev o

f P

rocessed

En

tity

G

rou

ps

Page 14: Real-Time Load Balancing of an Interactive Mutliplayer Game Server

CONCLUSIONS

Concurrency will be crucial in game development.

A full set of metrics is required to quantify performance.

Best load balance is a trade-off: Consistently producing a decent

distribution. Reducing IFWT, less time spent waiting.