作者文章: Fenng

Google 助力 MySQL

MySQL 应该给 Google 发感谢信: Google 在 Google Code 上发布的 Google Mysql Tools 使得 MySQL 在性能、可管理性、稳定性上都增色不少。

在该项目的首页将这个工具集分为三部分:

* mypgrep.py - a tool, similar to pgrep, for managing mysql connections
* compact_innodb.py - compacts innodb datafiles
by dumping and reloading all tables
* patches - patches to add features to MySQL 4.0.26 and MySQL 5.0.37

这份介绍似乎已经不能完全概括 Google Mysql Tools 了。现在的重点似乎是补丁包部分。根据版本号分为 MySQL4 与 MySQL 5,MySQL 5 的 Patch 现在很少,而 MySQL 4 部分内容真的比较丰富,关键改进列表:

* SemiSyncReplication – block commit on a master until at least one slave acknowledges receipt of all replication events.
* MirroredBinlogs – maintain a copy of the master’s binlog on a slave
* TransactionalReplication – make InnoDB and slave replication state consistent during crash recovery
* UserTableMonitoring – monitor and report database activity per account and table
* InnodbAsyncIo – support multiple background IO threads for InnoDB InnoDB 异步IO的支持相信对性能会有很明显的提升
* FastMasterPromotion – promote a slave to a master without restart

MySQL 在联机备份方面是弱势,倒是期待 Google 也能在这个方面做出改进(我非常好奇对于 Google Checkout 数据库是如何备份的).

在 Code 上的另外一个 关键项目 Google Perftools 中的 TCMalloc 对 MySQL 的性能也有很大的改进,相信国内很多出色的 Web 2.0 公司都已经用到这个东西了吧。TCMalloc : Thread-Caching Malloc 号称是目前最快的 Malloc ,对于解决 MySQL 遇到的 Malloc 扩展问题有很大的影响。

没有 Google 的支持,相信 Firefox 不会有现在这么大的影响力。有了 Google 的支持, MySQL 会发展多快 ?

EOF

Updated: 2008 年 9 月,Google又发布了一系列的新 Patch

《激流中国》的下载信息

前两天写了一篇有关《激流中国》的帖子,有网友发邮件给我:

你Blog中提到的《激流中国》网上能down前两集的。

激流中国-富人与穷人(AVI)
激流中国-富人与穷人(SSA)

激流中国-喉舌与职责(AVI)
激流中国-喉舌与职责(SSA)

NHK 这个专题更多的节目

今年四月日本NHK电视台推出24集的《激流中国》纪录片,要以一年时间每月播出两集,至2008年奥运前播放完,刚好改革开放30周年

是 Emule 的地址。复制该地址即可通过电驴下载了

谢谢这位朋友.

BTW: 这段时间在断断续续的看《再说长江》

EOF

又到六一儿童节

又到六一儿童节,估计今天下班不会有小朋友的小仓鼠跑到我家里了。今年除了猫泽西还来了一只非常害怕人的小黑猫,我原来想给它起名叫”黑客”,可惜 Laura 不同意,哈。

上午有人发棒棒糖、大白兔奶糖,还有跳跳糖中午有人在活动室玩游戏。

看上个月的搜索日志,上个月有好多搜索”六一儿童节”的来到这里。

说起儿童节,最近有不少关于领导折腾过儿童节的孩子的新闻,领导在台上训话,孩子们在烈日下暴晒。真不是一般的恶心,在小孩子面前摆什么谱? 还不如让孩子们直接玩游戏算了。

EOF

Bash Shell 快捷键的学习使用

这篇 Bash Shell Shortcuts 的快捷键总结的非常好。值得学习。下面内容大多数是拷贝粘贴与总结.

CTRL 键相关的快捷键:

Ctrl + a - Jump to the start of the line
Ctrl + b - Move back a char
Ctrl + c - Terminate the command  //用的最多了吧?
Ctrl + d - Delete from under the cursor
Ctrl + e - Jump to the end of the line
Ctrl + f - Move forward a char
Ctrl + k - Delete to EOL
Ctrl + l - Clear the screen  //清屏,类似 clear 命令
Ctrl + r - Search the history backwards  //查找历史命令
Ctrl + R - Search the history backwards with multi occurrence
Ctrl + u - Delete backward from cursor // 密码输入错误的时候比较有用
Ctrl + xx - Move between EOL and current cursor position
Ctrl + x @ - Show possible hostname completions
Ctrl + z - Suspend/ Stop the command
补充:
Ctrl + h - 删除当前字符
Ctrl + w - 删除最后输入的单词 

ALT 键相关的快捷键:

平时很少用。有些和远程登陆工具冲突。

Alt + < - Move to the first line in the history
Alt + > - Move to the last line in the history
Alt + ? - Show current completion list
Alt + * - Insert all possible completions
Alt + / - Attempt to complete filename
Alt + . - Yank last argument to previous command
Alt + b - Move backward
Alt + c - Capitalize the word
Alt + d - Delete word
Alt + f - Move forward
Alt + l - Make word lowercase
Alt + n - Search the history forwards non-incremental
Alt + p - Search the history backwards non-incremental
Alt + r - Recall command
Alt + t - Move words around
Alt + u - Make word uppercase
Alt + back-space - Delete backward from cursor 
// SecureCRT 如果没有配置好,这个就很管用了。

其他特定的键绑定:

输入 bind -P 可以查看所有的键盘绑定。这一系列我觉得更为实用。

Here "2T" means Press TAB twice
$ 2T - All available commands(common) //命令行补全,我认为是 Bash 最好用的一点
$ (string)2T - All available commands starting with (string)
$ /2T - Entire directory structure including Hidden one
$ ./2T - Only Sub Dirs inside including Hidden one
$ *2T - Only Sub Dirs inside without Hidden one
$ ~2T - All Present Users on system from "/etc/passwd" //第一次见到,很好用
$ $2T - All Sys variables //写Shell脚本的时候很实用
$ @2T - Entries from "/etc/hosts"  //第一次见到
$ =2T - Output like ls or dir //好像还不如 ls 快捷
补充:
Esc + T - 交换光标前面的两个单词

很多来自GNU 的 readline 库。另外一份总结也很好

记忆是所有技术人员的敌人。一次要把所有的都记住是不可能的。针对自己的使用习惯,对少数快捷键反复使用,短期内就会有效果。

你还知道那些好用的快捷键 ? 补充一下 ?

EOF