MYSQL Server Monitor

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: MYSQL Server Monitor

Post by Jackolantern »

hallsofvallhalla wrote:143k queries? something is wrong....You need more than streamlining. That's 40 queries a second.
It is actually 16 queries per second, as he changed time frames on us (this count was for 2.5 hours). Still, that is crazy.

Is the vast majority of these scripts running crons that only have to run once regardless of one player or 10,000 being logged in? Or will there be that many per player logged in? If it is the former, you still need to find ways to get this number way down. That is just too much to start off with with only one player logged in. If it is the latter, then you will need to replan how your game works.
The indelible lord of tl;dr
User avatar
Ravinos
Posts: 281
Joined: Tue Sep 15, 2009 4:14 pm

Re: MYSQL Server Monitor

Post by Ravinos »

As before it was an old script running in the background of a frame i totally forgot about. It was causing most of the damage. I have also noticed a huge speed boost to the game after removing most of the redundant update scripts.
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: MYSQL Server Monitor

Post by Torniquet »

ive jus checked mine (although i dont know whether im doing it right lol... im using the status tab in mysql :D)

over 2 mins

Traffic

{total} - {per hour}

Received { 1kib } - { 1kib }
Sent { 22kib } - { 5kib }
total { 23kib } - { 50kib }

Querys: 37

thats 2 mins of idleness lol. sound about right?
New Site Coming Soon! Stay tuned :D
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: MYSQL Server Monitor

Post by Jackolantern »

Ravinos wrote:As before it was an old script running in the background of a frame i totally forgot about. It was causing most of the damage. I have also noticed a huge speed boost to the game after removing most of the redundant update scripts.
Ahhh. I thought since the 143k was posted after you talked about those scripts that 143k was the new amount after optimization.
The indelible lord of tl;dr
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: MYSQL Server Monitor

Post by Torniquet »

lol :( done one with me moving around the map for 2 minutes :x (which is a ajax script not a complete page refresh)

Traffic
{total} {per hour}
Received {1017} {924}
Sent {1261} {1132}
Total {2278} {2057}

querys

17536

woh... just worked out... if 1000 players are doin tht... its jus over a gig of data transfer a min.... either that or im to tired to be working this crap out lol
New Site Coming Soon! Stay tuned :D
User avatar
Ravinos
Posts: 281
Joined: Tue Sep 15, 2009 4:14 pm

Re: MYSQL Server Monitor

Post by Ravinos »

it's actually a good thing I made this thread....it's eye opening isn't it? :)
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: MYSQL Server Monitor

Post by Torniquet »

no i accually hate you right about now lol... ima have to go through my 100 odd pages of code and see where and if i can accually figure out how to optimize it abit ¬¬

n tbh i really wouldnt know where to begin :s

i mean jesus, that last test was just moving about the map with no page refreshes (and on page refresh it tests a whole lotta stuff before showing the page :lol:)

i am accually fearfull of checking accual page refreshes now lol cuz i know the results int gunna be nice lol. but ima do it anyway for a laugh XD

will post results in a min :x

eh... that dont seem right lol...

changing page and moving about the map for 2 mins...

Traffic
total per hour
Received [538] [312]
Sent [966] [562]
Total [1504] [873]

querys

9019

oh im confused :'(

and my predictions on data transfer on 1st one was completly wrong lol... i forgot to devide it by 60 to get mins lol...

map movement for 2 mins : 34.2 mb/m (per 1000 players)
page refresh and movement for 2 mins : 14.5 mb/m (per 1000 players)

im sure some1 will show me the errors of my ways lol. been up since 5 and not functioning properly XD

ya know... i dont think it would be very easy to run this kinda thing without spendin a pack on a server lol. a game will always have several queries ran, and on a constant basis. so i think no matter what you do... it will still be quite a massive amount of data being transfered
New Site Coming Soon! Stay tuned :D
User avatar
Ravinos
Posts: 281
Joined: Tue Sep 15, 2009 4:14 pm

Re: MYSQL Server Monitor

Post by Ravinos »

Hehe. Torniquet <3 It's a good thing for anyone wanting to put their game live to check this stuff. If I went live before I started checking the optimization and transfer amounts my monthly bandwidth usage would have been 432gigs of transfer and that is if I was idle and the only one doing it....

Right now with the few changes I have done at idle I'm looking at 28.8gigs of transfer per month if I was the only one on.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: MYSQL Server Monitor

Post by Jackolantern »

Hmmm...where is it getting this "query count"? I moved around on my map and checked to see that the actions I performed ran 2 actual written queries in my code. However, the status page said it ran 19 queries. How is it calculating this? I always thought that the estimates of being able to run 6000+ queries per second on even poor servers sounded high, but I guess not if this is what they mean. Heck, the console said that one of those written queries (which is apparently more like 9 queries to PHPMyAdmin) takes 0.001 seconds to run :P

EDIT: I know this is probably not news to a lot of people, but I just realized that PHPMyAdmin is generating a lot of the queries itself. About 10 - 18 of them every time I run the Status page. So I guess short term tests are going to be quite a bit less accurate compared to long term tests which would dilute those queries made by the Status page.
The indelible lord of tl;dr
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: MYSQL Server Monitor

Post by hallsofvallhalla »

yes those are not true queries. If you are not refreshing then you are not running queries. Hence why I always stated that I do not trust any of those numbers including the time to query.
Post Reply

Return to “Advanced Help and Support”