SSD和HDD的pgbench性能对比

简介: SSD的IO性能优于HDD,特别是随机IO。现在用的PC里就有一块普通硬盘(WD3200AAJS)和一块SSD(OCZ-VERTEX4),下面实际测一下,它们在作为数据库存储时的表现。

SSD的IO性能优于HDD,特别是随机IO。现在用的PC里就有一块普通硬盘(WD3200AAJS)和一块SSD(OCZ-VERTEX4),下面实际测一下,它们在作为数据库存储时的表现。

一,测试环境
CPU:Intel Core2 DuoCPU E7500 @2.93GHz
MEM:2G DDR3
OS: Win XP
DB:PostgreSQL 9.1.6

二,性能数据
WD3200AAJS:


OCZ-VERTEX4:

这台PC比较老,还是IDE接口,严重限制了OCZ-VERTEX4的潜能,但性能比起WD3200AAJS已经相当优越了。

三,pgbench测试数据
使用PostgreSQL的默认配置进行测试。结果显示,在最考验随机写入的测试(transaction type: TPC-B,scaling factor: 300)中,WD3200AAJS的tps为44,OCZ-VERTEX4的tps为775。

WD3200AAJS:
C:\Documents and Settings\chj>pgbench -c 50 -j 10 -t 100 -S pgdb100
starting vacuum...end.
transaction type: SELECT only
scaling factor: 100
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 100
number of transactions actually processed: 5000/5000
tps = 2319.326503 (including connections establishing)
tps = 6457.962531 (excluding connections establishing)

C:\Documents and Settings\chj>pgbench -c 50 -j 10 -t 100  pgdb100
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 100
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 100
number of transactions actually processed: 5000/5000
tps = 178.538523 (including connections establishing)
tps = 186.534720 (excluding connections establishing)

C:\Documents and Settings\chj>pgbench -c 50 -j 10 -t 100 -S pgdb100
starting vacuum...end.
transaction type: SELECT only
scaling factor: 300
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 100
number of transactions actually processed: 5000/5000
tps = 72.010603 (including connections establishing)
tps = 75.560511 (excluding connections establishing)

C:\Documents and Settings\chj>pgbench -c 50 -j 10 -t 100  pgdb100
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 300
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 100
number of transactions actually processed: 5000/5000
tps = 43.564647 (including connections establishing)
tps = 44.129713 (excluding connections establishing)

OCZ-VERTEX4:
C:\Documents and Settings\chj>pgbench -p 9100  -c 50 -j 10 -t 100 -S pgdb1
starting vacuum...end.
transaction type: SELECT only
scaling factor: 1
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 100
number of transactions actually processed: 5000/5000
tps = 2305.247430 (including connections establishing)
tps = 7798.504410 (excluding connections establishing)

C:\Documents and Settings\chj>pgbench -p 9100  -c 50 -j 10 -t 100  pgdb1
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 1
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 100
number of transactions actually processed: 5000/5000
tps = 565.058589 (including connections establishing)
tps = 666.951735 (excluding connections establishing)

C:\Documents and Settings\chj>pgbench -p 9100  -c 50 -j 10 -t 100 -S pgdb300
starting vacuum...end.
transaction type: SELECT only
scaling factor: 300
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 100
number of transactions actually processed: 5000/5000
tps = 1989.756480 (including connections establishing)
tps = 5504.493891 (excluding connections establishing)

C:\Documents and Settings\chj>pgbench -p 9100  -c 50 -j 10 -t 100  pgdb300
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 300
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 100
number of transactions actually processed: 5000/5000
tps = 613.481048 (including connections establishing)
tps = 775.337927 (excluding connections establishing)

C:\Documents and Settings\chj>pgbench -p 9100  -c 50 -j 10 -t 1000 -S pgdb300

starting vacuum...end.
transaction type: SELECT only
scaling factor: 300
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 1000
number of transactions actually processed: 50000/50000
tps = 3481.141102 (including connections establishing)
tps = 4090.565401 (excluding connections establishing)

跑下面这个测试时,CPU 占用100%,瓶颈已是CPU了。

C:\Documents and Settings\chj>pgbench -p 9100  -c 50 -j 10 -t 1000 -S pgdb1
starting vacuum...end.
transaction type: SELECT only
scaling factor: 1
query mode: simple
number of clients: 50
number of threads: 10
number of transactions per client: 1000
number of transactions actually processed: 50000/50000
tps = 5727.081326 (including connections establishing)
tps = 7352.381685 (excluding connections establishing)


 

相关文章
|
数据安全/隐私保护 iOS开发 MacOS
免费压缩解压软件神器:Bandizip
免费压缩解压软件神器:Bandizip
1627 0
|
机器学习/深度学习 算法 数据挖掘
【Python机器学习】K-Means、DBSCAN、GMM三种聚类的对比演示(附源码)
【Python机器学习】K-Means、DBSCAN、GMM三种聚类的对比演示(附源码)
968 0
|
供应链 芯片
电商黑话之 spu sku
SPU = Standard Product Unit (标准化产品单元),SPU是商品信息聚合的最小单位,是一组可复用、易检索的标准化信息的集合,该集合描述了一个产品的基本特性。因此在电商类产品库建立时,通常会根据SPU来建立。
电商黑话之 spu sku
|
小程序 Java 关系型数据库
weixin025移动学习平台的设计与实现+ssm(文档+源码)_kaic
基于微信小程序的移动学习平台旨在解决传统APP占用过多手机存储空间的问题,提升用户体验。该平台使用微信开发者工具开发前端,SSM框架和Java语言开发后台,并采用MySQL数据库保存数据。系统支持管理员对教师、课程、学生信息进行管理,教师可查看及审核作业,管理课程资源;学生能提交作业、查看审核结果并收藏或评论课程资源。此平台使用户无需安装独立APP即可访问学习内容,极大提升了便捷性和管理效率。 关键词:基于微信小程序的移动学习平台;微信开发者工具;SSM框架
|
域名解析 运维 监控
网络故障排查的常用工具与方法:技术深度解析
【8月更文挑战第20天】网络故障排查是一项复杂而重要的工作,需要网络管理员具备扎实的网络知识、丰富的实践经验和灵活的问题解决能力。通过掌握常用工具和方法,遵循科学的排查流程,可以显著提高故障排查的效率和准确性。希望本文能为读者在网络故障排查方面提供有益的参考和启示。
2344 2
|
监控 Java 微服务
Spring Boot微服务部署与监控的实战指南
【7月更文挑战第19天】Spring Boot微服务的部署与监控是保障应用稳定运行和高效维护的重要环节。通过容器化部署和云平台支持,可以实现微服务的快速部署和弹性伸缩。而利用Actuator、Prometheus、Grafana等监控工具,可以实时获取应用的运行状态和性能指标,及时发现并解决问题。在实际操作中,还需根据应用的具体需求和场景,选择合适的部署和监控方案,以达到最佳效果。
|
网络协议 算法 安全
【专栏】硬核干货:BGP(边界网关协议)是自治系统间交换路由信息的关键协议,用于大型网络的高效路由选择
【4月更文挑战第28天】BGP(边界网关协议)是自治系统间交换路由信息的关键协议,用于大型网络的高效路由选择。它基于路径向量算法,通过TCP连接建立邻居关系,交换并选择最优路径。BGP支持丰富的路由属性和多种消息类型,允许灵活的路由控制。配置与应用包括启用BGP、配置邻居、路由宣告、过滤及社区属性使用。虽然BGP具备强大路由控制和可扩展性,但其配置复杂,存在安全挑战。理解BGP对于网络管理和优化至关重要。
959 0
|
机器学习/深度学习 监控 PyTorch
PyTorch模型训练:优化器与损失函数的选择
【4月更文挑战第17天】PyTorch中的优化器(如SGD, Adam, RMSprop)和损失函数(如MSE Loss, Cross Entropy Loss)对模型训练效果有显著影响。优化器选择应基于任务复杂度和数据规模,SGD适合简单任务,而Adam和RMSprop适用于复杂情况。损失函数选择依赖于任务类型,MSE Loss用于回归,Cross Entropy Loss用于分类。实践中,应尝试不同组合,调整学习率,监控训练过程,并使用验证集优化模型。
|
存储 程序员 编译器
c语言从入门到实战——VS2022实用调试技巧
Visual Studio是集成开发环境,其内置了多种调试工具和技巧帮助开发人员在开发过程中解决问题。以下是一些VS实用调试技巧的简介
838 0
|
Java 应用服务中间件 API
高性能分布式API网关Kong1
高性能分布式API网关Kong1
2123 3