redis是一个带存储功能的键值数据库,类似日本的Tokyo Tyrant / Tokyo Cabinet 项目。下面是官方的介绍:

Redis is an advanced key-value store. It is similar to memcached but the dataset is not volatile, and values can be strings, exactly like in memcached, but also lists, sets, and ordered sets. All this data types can be manipulated with atomic operations to push/pop elements, add/remove elements, perform server side union, intersection, difference between sets, and so forth. Redis supports different kind of sorting abilities.

这里有篇国外的人对redis,memcached,tokyo tyrant等做的对测试:

http://www.ruturaj.net/redis-memcached-tokyo-tyrant-mysql-comparison

可以看出redis的性测非常出色。

另外redis对数据结构的支持也非常丰富,什么队列,栈,哈希等等都支持,而memcached只支持K-V。

阅读全文

linux IO监控工具iotop

如果你的linux kernel版本大于2.6.20,可以使用iotop这个工具,象windows 2008的任务管理器一样看到各个进程的IO读写。非常不错。

主页:http://guichaz.free.fr/iotop/

介绍:

Iotop is a Python program with a top like UI used to show of behalf of which process is the I/O going on. It requires Python >= 2.5 (or Python >= 2.4 with the ctypes module) and a Linux kernel >= 2.6.20 with the TASK_DELAY_ACCT and TASK_IO_ACCOUNTING options enabled.

阅读全文

MySQL查询缓存变量解释

MySQL查询缓存变量解释:

Qcache_free_blocks:缓存中相邻内存块的个数。数目大说明可能有碎片。FLUSH QUERY CACHE会对缓存中的碎片进行整理,从而得到一个空闲块。

Qcache_free_memory:缓存中的空闲内存。

Qcache_hits:每次查询在缓存中命中时就增大

Qcache_inserts:每次插入一个查询时就增大。命中次数除以插入次数就是不中比率。

阅读全文

虚拟机,2cpu,1.5G内存

mysql 测试:

mysql MySQL 5.0.77 X86_64:

[root@mysqltest sql-bench]# ./run-all-tests –user=’root’ –password=’xxxxxx’        
Benchmark DBD suite: 2.15
Date of test:        2010-01-07 14:09:15
Running tests on:    Linux 2.6.18-164.9.1.el5 x86_64
Arguments:          
Comments:           
Limits from:        
Server version:      MySQL 5.0.77/
Optimization:        None
Hardware:           

alter-table: Total time: 29 wallclock secs ( 0.04 usr  0.03 sys +  0.00 cusr  0.00 csys =  0.07 CPU)
ATIS: Total time:  8 wallclock secs ( 2.55 usr  0.24 sys +  0.00 cusr  0.00 csys =  2.79 CPU)
big-tables: Total time:  8 wallclock secs ( 1.30 usr  0.23 sys +  0.00 cusr  0.00 csys =  1.53 CPU)
connect: Total time: 80 wallclock secs (16.38 usr 13.74 sys +  0.00 cusr  0.00 csys = 30.12 CPU)
create: Total time: 606 wallclock secs ( 2.26 usr  1.55 sys +  0.00 cusr  0.00 csys =  3.81 CPU)
insert: Total time: 1047 wallclock secs (165.57 usr 52.63 sys +  0.00 cusr  0.00 csys = 218.20 CPU)
select: Total time: 65 wallclock secs (15.76 usr  3.41 sys +  0.00 cusr  0.00 csys = 19.17 CPU)
transactions: Test skipped because the database doesn’t support transactions
wisconsin: Total time: 19 wallclock secs ( 1.54 usr  0.24 sys +  0.00 cusr  0.00 csys =  1.78 CPU)

All 9 test executed successfully

阅读全文

Sql Server SQL调优环境配置

  • 显示有关由Transact-SQL 语句运行的时间的信息 set statistics time on

  • 关闭有关由Transact-SQL 语句运行的时间的信息 set statistics time off

  • 显示有关由Transact-SQL 语句生成的磁盘活动量的信息 SET STATISTICS IO ON

  • 关闭有关由Transact-SQL 语句生成的磁盘活动量的信息 SET STATISTICS IO OFF

阅读全文

作者的图片

阿辉

容器技术及容器集群等分布式系统研究

容器平台负责人

上海