Re: Game Server Lags

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Arvind Singh <arvindps(at)hotmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Game Server Lags
Date: 2012-10-02 14:16:22
Message-ID: 506AF736.2060904@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/02/2012 10:02 PM, Arvind Singh wrote:
> we are all aware of the popular trend of MMO games. where players face
> each other live.
> My questions are focussed on reducing load on Game database or Sql queries

In most cases the answer is the same as for any other bursty
application: Cache aggressively in the layers between the app front end
and the database. memcached is a popular choice.

For really harsh environments use dynamically scaling clusters where you
start up new replicas as load goes up, and stop them when load goes down
again.

> a) How to control the surge of records into the GameProgress table. so
> that players get response quicker. The Server starts to lag at peak
> hours or when 1000 players are online

Some combination of async commit, commit delay, etc depending on how
critical the data is.

> b) How often should we run vaccum full of postgres .

On any modern version you shouldn't need to. Turn autovacuum up so it
runs very aggressively and let it do the work.

> c) can we set a table to be present in some kind of cache or quick
> buffer for quicker access, for ex. we often have to authenticate user
> credentials or lookup tournament status in Table

Use a front-end cache like memcached.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2012-10-02 14:24:58 Re: Game Server Lags
Previous Message Arvind Singh 2012-10-02 14:02:12 Game Server Lags