I hinted at us doing this but I figured it was time to actually show some screen shots of what we’re doing with this. CPU usage is the main thing today that is costing web hosting companies money. The space and bandwidth really account for very little of anything. This is why sites are always being booted for excessive CPU usage. In most cases they’re never close to allocations whether it’s 10GB of bandwidth or unlimited. We will be displaying to users their usage so they know what is using all the CPU and with MySQL the actual CPU used by specific users they made. So they could make a new MySQL user for each PHP script and know exactly which one is taking up all the CPU time.The CPU usage will show up as a click-able icon in their cPanel at launch and will provide various pieces of information. Here is the initial summary page when clicking on the icon:
Ignore the icon that was my test icon it was a MySQL one. The misc CPU on this was is N/A since I never actually tracked anything. The days are also spread out since I was not running the system that collects CPU all the time. So I only tracked two of the days and strictly their MySQL usage at the time. The system provides monthly totals of Misc CPU which includes Perl, Ruby, PHP and anything else that ran as the user. The MySQL CPU is the cpu time used by all mysql users controlled by that user. It will include not only the primary username for example username but also the sub mysql users like say username_wordpress, username_forum etc. etc. You will see the current months totals on the page as well as click-able links to see archived totals from other months. So this is what our initial layout is going to look like on launch but I imagine we’re going to be changing it quite a bit as we go as we receive feedback. You’ll notice the MySQL numbers are actually links right now so if you click on them you’ll be brought to a break down of the month or day. If you click on the monthly total you’ll be brought to a day by day overview. On that page you can then break down the usage by MySQL user which will look like this:
I only included one user in this case as I only had one with CPU usage. It shows the CPU time used by each user during the month of January 2010. So this can be useful in figuring out what is using up all that precious CPU. We can also break down this on the previous pages by clicking a specific day:
So now you can get a daily break down. If you were using a lot of MySQL CPU on a certain day you can see where it’s coming from. Just like the monthly one the test user I took the screen shots with only had one mysql user with usage. It will however break down all the users.
Well this is a quick sample of what our initial launch CPU usage module will display. We’re not going to be setting quotas on the usage or anything of that nature. It’s simply there to show users yes you’re using CPU and here’s where and how much. So it will not come as a big surprise if we’re informing them about excessive CPU usage. The initial version will not include comparisons against everyone else using the service. Later on when we have more users we will most likely provide you with a comparison against the rest of the user base. So you’d probably see the average for the server as well as the average for our entire user base during that same day, month etc.