Home  >  Article  >  Database  >  Drupal7的Field Storage性能测试报告(译)

Drupal7的Field Storage性能测试报告(译)

WBOY
WBOYOriginal
2016-06-07 16:37:131399browse

本篇是关于Drupal7下Field Storage的测试结果,以及不同情况下对 drupal 性能的影响,主要是MySQL和MongoDB以及在调优参数情况和不调优情况下的对比。 本篇翻译自 《Field Storage Tests with Drupal 7》 链接地址: http://posulliv.github.io/2013/01/07/b

本篇是关于Drupal7下Field Storage的测试结果,以及不同情况下对drupal性能的影响,主要是MySQL和MongoDB以及在调优参数情况和不调优情况下的对比。
本篇翻译自 《Field Storage Tests with Drupal 7》
链接地址: http://posulliv.github.io/2013/01/07/bench-field-storage/

测试环境

EC2 EBS backed Large instance (8GB of memory) in the US-EAST availability zone
Ubuntu 12.04 (ami-fd20ad94 as listed in official ubuntu AMI’s)
MySQL 5.5.28
PostgreSQL 9.2
MongoDB 2.0.4
Drupal 7.17
Drush 5.1
Migrate 2.5

测试的case是分别对MySQL和PostgreSQL进行调优和没有调优,以及配合MongoDB下进行的,具体的优化参数这里先列举一下。

MySQL的优化参数如下:

innodb_flush_log_at_trx_commit=0
innodb_doublewrite=0
log-bin=0
innodb_support_xa=0
innodb_buffer_pool_size=6G
innodb_log_file_size=512M

PostgreSQL的优化参数如下:

fsync = off
synchronous_commit = off
wal_writer_delay = 10000ms
wal_buffers = 16MB
checkpoint_segments = 64
shared_buffers = 6GB

测试数据集(Dataset)

测试数据集来自于migrate_example_baseball,现在已经是migrate模块(Drupal官网地址: http://www.drupal.org/project/migrate)的一部分了,这些数据包括了美国职业棒球大联盟2000到2009年的数据,每年的数据在一个CSV文件里面。

测试结果

测试环境 平均吞吐率
Default MySQL 1932 nodes / minute
Default PostgreSQL 1649 nodes / minute
Tuned MySQL 3024 nodes / minute
Tuned PostgreSQL 1772 nodes / minute
Default MySQL with MongoDB 4609 nodes / minute
Default PostgreSQL with MongoDB 4810 nodes / minute
Tuned MySQL with MongoDB 7671 nodes / minute
Tuned PostgreSQL with MongoDB 5911 nodes / minute

Drupal 7 Field Storage Test

结论

一目了然,结果自然不必说,MongoDB的性能肯定比默认数据库的Field Storage要好很多,优化过的数据库肯定比没有优化过的数据库性能要好很多。
不过比较有意思的是,PostgreSQL的测试数据,我们发现,在Drupal7的Field Storage机制里,每个字段都会新建表的机制,对PostgreSQL的影响还是非常大的。因此,用不用MongoDB,对PostgreSQL数据库的影响更大一些。

接下一篇关于Field Storage的测试,请点击查看:
《Drupal7 Field Storage性能之Field SQL Norevisions》

其他问题,请到Drupal大学提问 >

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn