mysql运维常用命令

使用兼容mysql323的方式备份 \\
mysqldump ,--compatible=mysql323 \\
Mysql表引擎更改为InnoDB \\
alter table $TABLENAME type=InnoDB \\

继续阅读 »

在ubuntu/debian上安装google pagespeed

Google推出mod-pagespeed免费模块用于优化Apache HTTP服务器框架下的网站速度。该模块从多个方面对服务器运行速度进行优化,例如可以对图片进行再压缩,通过CMS(内容管理系统)改变网页构造但不改变CMS本身等。在此次开源之前,Google内部也一直使用该模块。 \\

作用如下:
#不需要对网站 CMS 系统进行改变即可应用。
#加速模块可以自行对网络传输的 html 字节优化及对图象 、css 进入压缩优化传输
#智能缓存是一大亮点,它可以自动智能缓存,加速下载

目前这套优化模块已经应用GoDaddy服务器上,而且反响良好。根据此前的一些实践来看, 通过mod_pagespeed可以对 Web 性能的多个方面,包括缓存、客户端与服务器之间的连接、载荷大小等进行优化,最大可将页面加载时间缩短 50% 。\\

继续阅读 »

中国移动3g td-scdma配置文件备份

cat /etc/chatscripts/3g \\

继续阅读 »

在debian上测试最新进入主线内核的容器虚拟化-lxc

**介绍** \\
Linux conatiners (LXC) 是在Linux平台上基于容器的虚拟化技术的未来标准,它和传统的解决方案如Linux-VServer和OpenVZ有所区别。最初的LXC技术是由IBM研发的,目前已经进入Linux内核主线,这意味着LXC技术将是目前最有竞争力的轻量级虚拟容器技术,相比较传统的VServer和OpenVZ轻量级虚拟技术(两者都需要对标准内核进行补丁),发展潜力更大。 \\

继续阅读 »

mysql压力测试及优化

===== 环境 =====

硬件环境:

|型号 |CPU |内存 |网卡 |
|Dell PowerEdge \\ R410 |双路四核 \\ Xeon E5506 2.13G |8G ECC \\ DDR3 1333 MHZ内存 |Broadcom Corporation \\ NetXtreme II BCM5716 Gigabit Ethernet |

\\ 软件环境:

| 操作系统版本 |DB |
|Debian GNU/Linux \\ Lenny 5.0 amd64 |mysql Ver 14.14 Distrib 5.1.47, \\ for debian-linux-gnu (x86_64) using readline 5.2 |

经测试,
innodb_flush_log_at_trx_commit影响较大,\\
innodb_flush_log_at_trx_commit = 1(默认)时的测试情况:
{{{
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 43.718 seconds
Minimum number of seconds to run all queries: 43.718 seconds
Maximum number of seconds to run all queries: 43.718 seconds
Number of clients running queries: 2000
Average number of queries per client: 10

User time 0.10, System time 0.19
Maximum resident set size 0, Integral resident set size 0
Non-physical pagefaults 15784, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 63228, Involuntary context switches 1499
}}}
innodb_flush_log_at_trx_commit = 0(改动后)的测试情况:
{{{
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 4.469 seconds
Minimum number of seconds to run all queries: 4.469 seconds
Maximum number of seconds to run all queries: 4.469 seconds
Number of clients running queries: 2000
Average number of queries per client: 10

User time 0.18, System time 0.19
Maximum resident set size 0, Integral resident set size 0
Non-physical pagefaults 15480, Physical pagefaults 5, Swaps 0
Blocks in 736 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 61984, Involuntary context switches 2991
}}}