Forum BigDB Resource usage

Discussion and help relating to the PlayerIO database solution, BigDB.

Resource usage

Postby Magnaro » December 20th, 2010, 12:08 am

I just noticed weird statistics
Resource usage page says
18 Dec 2010 128266 requests 100.01 MB received 22.33 MB sent

and in BIGDB section

128104 saves 128156 loads 0 delete 2 obj count 1.26 kB total object size

My guess is it should be KB not MB,
Earlier I forgot to mentio that my object I was saving/loading has about 1600 bytes, but I was changing only 2 fields in it,
but the bandwidth usage suggest that entire object was saved/loaded after each update, while in my opinion only delta packet should be generated.


anybody had similiar thing happen?
Cheers
Magnaro
 
Posts: 5
Joined: May 3rd, 2010, 3:53 pm

Re: Resource usage

Postby Oliver » December 20th, 2010, 1:31 pm

Each request to the webservice has http overhead, so if you're doing a lot of changes, even if they're tiny, then the overhead will count up to use more bandwidth than the initial load.

Does that answer your question?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Resource usage

Postby Magnaro » December 20th, 2010, 2:34 pm

Hmm,
please correct me if I'm wrong but:
let's say I got a game with
50 rooms
each got
40 users inside

thay are flying around and constantly updating their position in game space
let's assume it's one update each second (it'll be more in most real time games)
even if I'm changing two INT fields, 1200 bytes are pushed

so each player sends 1x 1200 bytes, then server sends 39 x 1200 bytes,
48 000 bytes
for each of 50 rooms
2 400 000 bytes

so Plus plan 100 000 000 000 bytes will last for:
41666 sec
694 minutes
11 hours

and Pro plan 500 000 000 000 bytes will last for:
55 hours

Please tell me where am I calculating wrong?
Magnaro
 
Posts: 5
Joined: May 3rd, 2010, 3:53 pm

Re: Resource usage

Postby Oliver » December 20th, 2010, 4:29 pm

Can you post a screenshot of your resource usage page? I'm confused whether you're talking about server-to-client bandwidth usage or webservice bandwidth (from server or client).

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Resource usage

Postby Magnaro » December 20th, 2010, 4:54 pm

here's the shot
Image

only BigDB was used
Magnaro
 
Posts: 5
Joined: May 3rd, 2010, 3:53 pm

Re: Resource usage

Postby Oliver » December 27th, 2010, 4:59 pm

Hi,

couple of things:

The various plans (pro, plus, enterprise) are not limited: some traffic is included, and then after you've used all that, there is a price pr gigabyte...

You've made 132K webrequest requests, and you're wondering why that uses 130mb? That's ~1kb pr request which sounds reasonable to me when you include http overhead and all the calls that aren't bigdb: connect(), listrooms etc...

If you're building a space shooter, you're also doing it wrong if you constantly store X,Y positions in BigDB. Load them when useres enter a room, and save them when they leave the room and use the multiplayer .Send(...) methods to send data between clients and the server...

- oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Resource usage

Postby Magnaro » December 27th, 2010, 10:50 pm

Well, i know using BigDB is wrong, i'm kind of testing it now, can you please explain the difference between saving to BigDB and using multiplayer .Send() from traffic usage perspective.
The situation is:

Player changes x,y
1. he .Send() message to server, and server relays update to other players.
2. he saves in BigDB and server sends updates to all subscribers (other players in this case)

Where's the difference?

Cheers
Magnaro
 
Posts: 5
Joined: May 3rd, 2010, 3:53 pm

Re: Resource usage

Postby TobiasW » December 27th, 2010, 11:37 pm

Magnaro wrote:Player changes x,y
1. he .Send() message to server, and server relays update to other players.
2. he saves in BigDB and server sends updates to all subscribers (other players in this case)

Where's the difference?


Assume 5 players.
1. Case: Player sends 1 message to server, server send 4 messages. Done.
2. Case: Player sends 1 message to server, server makes one BigDB save and sends 4 "update" messages. Each of the clients then makes one BigDB query, and the BigDB has to answer every single of them. So 14 messages/querys in total.

Not to mention performance problems from the unecessary BigDB roundtrip...
User avatar
TobiasW
 
Posts: 59
Joined: August 29th, 2010, 12:31 am


Return to BigDB