Posts in category ‘Benchmarks’.
The Cost of SQL - First Measurements
There are the preliminary benchmarks comparing different DB backends. I've measured pages per second ratio for fetching different pages from the blog that includes 5,000 articles and 50,000 comments to them. The client and the server had run on the same PC.
The settings and the database is the same that is used in this article.
Backend gzip no-gzip gzip no-gzip %
------------------------------------------------
Berkeley DB 565 830 N/A N/A
MySQL InnoDB 475 645 -16% -22%
Sqlite3 410 515 -27% -38%
PostgreSQL 305 360 -46% -57%
We can see:
- There is not negligible cost of using SQL Data Bases. However the price is not too high with fast data bases like MySQL.
- PostgreSQL had badly surprised me with its real performance. Maybe I'm doing something wrong?
BDB or not BDB - that is the question...
At the beginning of the project I had several options for president storage for CppCMS:
- Use standard SQL databases like MySQL, PostgreSQL.
- Use embedded SQL data base like Sqlite3
- Use Berkeley DB
- Implement my own storage model.
At the beginning I wanted to use MySQL. At certain point I decided to switch to Berkeley DB, and now I come back to the original question: "what data storage to use?"
In order to make a proper design I had run lots of micro benchmarks and finally I had chosen Berkeley DB. However I never used queries from real DB. And now, when I had implemented a simple blog I decided to run benchmarks on the situation that is closer to real one.
I had reimplemented an operation of fetching single post using MySQL and imported the database that included 5000 articles with 10 comments each one and tested.
more...Benchmarks, First Results
Updated 28/12/07, 17:00
In order to show that all the time I had spend on this system wasn't wasted I had run a simple benchmark tests on following setup:
Server
- Hardware: AMD Athlon XP 3000+ 64 bit, 1GB RAM.
- OS: Debian Etch 64 bit.
- Web server: Lighttpd 1.4.13
- CMS: This blog software, configured with 5 working threads.
- Data base of 85MB: 5,000 articles with 10 comments to each one.
Network devices
- 100Mbit network cards
- Edimax $75 home router
Client
- Hardware: Dell Latitude C400, PIII 750MHz, 256MB RAM
- OS: Debian Etch 32 bit