PDA

View Full Version : Question for the staff: MySQL Usage Monitoring?


omatic
3-14-03, 11:31 PM
Hello Admins & All,

Although I can't find the thread now (unfortunately), I could have sworn Starr or James or Lex (or somebody!) indicated that Powweb's developers are working on a way to monitor your actual mySQL DB usage. For example, something new in ops that says how many queries & connections you have been averaging over a given time period, indicate what time your next 'quota reset' will occur, etc.

I would LOVE to see this added... In fact, I consider it essential! I have not yet had the mySQL caps problems that other have (I'm using phpBB2) but I remain on pins-and-needles because I have no way to know when excessive usage is imminent.

I have run tests here at my home, using a local replication of my board and my mySQL db. My tests indicate that once my board grows, I could potentially approach the limits. But to keep bad things from happening, I really, REALLY need a way to accurately monitor my real-world usage.

So whaddya say, guys? Are "mySQL usage stats" something you still intend to provide, or was it all a beautiful dream I had? ;)

Regards,
omatic

Atomic-Design
3-14-03, 11:49 PM
A MySQL Usage Monitor would be great. omatic, do you have any ideas on how to install a PHP script on your server that would monitor that? If you have any ideas on if/how we'd do it, I'd be glad to maybe get a script going to monitor until PowWeb considers it.

mjp
3-14-03, 11:51 PM
James said:

"When mysql 4.1 is released they will have completed their documentation on these things so we will know for sure... I am also hoping they shed some light on how users can monitor their usage as well."

If documentation is forthcoming on monitoring per-user, and it's feasible to integrate it into OPS, I would assume we will do so. But, of course, I don't want to put words into any admin's mouth...that will only get me into trouble around here. ;)

mjp

omatic
3-15-03, 12:06 AM
Originally posted by Atomic-Design
A MySQL Usage Monitor would be great. omatic, do you have any ideas on how to install a PHP script on your server that would monitor that?Unfortunately, no. I'm pretty new at installing Apache... I know enough about it to get it up & configured safely behind a firewall, that's about all.

But then, if this were easy, I guess they'd have done it already!
omatic

HalfaBee
3-15-03, 12:47 AM
I think the only way to monitor the connections and queries is to do it yourself.
From the other thread there appears to be no way for anyone to monitor the stats.

I modified one script for a site that is a traffic exchange to do just that.
It basically rotated the users and inserted a row every time a connection was made .
Then a little script to find out how many hits in the last hour.
Probably a bit wasteful of mysql resources but it showed that the 3600 limit was no where near reached even though the site was shutdown for 10 days.
I will have to add a function to delete the useless rows after some period, but I am not too worried at the moment.

Lets hope the 4.1 documentation exposes a simple mysql solution to this problem.

HalfaBee

omatic
3-15-03, 01:45 AM
Originally posted by HalfaBee
I think the only way to monitor the connections and queries is to do it yourself.
From the other thread there appears to be no way for anyone to monitor the stats. No way YET... but that's precisely what I'm requesting that Powweb offer its mySQL users.

After all, if it can be capped, it can be monitored, right? (well, technically, maybe not, if there's no way to obtain the metrics from the mySQL daemon... but I'm sure that mySQL AB has **got** to have that in the release version).

Grizzled yet grinning,
omatic