Author: qbanke | Category: Mysql
Comments: 评论关闭

我使用的是 MySQL 自带的性能测试工具 mysqlslap,200 并发,25次循环,
运行5次取平均数值所得。

测试数据库所用的版本是 MariaDB 5.2.0 Beta & MySQL 5.1.36 使用相同的 my.ini 配置

下边是测试结果:

Benchmark
Running for engine myisam
Average number of seconds to run all queries: 36.261 seconds
Minimum number of seconds to run all queries: 36.162 seconds
Maximum number of seconds to run all queries: 36.336 seconds

以上是 MariaDB  ,MyISAM 引擎的测试结果

Benchmark
Running for engine myisam
Average number of seconds to run all queries: 35.774 seconds
Minimum number of seconds to run all queries: 35.438 seconds
Maximum number of seconds to run all queries: 36.130 seconds
Number of clients running queries: 200
Average number of queries per client: 25

以上是 MySQL  ,MyISAM 引擎的测试结果
MariaDB 与 MySQL 在 MyISAM 引擎的性能上存在差别,MySql 快了一个小身位。
InnoDB 的情况也一样麽?

Benchmark
Running for engine innodb
Average number of seconds to run all queries: 36.113 seconds
Minimum number of seconds to run all queries: 36.025 seconds
Maximum number of seconds to run all queries: 36.233 seconds
Number of clients running queries: 200
Average number of queries per client: 25

以上是 MariaDB  ,InnoDB 引擎的测试结果

Benchmark
Running for engine innodb
Average number of seconds to run all queries: 36.412 seconds
Minimum number of seconds to run all queries: 36.208 seconds
Maximum number of seconds to run all queries: 36.663 seconds
Number of clients running queries: 200
Average number of queries per client: 25

以上是 MySQL  ,InnoDB 引擎的测试结果
测试所得,使用 InnoDB 引擎时,情况就扭转了,MariaDB 要比 MySQL 快上了好几毫秒。
看来2位虽然同宗同源,但所侧重的方面不不一样啊。
将继续留意他们的发展。

Author: qbanke | Category: Linux & Unix
Comments: 评论关闭

Local vs. UTC
首先重要的问题是你使用utc还是local time.
UTC(Universal Time Coordinated)=GMT(Greenwich Mean Time)
Local time 是你手表上的时间

传统的POSIX计算机(Solaris,bsd,unix)使用UTC格式
linux可以处理UTC时间和蹩脚的Windows所使用的local time

到底是使用UTC还是local time可以这样来确定:
如果机器上同时安装有Linux和Windows,建议使用local time
如果机器上只安装有Linux,建议使用utc
确定后编辑/etc/sysconfig/clock, UTC=0 是local time; UTC=1 是UTC(GMT)

确定timezone
运行tzselect,回答问题后会告诉你时区的名称,比如”Asia/Shanghai”,把他记下来(后面我用$timezone代替)

设定timezone
# cp /usr/share/zoneinfo/$timezone /etc/localtime

重新启动或者运行时钟设置脚本使之发生作用

版本差异
由于发行版的差异,以上文件位置可能不同。
一般设置时钟所使用的启动脚本为/etc/rc.d/init.d/setclock
redhat是在/etc/rc.d/rc.sysinit中设置时钟,所以一般要重新启动

Top
RSS for entries