惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
aimingoo的专栏
aimingoo的专栏
B
Blog
博客园 - 聂微东
博客园_首页
D
DataBreaches.Net
F
Fortinet All Blogs
小众软件
小众软件
M
MIT News - Artificial intelligence
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
F
Full Disclosure
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 【当耐特】
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
A
Arctic Wolf
C
Cyber Attacks, Cyber Crime and Cyber Security
G
Google Developers Blog
B
Blog RSS Feed
Attack and Defense Labs
Attack and Defense Labs
W
WeLiveSecurity
N
News | PayPal Newsroom
Recent Announcements
Recent Announcements
AI
AI
人人都是产品经理
人人都是产品经理
J
Java Code Geeks
V2EX - 技术
V2EX - 技术
TaoSecurity Blog
TaoSecurity Blog
S
Security Affairs
Martin Fowler
Martin Fowler
Webroot Blog
Webroot Blog
P
Palo Alto Networks Blog
S
Schneier on Security
Latest news
Latest news

博客园 - witer666

PHP API 框架开发的学习 [android开发必备] Android开发者社区汇总 android定时器 微博feed系统的push和pull模式和时间分区拉模式架构探讨 一个mysql小技巧 redhat安装memcacheQ php empty问题 Linux PHP连接MSSQL Curl参数一览 Redhat Memcache UDF安装配置 Redhat Mongodb学习笔记 PHP使用技巧 位运算符C语言 Redhat Lighttpd安装配置 HTTP 状态代码表示什么意思? PHP正则表达式学习参考的文章 Redhat Cacti安装配置 50点提高PHP编程效率 引入缓存提升性能 wget使用
Percona-Server5.5安装配置
witer666 · 2011-03-15 · via 博客园 - witer666

一、软件包

a) Percona-Server-shared-55-5.5.8-beta20.0.46.rhel5.i686.rpm

b) Percona-Server-client-55-5.5.8-beta20.0.46.rhel5.i686.rpm

c) Percona-Server-server-55-5.5.8-beta20.0.46.rhel5.i686.rpm

二、安装步骤

a) Rpm –ivh Percona-Server-shared-55-5.5.8-beta20.0.46.rhel5.i686.rpm

b) Rpm –ivh Percona-Server-client-55-5.5.8-beta20.0.46.rhel5.i686.rpm

c) Rpm –ivh Percona-Server-server-55-5.5.8-beta20.0.46.rhel5.i686.rpm

d) /usr/bin/mysql -uroot –p刚开始密码为空

e) Mysql>use mysql;

f) Mysql>update user set password=password(‘123456’) where user=’root’ //root的密码设置为123456

g) Mysql>flush privileges;

h) Service mysql restart

i) /usr/bin/mysqlslap –uroot -p -a –concurrency=50,100 –-number-of-queries 1000 –-debug-info//并发50到100查询次数为1000次

Benchmark

Average number of seconds to run all queries: 2.874 seconds

Minimum number of seconds to run all queries: 2.874 seconds

Maximum number of seconds to run all queries: 2.874 seconds

Number of clients running queries: 1

Average number of queries per client: 1000

Benchmark

Average number of seconds to run all queries: 2.746 seconds

Minimum number of seconds to run all queries: 2.746 seconds

Maximum number of seconds to run all queries: 2.746 seconds

Number of clients running queries: 2

Average number of queries per client: 500

Benchmark

Average number of seconds to run all queries: 2.192 seconds

Minimum number of seconds to run all queries: 2.192 seconds

Maximum number of seconds to run all queries: 2.192 seconds

Number of clients running queries: 3

Average number of queries per client: 333

Benchmark

Average number of seconds to run all queries: 2.118 seconds

Minimum number of seconds to run all queries: 2.118 seconds

Maximum number of seconds to run all queries: 2.118 seconds

Number of clients running queries: 4

Average number of queries per client: 250

j) /usr/bin/mysqlslap –uroot –p –concurrency=50,100 –-number-of-queries 1000 –-debug-info –query=’select * from discuz.uc_members’//并发50到100查询次数为1000次单SQL语句测试

Benchmark

Average number of seconds to run all queries: 1.596 seconds

Minimum number of seconds to run all queries: 1.596 seconds

Maximum number of seconds to run all queries: 1.596 seconds

Number of clients running queries: 1

Average number of queries per client: 1000

Benchmark

Average number of seconds to run all queries: 1.629 seconds

Minimum number of seconds to run all queries: 1.629 seconds

Maximum number of seconds to run all queries: 1.629 seconds

Number of clients running queries: 2

Average number of queries per client: 500

Benchmark

Average number of seconds to run all queries: 1.639 seconds

Minimum number of seconds to run all queries: 1.639 seconds

Maximum number of seconds to run all queries: 1.639 seconds

Number of clients running queries: 3

Average number of queries per client: 333

Benchmark

Average number of seconds to run all queries: 1.645 seconds

Minimum number of seconds to run all queries: 1.645 seconds

Maximum number of seconds to run all queries: 1.645 seconds

Number of clients running queries: 4

Average number of queries per client: 250

k) 从测试结果来说个人感觉并不是很理想!mysqlslap并发数和请求数多,原因表中没几条数据,也可能时间都浪费在创建线程上也不一定。还是和其它压力测试工具一样,会出来线程无法再创建的问题。

三、附mysqlslap参数说明

–auto-generate-sql, -a
自动生成测试表和数据

–auto-generate-sql-load-type=type
测试语句的类型。取值包括:read,key,write,update和mixed(默认)。

–number-char-cols=N, -x N
自动生成的测试表中包含多少个字符类型的列,默认1

–number-int-cols=N, -y N
自动生成的测试表中包含多少个数字类型的列,默认1

–number-of-queries=N
总的测试查询次数(并发客户数×每客户查询次数)

–query=name,-q
使用自定义脚本执行测试,例如可以调用自定义的一个存储过程或者sql语句来执行测试。

–create-schema
测试的schema,MySQL中schema也就是database

–commint=N
多少条DML后提交一次

–compress, -C
如果服务器和客户端支持都压缩,则压缩信息传递

–concurrency=N, -c N
并发量,也就是模拟多少个客户端同时执行select。可指定多个值,以逗号或者–delimiter参数指定的值做为分隔符

–engine=engine_name, -e engine_name
创建测试表所使用的存储引擎,可指定多个

–iterations=N, -i N
测试执行的迭代次数

–detach=N
执行N条语句后断开重连

–debug-info, -T
打印内存和CPU的信息

–only-print
只打印测试语句而不实际执行

Percona-Server编译安装一直没搞明白,好像是要先装MYSQL直接拷贝Percona-Server的tar.gz包的内容覆盖掉装的MYSQL结果。