随笔分类 -  Linux系统技术

摘要:有关Cache 文件缓存是提升性能的重要手段。毋庸置疑,读缓存(Read caching)在绝大多数情况下是有益无害的(程序可以直接从RAM中读取数据),而写缓存(Write caching)则相对复杂。Linux内核将写磁盘的操作分解成了,先写缓存,每隔一段时间再异步地将缓存写入磁盘。这提升了IO 阅读全文
posted @ 2020-08-25 13:24 CobbLiu 阅读(914) 评论(0) 推荐(0) 编辑
摘要:转载自系统技术非业余研究 本文链接地址: systemtap观察page_cache的使用情况 在规划服务器的内存使用的时候经常需要知道应用在理想情况下会使用多少的pagecache, 我们好预先把这个内存预留出来. 这个值操作系统没有提供可查看的管道,我们只能自己写个脚本来实现. 下面的syste 阅读全文
posted @ 2020-07-31 13:16 CobbLiu 阅读(249) 评论(0) 推荐(0) 编辑
摘要:今天来说说/proc/diskstats文件,这个文件用于显示磁盘、分区和统计信息; [root@VM_54_118_centos ~]# cat /proc/diskstats 253 0 vda 222026 464 14148933 2387763 15975930 14162283 2610 阅读全文
posted @ 2020-03-06 21:43 CobbLiu 阅读(2634) 评论(0) 推荐(0) 编辑
摘要:TCMalloc的一些细节 阅读全文
posted @ 2019-07-16 18:39 CobbLiu 阅读(3191) 评论(0) 推荐(0) 编辑
摘要:API是软件系统的核心,而软件系统的复杂度Complexity是大规模软件系统能否成功最重要的因素。但复杂度Complexity并非某一个单独的问题能完全败坏的,而是在系统设计尤其是API设计层面很多很多小的设计考量一点点叠加起来的(也即John Ousterhout老爷子说的Complexity is incremental【8】)。成功的系统不是有一些特别闪光的地方,而是设计时点点滴滴的努力积累起来的。 阅读全文
posted @ 2019-01-03 22:40 CobbLiu 阅读(565) 评论(0) 推荐(1) 编辑
摘要:A brief tour of some of the important components of a Google Datacenter. A photo of the interior of a real Google Datacenter in North Carolina. Seen h 阅读全文
posted @ 2018-11-23 20:03 CobbLiu 阅读(239) 评论(0) 推荐(0) 编辑
摘要:PID控制算法是工业界使用极其广泛的一个负反馈算法,相信这个算法在做系统软件时也有用武之处,这里摘录了知乎上的一篇文章,后面学习更多后自己总结一篇 阅读全文
posted @ 2018-10-18 10:09 CobbLiu 阅读(1986) 评论(0) 推荐(0) 编辑
摘要:The primary tool for inspecting Linux disk performance is iostat. The output includes many important statistics, but they’re difficult for beginners t 阅读全文
posted @ 2018-10-13 02:07 CobbLiu 阅读(869) 评论(0) 推荐(0) 编辑
摘要:These commonly-used fields in iostat shouldn't be commonly-used. 阅读全文
posted @ 2018-10-13 01:35 CobbLiu 阅读(3036) 评论(0) 推荐(0) 编辑
摘要:失败后的core栈像下面这样: core的原因很显然:"Illegal instruction",指令非法,查看core处的汇编代码: shrx指令属于bmi2指令集,查看运行该binary的机器上有无bmi2指令集: cat /proc/cpuinfo | grep flags 发现该CPU上没有 阅读全文
posted @ 2017-11-03 12:49 CobbLiu 阅读(3395) 评论(0) 推荐(0) 编辑
摘要:The term 'Mock Objects' has become a popular one to describe special case objects that mimic real objects for testing. Most language environments now have frameworks that make it easy to create mock objects. What's often not realized, however, is that mock objects are but one form of special case test object, one that enables a different style of testing. In this article I'll explain how mock objects work, how they encourage testing based on behavior verification, and how the community around th 阅读全文
posted @ 2017-10-26 20:31 CobbLiu 阅读(267) 评论(0) 推荐(0) 编辑
摘要:一个ftrace的使用小示例,备忘用。 阅读全文
posted @ 2017-08-16 09:24 CobbLiu 阅读(387) 评论(0) 推荐(0) 编辑
摘要:There are times when you want to wrap a library function in order to provide some additional functionality. A common example of this is wrapping the standard library’s malloc() and free() so that you can easily track memory allocations in your program. While there are several techniques for wrapping library functions, one well-known method is using dlsym() with RTLD_NEXT to locate the wrapped function’s address so that you can correctly forward calls to it. 阅读全文
posted @ 2017-08-11 20:53 CobbLiu 阅读(945) 评论(0) 推荐(0) 编辑
摘要:Maybe virtual memory over commit is prevented in your system. If it is prevented, then the virtual memory can not be bigger than sizeof physical RAM + 阅读全文
posted @ 2017-08-11 15:24 CobbLiu 阅读(773) 评论(0) 推荐(0) 编辑
摘要:32位的变量做自增自减的性能比对它做原子加减操作的性能好。 阅读全文
posted @ 2017-06-26 19:21 CobbLiu 阅读(819) 评论(0) 推荐(0) 编辑
摘要:本文描述如何利用blktrace, blkparse和btt对IO进行一些常见的分析 阅读全文
posted @ 2017-06-13 18:50 CobbLiu 阅读(8721) 评论(0) 推荐(0) 编辑
摘要:blktrace分析IO性能 阅读全文
posted @ 2017-06-13 16:27 CobbLiu 阅读(993) 评论(0) 推荐(0) 编辑
摘要:记录一下,省得用的时候到处查 阅读全文
posted @ 2017-06-13 09:03 CobbLiu 阅读(3168) 评论(0) 推荐(0) 编辑
摘要:If you’re running Linux, then it’s likely that you’ve needed to change some options for your file systems. Getting acquainted with fstab can make the whole process a lot easier, and it’s much easier than you think. 阅读全文
posted @ 2017-06-07 08:37 CobbLiu 阅读(435) 评论(0) 推荐(0) 编辑
摘要:如何编译dpdk和spdk的动态库 阅读全文
posted @ 2017-04-24 21:02 CobbLiu 阅读(2044) 评论(0) 推荐(0) 编辑