OCZ pci-e revodrive3 240GB & DELL SSD 2.5 SATA 200GB & SAS 2.5 146GB 10K

本文主要目的是测试三种硬盘的PostgreSQL的select, update, insert性能, 反映这三种硬盘的IOPS能力.

这三种硬盘分别是 :

1. OCZ RevoDrive3 PCI-E 240GB
2. DELL SSD 2.5寸 SATA 200GB
3. DELL 10K转 2.5寸 SAS 146GB

同插在一台DELL R610的服务器上.

OCZ硬盘使用请参见 : 

http://blog.163.com/digoal@126/blog/static/1638770402012102613815282/

测试环境 :

CentOS 5.7 x64
PostgreSQL 9.2.1

编译参数 : 

./configure --prefix=/home/ocz/pgsql9.2.1 --with-pgport=9201 --with-perl --with-python --with-tcl --with-openssl --with-pam --without-ldap --with-libxml --with-libxslt --enable-thread-safety --with-wal-blocksize=16 --enable-debug --with-ossp-uuid --with-libs=/opt/uuid-1.6.2/lib

配置文件 : 

ocz@db-172-16-3-150-> cat postgresql.conf|grep -i "^\ *[a-z]"
listen_addresses = '0.0.0.0'            # what IP address(es) to listen on;
port = 9201                             # (change requires restart)
max_connections = 1000                  # (change requires restart)
superuser_reserved_connections = 13     # (change requires restart)
unix_socket_directory = '.'             # (change requires restart)
unix_socket_permissions = 0700          # begin with 0 to use octal notation
tcp_keepalives_idle = 60                # TCP_KEEPIDLE, in seconds;
tcp_keepalives_interval = 10            # TCP_KEEPINTVL, in seconds;
tcp_keepalives_count = 10               # TCP_KEEPCNT;
shared_buffers = 1024MB                 # min 128kB
maintenance_work_mem = 512MB            # min 1MB
max_stack_depth = 8MB                   # min 100kB
shared_preload_libraries = 'pg_stat_statements'         # (change requires restart)
bgwriter_delay = 10ms                   # 10-10000ms between rounds
wal_level = hot_standby                 # minimal, archive, or hot_standby
fsync = on                              # turns forced synchronization on or off
synchronous_commit = on         # synchronization level;
wal_sync_method = open_sync             # the default is the first option
full_page_writes = on                   # recover from partial page writes
wal_buffers = 16384kB                   # min 32kB, -1 sets based on shared_buffers
checkpoint_segments = 128               # in logfile segments, min 1, 16MB each
archive_mode = on               # allows archiving to be done
archive_command = '/bin/date'           # command to use to archive a logfile segment
max_wal_senders = 32            # max number of walsender processes
wal_keep_segments = 256         # in logfile segments, 16MB each; 0 disables
hot_standby = on                        # "on" allows queries during recovery
wal_receiver_status_interval = 1s       # send replies at least this often
hot_standby_feedback = on               # send info from standby to prevent
random_page_cost = 1.0                  # same scale as above
effective_cache_size = 90000MB
log_destination = 'csvlog'              # Valid values are combinations of
logging_collector = on          # Enable capturing of stderr and csvlog
log_directory = 'pg_log'                # directory where log files are written,
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
log_file_mode = 0600                    # creation mode for log files,
log_truncate_on_rotation = on           # If on, an existing log file with the
log_rotation_age = 1d                   # Automatic rotation of logfiles will
log_rotation_size = 10MB                # Automatic rotation of logfiles will
log_checkpoints = on
log_error_verbosity = verbose           # terse, default, or verbose messages
log_timezone = 'PRC'
datestyle = 'iso, mdy'
timezone = 'PRC'
lc_messages = 'C'                       # locale for system error message
lc_monetary = 'C'                       # locale for monetary formatting
lc_numeric = 'C'                        # locale for number formatting
lc_time = 'C'                           # locale for time formatting
default_text_search_config = 'pg_catalog.english'
pg_stat_statements.max = 1000
pg_stat_statements.track = all

测试表 : 

digoal=> create table ocz_test(id int, info text, crt_time timestamp without time zone);

测试数据 : 

digoal=> insert into ocz_test select generate_series(1,10000000),repeat(clock_timestamp()::text, 10),clock_timestamp();
digoal=> alter table ocz_test add constraint ocz_test_pkey primary key (id);

测试函数 : 

测试读取,写入,更新.

digoal=> create or replace function f_ocz_test (i_id int) returns void as $BODY$
declare
begin
perform 1 from ocz_test where id=i_id;
if not found then
  insert into ocz_test (id, info, crt_time) values (i_id, repeat(clock_timestamp()::text, 10), clock_timestamp());
else
  update ocz_test set info=repeat(clock_timestamp()::text, 10), crt_time=clock_timestamp() where id=i_id;
end if;
return;
exception
  when others then
    return;
end;
$BODY$ language plpgsql;

测试脚本 : 

随即取数1到1亿, 超过基础数据, 所以有1/10的机会update, 9/10的机会insert, 100%的机会select.

ocz@db-172-16-3-150-> cat ocz_test.sql
\setrandom id 1 100000000
select f_ocz_test(:id);
ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal

测试方法 : 

关闭RAID write cache, 关闭OCZ write cache. 开启同步提交. 确保测试得出的数据真实的反映硬盘的IO能力.

关闭DELL 服务器上带的raid卡的写cache, 使用 write through : 


 

关闭OCZ 硬盘的写cache.

[root@db-172-16-3-150 ~]# hdparm -W 0 /dev/mapper/mpath1
/dev/mapper/mpath1:
 setting drive write-caching to 0 (off)

OCZ SSD测试结果 : 

1. fdatasync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = fdatasync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 867098
tps = 14450.950285 (including connections establishing)
tps = 14452.524843 (excluding connections establishing)
statement latencies in milliseconds:
        0.002270        \setrandom id 1 100000000
        0.548933        select f_ocz_test(:id);

2. fsync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = fsync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 63334
tps = 1055.390434 (including connections establishing)
tps = 1055.525152 (excluding connections establishing)
statement latencies in milliseconds:
        0.003106        \setrandom id 1 100000000
        7.572679        select f_ocz_test(:id);

3. open_sync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = open_sync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 864942
tps = 14410.387611 (including connections establishing)
tps = 14412.032858 (excluding connections establishing)
statement latencies in milliseconds:
        0.002245        \setrandom id 1 100000000
        0.550355        select f_ocz_test(:id);

DELL SSD 2.5寸 SATA接口 200GB硬盘 : 

数据目录和表空间目录移到DELL SSD硬盘后测试 : 

1. fdatasync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = fdatasync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 41067
tps = 684.307504 (including connections establishing)
tps = 684.386309 (excluding connections establishing)
statement latencies in milliseconds:
        0.003403        \setrandom id 1 100000000
        11.681978       select f_ocz_test(:id);

2. fsync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = fsync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 40289
tps = 671.344007 (including connections establishing)
tps = 671.420270 (excluding connections establishing)
statement latencies in milliseconds:
        0.003300        \setrandom id 1 100000000
        11.907794       select f_ocz_test(:id);

3. open_sync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = open_sync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 41235
tps = 687.096892 (including connections establishing)
tps = 687.180406 (excluding connections establishing)
statement latencies in milliseconds:
        0.003390        \setrandom id 1 100000000
        11.634480       select f_ocz_test(:id);

DELL SAS 2.5寸 SAS接口 146GB 10K转速 机械硬盘 : 

数据目录和表空间目录移到DELL 机械硬盘后测试 : 

1.fdatasync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = fdatasync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 37679
tps = 627.889642 (including connections establishing)
tps = 627.951509 (excluding connections establishing)
statement latencies in milliseconds:
        0.003394        \setrandom id 1 100000000
        12.732292       select f_ocz_test(:id);

2. fsync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = fsync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 9831
tps = 163.736413 (including connections establishing)
tps = 163.759836 (excluding connections establishing)
statement latencies in milliseconds:
        0.003614        \setrandom id 1 100000000
        48.832661       select f_ocz_test(:id);

3. open_sync

wal_sync_method :
wal_level = hot_standby
fsync = on
synchronous_commit = on
wal_sync_method = open_sync

ocz@db-172-16-3-150-> pg_ctl stop -m fast
waiting for server to shut down..... done
server stopped
ocz@db-172-16-3-150-> pg_ctl start
server starting
ocz@db-172-16-3-150-> LOG:  00000: loaded library "pg_stat_statements"
LOCATION:  load_libraries, miscinit.c:1249

ocz@db-172-16-3-150-> pgbench -M prepared -n -f ./ocz_test.sql -r -c 8 -j 8 -T 60 -U digoal digoal
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 8
number of threads: 8
duration: 60 s
number of transactions actually processed: 37707
tps = 628.375098 (including connections establishing)
tps = 628.435232 (excluding connections establishing)
statement latencies in milliseconds:
        0.003443        \setrandom id 1 100000000
        12.722869       select f_ocz_test(:id);

【测试结果对比】

【参考】

1. http://www.amazon.com/Seagate-Pulsar-2-2-5-Inch-Internal-ST100FM0002/dp/tech-data/B0089V4XQO/ref=de_a_smtd

2. http://www.amazon.com/OCZ-RevoDrive-Express-Solid-State/dp/B005F30JBM/ref=sr_1_2?ie=UTF8&qid=1353997791&sr=8-2&keywords=revodrive

3. http://www.seagate.com/internal-hard-drives/solid-state-hybrid/pulsar-solid-state-drives/specs/#

时间: 2024-07-30 05:04:32

OCZ pci-e revodrive3 240GB & DELL SSD 2.5 SATA 200GB & SAS 2.5 146GB 10K的相关文章

宝存 shannon PCI-E SSD VS OCZ RevoDrive3 X2 PCI-E SSD on CentOS 6.5 2.6.32-431.el6.x86_64

今天拿到一块上海宝存 shannon 的1.2TB SSD一块, 以前一直在用的是OCZ RevoDrive3 X2, 所以对比一下这两款的性能如何. 感谢上海宝存提供SSD卡进行测试. 首先看一下宝存官方提供的性能指标. Shannon Direct-IO SSD G2 IOPS 用户可用容量 800GB 1200GB 1600GB 3200GB 读带宽 1.4GB/s 2.0GB/s 2.4GB/s 2.0GB/s 写带宽 1.2GB/s 1.8GB/s 1.8GB/s 1.9GB/s 随机

软件定义架构让超融合世界更加复杂

经常会听到一些厂商谈到软件定义技术,你可能以为这是一种新的东西,但软件定义存储是从软件定义架构的其他主要元素诞生就存在了.上个世界80年代的文件服务器就被认为是软件定义存储,因为它们能够向客户端呈现存储,而不仅仅是在服务器内部. 软件定义存储的最简单定义就是,它是一种管理与底层硬件解耦存储的软件.然而,厂商基于各自的平台对这个名词给与了不同的定义. 一些平台是纯软件产品,它们将各种不同的存储池呈现为单一连续的盘块,还有一些会提供复杂的支持选项,包括复制.快照以及基于标准硬件的分层功能. 对于灵活

OCZ REVODRIVE3 used in CentOS 5.x x64 on DELL R610 Server's PCI-E x4

在6.x中的安装请参考http://digoal.lofter.com/post/6ced3_450adf3 前段时间在DELL R610服务器pci-e插槽上插了1块OCZ的SSD硬盘(价格3000多RMB, 比较实惠). 型号 : OCZ REVODRIVE3 容量 : 240 GB 因为服务器是单电源的, 两个PCI-E插槽看起来不能同时使用, 所以把另一个槽位上插的HBA卡拔掉就能使用了. 另外就是, OCZ网站上没有提供这个型号的SSD的linux驱动. 但是用Z的可以, 下载地址 :

U.2 SSD到底是什么?

  SSD接口多种多样,主流SATA3.0接口最常见,最近很火的M.2/PCI-e接口,曾经超极本的SSD最爱用到mSATA接口,如今又冒出了一个U.2接口,要脚踏M.2,取代SATA,成为未来SSD主流选择?到底U.2接口又是什么来的呢?今天SSD故事会,我们就来聊一聊关于U.2 SSD. U.2 接口是什么? U.2接口,原先叫SFF-8639,由Intel一手推动.本质上是SATA Express,而SATA-E物理接口是通过SATA 6Gbps接口改造的,有点类似于SAS接口.它使用了2

CentOS 7 lvm cache dev VS zfs VS flashcache VS bcache VS direct SSD

本文测试结果仅供参考, rhel 7.0的lvm cache也只是一个预览性质的特性, 从测试结果来看, 用在生产环境也尚早. 前段时间对比了Linux下ZFS和FreeBSD下ZFS的性能, 在fsync接口上存在较大的性能差异, 这个问题已经提交给zfsonlinux的开发组员.  http://blog.163.com/digoal@126/blog/static/1638770402014526992910/ https://github.com/zfsonlinux/zfs/issue

OCZ收购Sanrad 闪存发力虚拟化数据中心

SSD制造商OCZ Technology周一表示,已经收购了位于以色列的闪存存储缓存和虚拟化软硬件开发商Sanrad. OCZ表示,Sanrad 的硬件和软件产品,已经得到VMware. 微软和Citrix 的认证,有望帮助加快OCZ用于虚拟化数据中心的PCIE闪存存储解决方案. Sanrad 的VXL软件结合了该公司的Flash高速缓存和虚拟化技术部署虚拟化环境,允许客户虚拟机托管在缓存中.这些虚拟机通过业界标准的 iSCSI 协议与存储连接,这使他们能够无缝地在Windows. Solari

是否能领先e步 浅析SSD中的eTLC和eMLC颗粒

在2015年里,TLC SSD逐渐成为市场主角,凭借超高的性价比掀起了SSD的普及战役.就在TLCSSD攻城略地之余,很多SSD厂商却开始改完"eMLC",而TLC SSD阵营中也出现了"eTLC"的分支.那么,这些前缀带"e"的闪存颗粒究竟是个什么东东? 闪存颗粒的筛选流程 早在SLC NAND时代,也曾有过名为"eSLC"的闪存颗粒.在MLC和TLC一统江湖的时代,eMLC和eTLC的出现也就显得顺理成章了.在正式介绍它们

大事件!PCIe SSD与SATA SSD同价啦

大数据时代,个人.企业.服务器等对数据存储需求与日俱增,对SSD的需求正以每年20%的增速成长.日前,国内最大的存储厂商江波龙发布了一款P800系列PCIe SSD,据介绍可与SATA SSD同价,如此劲爆的消息势必将SSD热度推上另一个高潮,小伙伴们可都要稳住啊! P800系列PCIe SSD采用15nm TLC NAND Flash,以及Marvell控制芯片,读写速度分别达到700MB/s和300 MB/s,主要有M.2和AIC(Add in Card)两种形态,容量提供120GB和240

从“几天”到“15分钟”Dell Engineered for VMware EVO:RAIL与时间作战

  在大部分时间里,速度可以起到一定程度上的决定效果,在体育方面的优势就不用在这里赘述,此文主要是想介绍速度在企业业务决策上的表现,速度可以直接决定企业在业务决策上的成败,尤其是在当前云计算.大数据.移动等技术对传统IT基础设施的冲击之下,企业如果不能"及时"调整IT架构,那么就无法获得最大的业务效益,甚至被市场抛弃. 在2014年的VMworld大会上,戴尔宣布推出Dell Engineered Solutions for VMware EVO:RAIL解决方案.作为公司集成系统的最