MageDB (current pre alpha) VS paFileDB 3.6 (latest)

Hey,

I was just wondering how MageDB would perform in requests compared with paFileDB in the ab (apache benchmark) test.
The line i used to benchmark it was (on linux): ab -k -n 10000 -c 25 FULL_URL

And this is the resultset that got returned:

MageDB
Server Software:        Apache/2.2.6
Server Hostname:        magedb.mage.nl
Server Port:            80

Document Path:          /index.php
Document Length:        9153 bytes

Concurrency Level:      25
Time taken for tests:   20.304753 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      93249324 bytes
HTML transferred:       91539153 bytes
Requests per second:    492.50 [#/sec] (mean)
Time per request:       50.762 [ms] (mean)
Time per request:       2.030 [ms] (mean, across all concurrent requests)
Transfer rate:          4484.81 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    1   4.9      0      53
Processing:     6   48  12.9     48     166
Waiting:        0   43  12.0     44     144
Total:         11   50  13.2     49     166

Percentage of the requests served within a certain time (ms)
50%     49
66%     54
75%     57
80%     60
90%     66
95%     72
98%     80
99%     86
100%    166 (longest request)

paFileDB
Server Software:        Apache/2.2.6
Server Hostname:        pafiledb.mage.nl
Server Port:            80

Document Path:          /index.php
Document Length:        2808 bytes

Concurrency Level:      25
Time taken for tests:   26.865887 seconds
Complete requests:      10000
Failed requests:        939
(Connect: 0, Length: 939, Exceptions: 0)
Write errors:           0
Keep-Alive requests:    9921
Total transferred:      30375321 bytes
HTML transferred:       28078949 bytes
Requests per second:    372.22 [#/sec] (mean)
Time per request:       67.165 [ms] (mean)
Time per request:       2.687 [ms] (mean, across all concurrent requests)
Transfer rate:          1104.11 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       4
Processing:     4   66  22.3     65     434
Waiting:        0   66  22.2     65     434
Total:          4   66  22.4     65     436

Percentage of the requests served within a certain time (ms)
50%     65
66%     70
75%     75
80%     78
90%     85
95%     89
98%     95
99%    101
100%    436 (longest request)

Now both databases where about empty. The MageDB database had a few entries and the paFileDB db had 0 entries.
I think this clearly gives a picture how MageDB will scale on a website. The requests that can be handled by apache if magedb was run: 492 and for pafiledb it’s 372. Now a simple calculation:
492 / 372 = 1.32 which is 132% which is a 32% performance improvement compared to paFileDB.
It actually means that MageDB performs about 32% better/faster than paFileDB.

And i’ve also benched the following 2:
phpMyAdmin:      160 req/sec (which is what i expected of that slow script)
phpBB RC7:        20 req/sec (i would have expected more from phpbb)
phpBB RC7:        39 req/sec (this is with GZip Compression)

Now i’m kinda shocked by those numbers. i did expect MageDB to be faster than paFileDB but i wasn’t expectingthose low request numbers of both scripts. I’ve also run a benchmark on a basic html and a basic php page that both only display: “Hello World!” and that turned out that html only was able to get about 10000 request/second (which is 2000% better than MageDB) and the php benchmark was about 7000 requests/second (which is still 1400% better than MageDB). And that’s what was bothering me. So that means that both php scripts are still very inefficient. My goal is to get MageDB to be able to get about 2000 requests/second on my computer (all benchmarks are from my computer) and i believe that’s possible. 2000 request means that it:
 - Over 4 times better performing than the current MageDB alpha
 - Over 5 times better performing than the current pafileDB 3.6

I’m also amayzed that paFileDB (for a finished and proven script) performs so bad! It looks like there biggest advantage (template system) is not working out as a performance advantage. MageDB has about the same issue but is just lighter in general.

Now you might find those numbers interesting. But here is what is really interesting for you.
If can manage to get those request numbers up the way i want it than it means the following for you (all compared to paFileDB) :o
- Your apache server can handle more requests
- You will be less likely to get a message of your host that indicates that your using up too much cpu resources
- The page will be generated faster
- IF output buffer compressing (php.ini setting) is turned on than it will “download faster” (the download is just smaller than)
- if your site has 2000 requests a second it means that either a lot just get ignored because apache can only do 372 with pafiledb or that you need about 6 servers just to serve the pages. with MageDB all the requests would be completed (no losses) on just 1 server
- It’s really could save you money

a lot of advantages. and i can’t think of any disadvantages at this moment.
Seems like i have a lot of improvements to do!

That’s it for now,
Mark.

Posted in MageDB.

One Response to “MageDB (current pre alpha) VS paFileDB 3.6 (latest)”

  1. jid Says:

    hi
    where i can download MageDB??

Leave a Reply