- 博客(9)
- 收藏
- 关注
原创 I/O 效率
<br /> 今天看到chinaunix上的MySQL版块,有人问到innodb频繁写log和double buffer的效率问题。。。。<br /> <br /> 刚开始看到时,感觉很有道理,频繁的读写操作很容易造成性能瓶颈。真的是这样么?<br /> <br /> 实际上,HD的顺序读写操作还是蛮快的。现在比较火的SSD在顺序读写方面相对HD也并不占优势。 因此innodb对log和double buffer的频繁读写,对MySQ的效率而言影响较小。另:d
2010-08-23 18:52:00 1060
原创 Linux fflush 与 fsync的区别
<br />在学习innodb_flush_method的方法时,看到下面的文章:<br />http://www.orczhou.com/index.php/2009/08/innodb_flush_method-file-io/<br /> <br />文章对此参数介绍的比较详细。(摘录其中一段。。。。)<br /> <br />参数Innodb_flush_method(Linux)可以设定为:Fdatasync、O_DSYNC、O_DIRECT。我们看看这个三个参数是如何影响程序MySQL对日志和数
2010-08-20 17:07:00 17694
原创 innodb hotbackup: xtrabackup
xtrabackup实现原理与innodb的recovery原理类似。主要特点:1. 在线热备份。可以备份innodb和myisam。innodb主要应用recovery原理。myisam直接拷贝文件。2. 支持流备份。可以备份到disk,tape和reomot host。--stream=tar ./ | ssh user@remotehost cat ">" /backup/dir/ (测试过程中遇到tar4ibd的一些错误,可能是因为未重新编译xtrabackup而直接拿bianry来用的原因。)3
2010-08-20 15:17:00 1050
原创 innodb data compression
innodb支持两种文件格式:innodb_file_format=Antelope/BarracudaMySQL build-in innbase only support Antelope. Barracuda only supports in innodb-plugin.Install innodb-plugin as shared library:How to build innodb-plugin and use innodb-plugin in MySQL server:1. How to bu
2010-08-19 18:45:00 847
原创 Static variables in c programming
<br />Static variable defines the scope of the variable.<br /><br />it has mainly two uses<br /><br />1)Generally extern variable are made static so that function that are not in the file can not access it and function with in the file can access i
2010-08-18 13:33:00 475
原创 文件共享(摘自unix环境高级编程)
<br />UNIX支持在不同进程间共享打开文件。在介绍dup函数之前,需要先说明这种共享。为此先说明内核用于所有I / O的数据结构。<br /><br />内核使用了三种数据结构,它们之间的关系决定了在文件共享方面一个进程对另一个进程可能产生的影响。<br />(1) 每个进程在进程表中都有一个记录项,每个记录项中有一张打开文件描述符表,可将其视为一个矢量,每个描述符占用一项。与每个文件描述符相关联的是:<br /> (a) 文件描述符标志。<br /> (b
2010-08-15 16:03:00 738
原创 Linux file I/O
<br />#include <unistd.h><br /><br />int dup(int filedes) ; => fcntl (filedes, F_DUPFD, 0);<br /><br />int dup2(int filedes, int filedes2) ; => close(filedes2) ; fcntl(filedes, F_DUPFD, filedes2);<br />(atomic operation)
2010-08-15 15:34:00 628
原创 linux fork and exec function
exec()http://blog.chinaunix.net/u3/94667/showart_2100106.htmlfork()http://blog.chinaunix.net/u/16292/showart_392816.htmlExample from book: Unix环境高级编程#include #include #include #include #include #define MAXLINENUM 80int main(){ char cmdline
2010-08-12 15:25:00 715
原创 Innodb buffer pool struct
struct buf_pool_struct{ /* 1. General fields */ mutex_t mutex; /* mutex protecting the buffer pool struct and control blocks, except the re
2010-08-04 12:37:00 785
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人