From: | Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com> |
---|---|
To: | Arvind Singh <arvindps(at)hotmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Improve MMO Game Performance |
Date: | 2012-10-13 13:34:28 |
Message-ID: | CAP_rww=y6EXB8R0=9fyQXLXAdV79d0R8Ds53Za2+TA6t9MK59Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Oct 13, 2012 at 1:52 PM, Arvind Singh <arvindps(at)hotmail(dot)com> wrote:
>
> 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 below 15 insert/s ... not something to worry about, on recent hardware.
> Are there any particular settings or methods available to improve Just
> insert_table operations
- avoid too many unused indexes
- keep your model normalized
- keep pg_xlog on separate device
- follow tuning advices from wiki
http://wiki.postgresql.org/wiki/Performance_Optimization
>
> thanks
> arvind
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2012-10-13 16:18:28 | Re: Improve MMO Game Performance |
Previous Message | Merlin Moncure | 2012-10-13 12:55:22 | Re: moving from MySQL to pgsql |