Benchmarking Postgre. SQL vs. My. SQL performance using Drupal 5.
Inc. Drupal has long supported both My. SQL and Postgre. SQL as database backends. The vast majority of Drupal users run it on My. SQL though. Support for Postgre. SQL in Drupal has suffered from non- contiguous maintainership, with someone taking it for a year, then disappearing, then someone else comes by and takes it up, .. There has even been concerns among core developers about Postgre.
SQL holding back patches that work fine in My. SQL. Benchmark setup.
![Installing Drupal 6.9 Installing Drupal 6.9](http://www.wpbakeryvisualcomposer.com/wp-content/uploads/2015/11/Composium-Visual-Composer-Extensions-Preview.jpg)
![Installing Drupal 6.9 Installing Drupal 6.9](http://www.unixmen.com/wp-content/uploads/2014/01/Installing-Drupal-Drupal-Mozilla-Firefox_005.jpg)
For the hardware, I used my development server, which is an AMD6. X2 4. 40. 0+ dual core running at 2. GHz, with 2 GB of RAM. This server runs Ubuntu Server 7. Fesity Fawn x. 86_6. My. SQL is 5. 0. 3. Postgre. SQL is 8.
PHP is 5. 2. 1, with APC 3. Drupal setup Drupal is the latest 5. DRUPAL- 5 tagged version from the repository. The setup was a multisite install, so both sites are running from the same code base. One was configured for My. SQL and one for Postgre. SQL. Postgre. SQL configuration.
![Installing Drupal 6.9 Installing Drupal 6.9](http://www.vermilliongov.us/24/index.php-not-loading-312.jpg)
Artisteer - web design generator for Joomla templates, Wordpress themes, Drupal themes, Blogger templates and DNN skins. Veba have a number of headrest and standalone monitors that are packed with features from a 3.5' free standing slimline TFT /LCD monitor, to a headrest mounted 6' version. I need an equivalent of the Unix head command (display the first N lines of the output). This is what I'm using currently: tasklist | find /N ' ' | findstr /r \[[0-9.
Questions regarding upgrading an existing Drupal site. Don't forget to read the UPGRADE.txt that comes with evey Drupal download.
![Installing Drupal 6.9 Installing Drupal 6.9](http://www.linuxtweaks.in/wp-content/uploads/drupal_installing_modules.png)
Setting up a Postgre. SQL database took some digging, but once the steps are figured out, they are fairly simple. First, Postgre. SQL would not start, and complains about the SSL certificate. FATAL: could not load private key file 'server.
![Installing Drupal 6.9 Installing Drupal 6.9](http://pcatr.ru/wp-content/uploads/2013/04/345345434.jpg)
This is caused by the default SSL certficate delivered with Ubuntu is not a valid one. To solve this, just edit /etc/postgresql/8. Now Postgre. SQL will start. No other changes from the default settings provided by Ubuntu are made.
Creating a Postgre. SQL user and database. The steps to create a database in Postgre. SQL are documented in the INSTALL. Drupal. However, I used a slightly different approach, with the same end result. For creating a user and database, assuming we want a user called username and a password of password. DRS username. $ createdb - O username drupal.
ALTER USER USERNAME WITH UNENCRYPTED PASSWORD 'password. Once the database is created, you just stick the following link in settings. Then, you visit install.
Drupal has long supported both MySQL and PostgreSQL as database backends. The vast majority of Drupal users run it on MySQL though. Support for PostgreSQL in Drupal.
Drupal will create the tables for you in the database. Of course, you can use install. My. SQL configuration.
The default configuration supplied with Ubuntu was used. This has the query cache turned on by default. All the tables are My. ISAM. Running the benchmarks.
The benchmark consisted of running two benchmarks using ab on each virtual host. One benchmark was for a concurrency of 1.
The other was with a concurrency of 5. Benchmarking methodology. For setting up data for this test, the devel module's generate functionality was used to create content types pages and stories, with 2. My. SQL results. My.
SQL with Devel module When hitting the front page of the site, the My. SQL site shows this. Page execution time was 6. Executed 9. 8 queries in 1. My. SQL with concurrency of 1. The results are 1.
Server Software: Apache/2. Server Hostname: mysql. Server Port: 8. Document Path: /. Document Length: 1.
Concurrency Level: 1. Time taken for tests: 5. Complete requests: 1. Failed requests: 0. Write errors: 0. Total transferred: 1.
HTML transferred: 1. Requests per second: 1. Time per request: 5. Time per request: 5. Transfer rate: 2. Kbytes/sec] received. Connection Times (ms).
Connect: 0 0 0. Processing: 5. 1 5.
Waiting: 4. 9 5. Total: 5. 1 5.
Percentage of the requests served within a certain time (ms). My. SQL with concurrency of 5. The results are 3. Server Software: Apache/2. Server Hostname: mysql.
Server Port: 8. Document Path: /. Document Length: 1. Concurrency Level: 5. Time taken for tests: 3. Complete requests: 1.
Failed requests: 0. Write errors: 0. Total transferred: 1.
HTML transferred: 1. Requests per second: 3. Time per request: 1. Time per request: 3. Transfer rate: 4. Kbytes/sec] received. Connection Times (ms).
Connect: 0 0 0. Processing: 5. 4 1.
Waiting: 5. 2 1. Total: 5. 4 1. Percentage of the requests served within a certain time (ms).
Postgre. SQL results Postgre. SQL with Devel module When hitting the front page of the site, the Postgre. SQL site shows this. Devel shows: Page execution time was 1. Executed 9. 9 queries in 6. This is more than the 6. My. SQL. The time taken for queries is 6.
My. SQL. Postgre. SQL with concurrency of 1. For a concurrency of 1, Postgre. SQL does 1. 0. 7 requests per second.
Server Software: Apache/2. Server Hostname: postgres. Server Port: 8. Document Path: /. Document Length: 1. Concurrency Level: 1. Time taken for tests: 9.
Complete requests: 1. Failed requests: 0. Write errors: 0. Total transferred: 1. HTML transferred: 1. Requests per second: 1. Time per request: 9.
Time per request: 9. Transfer rate: 1. Kbytes/sec] received. Connection Times (ms). Connect: 0 0 0. Processing: 8. 9 9. Waiting: 8. 7 8.
Total: 8. 9 9. Percentage of the requests served within a certain time (ms). Postgre. SQL with concurrency of 5. For a concurrency of 5, Postgre. SQL can do 1. 2. 8 requests per second.
Server Software: Apache/2. Server Hostname: postgresql. Server Port: 8. Document Path: /. Document Length: 1. Concurrency Level: 5. Time taken for tests: 5.
Complete requests: 1. Failed requests: 0. Write errors: 0.
Total transferred: 1. HTML transferred: 1. Requests per second: 1. Time per request: 2. Time per request: 5. Transfer rate: 2. Kbytes/sec] received.
Connection Times (ms). Connect: 0 0 0. Processing: 1. 17 2. Waiting: 1. 14 2. Total: 1. 17 2.
Percentage of the requests served within a certain time (ms). Summary. The following table shows a summary of the results in a concise form. Database. Total time taken for front page (milliseconds) 6. Time for front page queries (milliseconds)1. Concurrency of 1 (requests per second).
Concurrency of 5 (requests per second). My. SQL's query cache. My. SQL's query cache makes its performance better. This can be demonstrated by restarting My. SQL, then visiting the home page of the site and seeing the query time in devel's output. However this is not as marked as what Postgre.
SQL takes. Right after My. SQL starts (no queries cached yet). Page execution time was 9.
Executed 9. 8 queries in 3. Subsequent access (query cache kicks in). Page execution time was 6. Executed 9. 8 queries in 1. Conclusion. The definite conclusion from these benchmarks is that out of the box, My.
SQL is configured to run faster than Postgre. SQL. Future considerations. Postgre. SQL can probably be made better by further tuning. I am willing to repeat these benchmarks if the Postgre. SQL community are willing to guide me with what parameters need to change in order to make its performance better. Please comment below if you have info on this. Updates. 1. I attached the configuration files used for both My.
SQL and Postgre. SQL for anyone who wants to share configuration options that would tune performance further. You can also see a more tweaked My. SQL My. ISAM configuration file for large web sites for reference (not used for this benchmark).