|
-
Jul 30th, 2011, 09:48 AM
#3
Re: Connecting to SQL mdf file without requiring SQL Server installed
I don't think it's bad database design. There is simply a lot of data being gathered. The application reads the log file from a first person shooter game, which lists all kinds of things such as players taking damage, getting killed, what people are saying, etc. I am storing all of these events. For example, when a player takes damage, I store this in a 'Damage' table that lists the ID of the shooting player, the ID of the receiving player, the ID of the weapon used, the amount of damage dealt, the location of the hit (head, arm, body, etc) and finally the map and gametype on which it happened. The end goal is to get detailed statistics about each player, which they can they view ingame. One could then see the top 5 of their best weapons (most damage dealt, most kills made, etc), the number of kills they made with a certain weapon, etc.
With roughly 10 kills per player per game, 4 hits per kill and 15 players per server, that is already about 50 records per player per game, or 750 records per game. A game takes 5-10 minutes, you do the math...
Then I'm not even counting that I also store the details of each player that ever joined the server (for the one test server I am running at the moment, there were about 11.000 different players in 1.5 month!)
If 10GB is the max for SQL Server then yeah, that might be a problem... Still, 2GB per month is probably an overestimate, but say 1GB is still a lot, that would mean only 9-10 months of running time is possible... That's not TOO bad (in 9-10 months not many people will still be playing this game, and people can of course clear their database if they want to).
EDIT
I quickly recalculated what I did before, roughly, and it's something like this:
Assuming a game server has players for about 18 hours per day (at night it will mostly be empty, but there might be players in other timezones).
If a game takes 10 minutes on average, that is 18*60 / 10 = 108 games per day.
With an average of 15 players, each getting 10 kills, that is 150 kills per game. Each kill means 5 records in the database (4 because it takes 4 hits on average for a kill, and 1 for the actual kill), so we have 150*5 = 750 records per game.
With 108 games per day, that boils down to 108*750 = 81.000 records per day, or 2.430.000 records per month.
I am not even counting the player details themselves which I also store. Of course some players will already exist in the database so not every player is a new record, but assuming 50% are new players we have 15*108 * 50% = an additional 810 records per day or 259.200 records per month.
Let's assume this is already an overestimate, and that we have 2.000.000 new records per month. If my estimate of 2GB per month is correct that would be about 1KB per record. I'm not sure how accurate that is but it sounds reasonable, no?
Last edited by NickThissen; Jul 30th, 2011 at 09:58 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|