blog.etina.net
漫谈linux文件IO
http://blog.etina.net/2012/09/19/漫谈linux文件io.html
On 2012/09/19, in 技术. 转自 http:/ blog.chinaunix.net/uid-27105712-id-3270102.html. Char *buf = malloc(MAX BUF SIZE);. Strncpy(buf, src, , MAX BUF SIZE);. Fwrite(buf, MAX BUF SIZE, 1, fp);. 这里malloc的buf对于图层中的application buffer,即应用程序的buffer 调用fwrite后,把数据从application buffer 拷贝到了 CLib buffer,即C库标准IObuffer。 除了fclose方法外,还有一个主动刷新操作fflush 函数,不过fflush函数只是把数据从CLib buffer 拷贝到page cache 中,并没有刷新到磁盘上,从page cache刷新到磁盘上可以通过调用fsync函数完成。 当进程死机后 只有数据还处在application cache或CLib cache时候,数据会丢失。 Click here to cancel reply.
blog.etina.net
Linux下vmstat输出
http://blog.etina.net/2012/09/19/linux下vmstat输出.html
On 2012/09/19, in 技术. 转自 http:/ blog.chinaunix.net/uid-26454764-id-3145434.html. Procs ———–memory———- —swap– —–io—- –system– —-cpu—-. R b swpd free buff cache si so bi bo in cs us sy id wa. 0 0 100152 2436 97200 289740 0 1 34 45 99 33 0 0 99 0. Bi 从块设备读入数据的总量 读磁盘 每秒kb。 Bo 块设备写入数据的总量 写磁盘 每秒kb. Cs列表示每秒产生的上下文切换次数,如当 cs 比磁盘 I/O 和网络信息包速率高得多,都应进行进一步调查。 Us 列显示了用户方式下所花费 CPU 时间的百分比。 这里us sy的参考值为80%,如果us sy 大于 80%说明可能存在CPU不足。 If you enjoyed this article, please consider sharing it! Click here to cancel reply.
erayjiang.com
I'M HERE - eRay Jiang
http://www.erayjiang.com/i-am-here
Items from page My Favor. Sorted by title, link. View more. Http:/ blog.eray.cn. Items from page My Personal Sites. Sorted by title, link. View more. Http:/ www.facebook.com/erayjiang. Https:/ www.google.com/profiles/100844403865108793678. Http:/ www.douban.com/people/erayjiang/. Items from page My Footprints. Sorted by vender, link. View more.
blog.etina.net
谷歌技术”三宝”之BigTable(转)
http://blog.etina.net/2013/09/25/谷歌技术三宝之bigtable(转).html
谷歌技术”三宝”之BigTable 转. On 2013/09/25, in 技术. 本文转自 http:/ blog.csdn.net/opennaive/article/details/7532589. 相当多的google应用使用了BigTable,比如Google Earth和Google Analytics,因此它和 GFS. 在这里推荐一篇文章 需要翻墙 Understanding HBase and BigTable. 下文对BigTable的数据模型和基本工作原理进行介绍,而各种优化技术 如压缩、Bloom Filter等 不在讨论范围。 Bigtable不是关系型数据库,但是却沿用了很多关系型数据库的术语,像table 表 、row 行 、column 列 等。 Understanding HBase and BigTable. Bigtable的键有三维,分别是行键 row key 、列键 column key 和时间戳 timestamp ,行键和列键都是字节串,时间戳是64位整型 而值是一个字节串。 8220;1″ : {sth.},/ 一行. 8220;A” : {.
blog.etina.net
Netty系列之Netty高性能之道
http://blog.etina.net/2014/06/13/netty系列之netty高性能之道.html
谷歌技术”三宝”之BigTable 转. On 2014/06/13, in 技术. 转自 http:/ www.infoq.com/cn/articles/netty-high-performance. If you enjoyed this article, please consider sharing it! Click here to cancel reply. Mail (will not be published) (required). Go To Top ». Thanks for dropping by!
blog.etina.net
linux
http://blog.etina.net/tag/linux
On 2010/09/14, in 技术. Paste t1.txt t2.txt 将 t2.txt 的内容追加到 t1.txt 的尾列。 1) 查看 ipcs -m. 2) 删除 ipcrm -m ShmId 或 ipcrm -M ShmKey. Tcpdump -Xlnps0 -i eth1 src[或 dst] host 172.23.4.2 and src[或 dst] port 9999 -x. 如果抓从本机发到本机的包,则需要设置 -i l0, 表示从环形接口发的包。 Netstat -lupn 查看监听的 udp 端口. Netsat -ltpn 查看监听的 tcp 端口. Go To Top ». Thanks for dropping by!
blog.etina.net
Tina's Blog
http://blog.etina.net/page/2
On 2012/03/16, in 技术. 原文链接 http:/ ixdba.blog.51cto.com/2895551/541355. 其次,linux进行页面交换是有条件的,不是所有页面在不用时都交换到虚拟内存,linux内核根据 最近最经常使用 算法,仅仅将一些不经常使用的页面文件交换到虚拟内存,有时我们会看到这么一个现象 linux物理内存还有很多,但是交换空间也使用了很多。 Total used free shared buffers cached. Mem: 16402432 16360492 41940 0 465404 12714880. Swap: 8193108 264 8192844. 也就是linux上运行的应用程序可以使用的内存大小,即free命令第三行 (-/ buffers/cached) 的输出,可以看到,此系统已经使用的内存才3180208K,而空闲的内存达到13222224K,继续做这样一个计算. 41940 465404 12714880 13222224. Find /* -name *.conf. 65536 0 records in. Mem: 20666...
blog.etina.net
谷歌技术”三宝”之MapReduce(转)
http://blog.etina.net/2013/09/25/mapreduc.html
Gcc g Linux下动态库 静态库 转. On 2013/09/25, in 技术. 本文转自 http:/ blog.csdn.net/opennaive/article/details/7514146. 江湖传说永流传 谷歌技术有”三宝”,GFS、MapReduce和大表 BigTable. HDFS 或GFS 为上层提供高效的非结构化存储服务,HBase 或BigTable 是提供结构化数据服务的分布式数据库,Hadoop MapReduce 或Google MapReduce 是一种并行计算的编程模型,用于作业调度。 Map函数 接受一个键值对 key-value pair ,产生一组中间键值对。 Map(String key, String value):. For each word w in value:. EmitIntermediate(w, ”1″);. Reduce(String key, Iterator values):. Values: a list of counts. Int result = 0;. For each v in values:. 4] Evaluat...
blog.etina.net
MySQL如何避免使用Linux的swap分区而提升读写性能
http://blog.etina.net/2012/09/19/mysql如何避免使用linux的swap分区而提升读写性能.html
On 2012/09/19, in 技术. 转自 http:/ blog.chinaunix.net/uid-540802-id-3026903.html. 1、/proc/sys/vm/swappiness的内容改成0 临时 ,/etc/sysctl.conf上添加vm.swappiness=0 永久. 2、修改MySQL的配置参数innodb flush method,开启O DIRECT模式。 具体的配置方法可以参考 http:/ harrison-fisk.blogspot.com/2009/01/enabling-innodb-large-pages-on-linux.html. Mlockall()的flag位可以是MCL CURRENT和MCL FUTURE的任意组合,分别代表了 保持已分配的地址空间常驻物理内存 和 保持未来分配的地址空间常驻物理内存。 Mysqld调用mlockall()的方式有点出乎意料,在init server components()函数里传给mlockall()的flag是MCL CURRENT,也就是说之后申请的内存一概不用锁住。 OS LOG FILE &.