![](https://www.265xx.com/res/images/mobile.png)
SSD和HDD的pgbench性能对比
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 Settingschj>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: 502023年07月18日00
tps = 2319.326503 (including connections establishing)
tps = 6457.962531 (excluding connections establishing)
C:Documents and Settingschj>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: 502023年07月18日00
tps = 178.538523 (including connections establishing)
tps = 186.534720 (excluding connections establishing)
C:Documents and Settingschj>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: 502023年07月18日00
tps = 72.010603 (including connections establishing)
tps = 75.560511 (excluding connections establishing)
C:Documents and Settingschj>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: 502023年07月18日00
tps = 43.564647 (including connections establishing)
tps = 44.129713 (excluding connections establishing)
OCZ-VERTEX4:
C:Documents and Settingschj>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: 502023年07月18日00
tps = 2305.247430 (including connections establishing)
tps = 7798.504410 (excluding connections establishing)
C:Documents and Settingschj>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: 502023年07月18日00
tps = 565.058589 (including connections establishing)
tps = 666.951735 (excluding connections establishing)
C:Documents and Settingschj>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: 502023年07月18日00
tps = 1989.756480 (including connections establishing)
tps = 5504.493891 (excluding connections establishing)
C:Documents and Settingschj>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: 502023年07月18日00
tps = 613.481048 (including connections establishing)
tps = 775.337927 (excluding connections establishing)
C:Documents and Settingschj>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: 5002023年07月18日000
tps = 3481.141102 (including connections establishing)
tps = 4090.565401 (excluding connections establishing)
跑下面这个测试时,CPU 占用100%,瓶颈已是CPU了。
C:Documents and Settingschj>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: 5002023年07月18日000
tps = 5727.081326 (including connections establishing)
tps = 7352.381685 (excluding connections establishing)
最近更新娱乐资讯
- 获奖影评赏析|《阿丽塔·战斗天使》
- 人生必看十部好看的纪录片(十部必看的现实主义纪录片)
- 日本十大禁欲动漫盘点:唯美霸道下的污镜头
- 墨西哥大麻即将合法化,美媒:美国夹在两个“卖大麻的邻居”之间
- “和合”文化背景下昭君文化的价值生成
- 马来酸阿法替尼片人体生物等效性试验
- 原创《满城尽带黄金甲》:喧哗与沉静的戏台,道德与伦理的悲歌
- 裴旖旎
- 隐适美附件又掉了,从第一天掉了2颗,第二天掉了1颗,今晚我还戴牙套吗?
- 电视剧《最美的青春》:好作品是如何炼就的
- 狗头萝莉出摊卖煎饼大家怎么看?
- 记者的职业伦理:我该何时放下相机
- 绝命毒师电影,「蚁人」改造DNA,首部Netflix华语剧...10月流媒体片单
- 这是一部非常独特的「成人动画」,少儿不宜
- 高分电影推荐!六部直击人性黑暗面的韩国片!部部引人深省!
- 2022天津解放军464医院整形美容中心整形价格表(价目表)全新发布
- 精 [电影推荐]一再婚女人因拯救女儿,让两个家庭面临人性考验,此电影令人感动
- 缓冲晶体溶液与生理盐水对重症监护病房患者急性肾损伤的影响:SPLIT随机临床试验
- 未成年人千万别看这部片子,简直太变态了!!!
- 生态在文学中的位置
- 与3800多名女性发生过关系,世界小电影之王,终于那啥了
- 新加坡电影《爸妈不在家》爆冷获多项金马奖
- 调查称52%受访者认为国产电影色情暴力问题严重
- 红楼梦初中读书笔记
- 家庭伦理剧,小品剧本《家庭矛盾》