Re: Improve MMO Game Performance - Mailing list pgsql-general

From Arvind Singh
Subject Re: Improve MMO Game Performance
Date
Msg-id BLU164-W3AE83419CD1F2270C0D08CA720@phx.gbl
Whole thread Raw
In response to Re: Improve MMO Game Performance  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
Oh no, it is average. I am sorry , i did not mention that Average was calculated PeakUsage+MinimumUsage/PeriodOfUsage

 
it is not that 500 users are always per hour,
 
in real game scenario there are peak times within a hour, so it means  there can be  500 users making simultaneous move,
and there could be a surge of 500 inserts in an instant , and if there are 4000 users logged in the figure could be 4000 inserts in a millisecond.  and at LowTide when there are 100 users, the number could be as low as 10 insert / ms
 
thanks
 
> Date: Sat, 13 Oct 2012 10:18:28 -0600
> Subject: Re: [GENERAL] Improve MMO Game Performance
> From: scott.marlowe@gmail.com
> To: arvindps@hotmail.com
> CC: pgsql-general@postgresql.org; laurenz.albe@wien.gv.at
>
> On Sat, Oct 13, 2012 at 5:52 AM, Arvind Singh <arvindps@hotmail.com> wrote:
> > we are all aware of the popular trend of MMO games. where players face each
> > other live.
> >
> > My area of concern, is storage of player moves and game results.
> > Using Csharp and PostgreSql
> > The game client is browser based ASP.NET and calls Csharp functions for all
> > database related processing
> >
> >
> > To understand my query, please consider the following scenario
> > we store game progress in a postgres table.
> > A tournament starts with four players and following activity
> >
> > Each player starts with 100hitpoints
> > player 1 makes a strike (we refer to a chart to convert blows to hitpoints
> > with random-range %)
> > player 2 has 92HP, and returns a light blow, so player1 has 98hp
> >
> > The above two round will now be in Game Progress Table, as
> >
> > ROW Player1HP Player2HP Strikefrom StrikeTo ReturnStrikeHP Round TimeStamp
> > StrikeMethod
> > 1 100 100 0 0 0 0
> > 2 98 92 P1 P2 2 1
> >
> > There is a tremendous flow of sql queries,
> >
> > There are average/minimum 100 tournaments online per 12 minutes or 500
> > players / hour
> > In Game Progress table, We are storing each player move
> > a 12 round tourament of 4 player there can be 48 records
> > plus around same number for spells or special items
> > a total of 96 per tourament or 48000 record inserts per hour (500
> > players/hour)
>
> That's only about 13 inserts per second, and if you're batching them
> up in transactions then you could easily be doing only one insert per
> second or so. My laptop could handle that load easily.

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: database corruption questions
Next
From: Arturo Pie Joa
Date:
Subject: Using incorrect default-value type