Saturday, June 2, 2012

Limiting The Resource Use

Resuming from where I stopped yesterday, I started by looking how to limit the resource use.


Yes, I can limit it, but the ultimate goal of this project is to measure the resource use. So it is always better to have something that can do my prime goal. So I needed to know whether I can get any information about the current state of MAX_QUERIES_PER_HOUR, MAX_UPDATES_PER_HOUR, MAX_CONNECTIONS_PER_HOUR, MAX_USER_CONNECTIONS variables.

I checked in MYSQL metadata schema(information_schema, performance_schema)

If mySQL can limit it, it should have a count somewhere right?. That was how I thought, so I started looking through some default schema like information_schema, performance_schema, etc. Sorry to say that I found nothing. But still I think it should save this data somewhere.

Limiting the database size (MySQL Quota Daemon)

I went though that library I found last day (MySQL Quota Daemon : and it is a good tool (it requires perl). Another very small piece of code for doing the same thing was MySQL Quota-Tool (

My First Suggestion

Here we thought of measuring(limiting) the DataBase use under two methods.

1. By I/O requests per unit time
2. By Storage used per unit time

We can partition different levels of packages by the size of the database(e.g. 200GB, 40BG, etc..)
Each of them will have a default I/O rate that will be well enough for a small or medium user to work with. There pricing will be based on only DB size. If a user exceeds hourly rate of I/O requests (number of I/O request in the past hour ending with the currunt time) he will be stopped from doing feather queries. In such situations, user will be able to do his request agin shortly as the first few requests in the last hour will exit the time window (of one hour)

For Larger Companies who wants to have a higher or unlimited I/O requests can select there palns accordingly by paying a extra fee. At the same time if the custome need a temporary increase in I/O rate it can be done again for an extra payment.

Customer will be allowed to change his size of the database to the next level with a request.

No comments:

Post a Comment