Requests per second highly improved
Hi,
first a list of the current requests per second all benchmarked on my personal pc:
PHPBB : 100 requests per second
paFileDB : 1200 requests per second
MageDB : 2000 requests per second
MageDB without MySQL : 2600 requests per second
Clean php file with only ‘hello world!’ : 3800 requests per second
Clean html file with only hello world : 6000 requests per second
Oke, now what is all of this? First look at the clean php and html ones. Clean html file means just 1 line of text and that’s able to get 6000 requests per second on my pc. That benchmark is quite useless for comparision. The interesting one is a clean php file with 3800 requests per second. That means that my pc can have 3800 requests per second MAX with php. The lighter MageDB is the more requests per second it can handle. What i’m doing right now in MageDB is caching every object i make in APC and retreive that one from the APC cache next time a visitor looks at MageDB. With this technique the requests per second shoot up from roughly 1400 to 1600 which is already quite impressive. now to get more requests per second i took a close look at one of the biggest request sucking piece: Dwoo. That one took 600 request with my last blogpost. In Dwoo i noticed i added a Compiler class while it wasn’t even needed. That one class sucked up ~150 requests per second. Disabling that one meand my 1600 went up to roughly 1750 requests per second. Then i had found a bug in Dwoo that caused a lot of stat calls and most of them with “no such file or directory’ so i fixed that one up which improved the requests per second by another rough 100 resulting in 1850 requests per seond. Add to that a cached category lookup system that fetches his category data from APC and doesn’t need to recalculate everything all the time which added yet another requests per second boost of 150 resulting in 2000 requests per second! that’s really fast!. Then i want to investigate a little to see the next big request sucker. That one was surprisingly MySQLi. It takes up 600 requests per second! So by now so much was cached that a query wasn’t even needed anymore so i disabled MySQLi in MageDB for a minute to see how fast it would be. And that was a major boost of 600 requests per second resulting in 2600 requests per second for MageDB. The big issue i have right now is that MySQLi doesn’t have to be included always when the requested data is in the cache but in other cases a few queries will have to be done. So i need to find a way to include MySQL when there is a need for MySQL. If that’s implemented and working then those 600 requests that MySQL takes will be wasted a lot less. Now i ofcourse can’t cache every single thing since a database in MageDB could contain thousands of files thus looking at a file will probably still be a query call but the very main page of MageDB is going to be extremely fast for PHP to parse and that will probably keep your host happy ^_^.
Please note that 2600 requests per second like at this moment for MageDB is extremely fast and is only possible in the most optimal condition. In reality it’s more likely that you get between 1500 and 2000 requests per second which is still 15 – 20 times faster then phpbb.
I also still have to make a caching abstraction to allow you to choose how you want to cache:
- MySQL
- File
- APC
- Memcached
where File based caching will probably be the default one. And in that case i will probably put as much information in one cache file as possible. Another possibility is File caching by default but as soon as the file is loaded in the memory it will be memcached for as long as possible and then just reloaded from the file once the memcached session has expired.
That’s it for now. More stuff will come probably later this week,
Mark.

Not having a budget can destroy your plans to get out of debt. If you’re not already in debt, the lack of a budget will get you there. In the basic sense, a budget is just a plan for saving and spending your money.
Why is a budget so important for debt management?
Imagine taking a roadtrip across the country without a map or compass. Sure, you might get there after many detours, turn-arounds, and delays. Or you could get a roadmap, map out your trip, and get there with a lot less trouble.
It’s the same way with managing debt. You could successfully get out of debt without a budget, but how long would it take and how much would it cost you. Instead, living out a budget will make getting out of debt much easier.
A budget will help you figure out exactly how much you can afford to spend to get out of debt. Not only that, it helps you figure out where to squeeze more money from your debt.
Once your debt’s paid off, a budget can help you keep your finances on track to keep you from getting back into debt. A budget will help keep your spending under control so you don’t have to rely on loans to make ends meet.
You can learn how to manage your debt at [url=http://www.comprehensivedebtmanagement.co.uk]Debt Advice[/url]
Gday.
Did you ever think about starting your own blog? There are many great platforms, but by far the best is WordPress. It is easy to set up, however the themes just never fit my needs. I searched for a simple solution to this problem and realized that there wasn’t one. I then had a template custom made for my needs and was so happy with the outcome. I then decided to build a website that would show the world how to simply hire an expert in wordpress design.
[url=http://hirewordpressexperts.com/]Custom WordPress Theme[/url]