1. 使用 diff 比较文件报错
报错如下:
Binary files file1.txt and file2.txt differ
解决方案:
diff -a file1.txt file2.txt
2. SystemTap使用技巧
ref
https://blog.51cto.com/13145856/1958120
3. 让 io_submit 阻塞的另一种方法
https://zhuanlan.zhihu.com/p/100026388
飞行的请求超过 nr_request 可能阻塞
cat /sys/block/nbd0/queue/nr_requests
4. iostat
ref
https://blog.csdn.net/qq_20332637/article/details/82146753
使用iostat分析IO性能
5. 磁盘/FS 性能测试工具 —— fio
ref
https://www.cnblogs.com/zero-gg/p/9296603.html
IO测试工具之fio详解
6. 在Linux系统下获取有关硬件方面的信息
ref
https://ipcmen.com/dmidecode
dmidecode
DMI(Desktop Management Interface,DMI)
查看服务器的型号、版本、SN号等
7. Protobuf
Protobuf是一种平台无关、语言无关、可扩展且轻便高效的序列化数据结构的协议,可以用于网络通信和数据存储。
https://www.jianshu.com/p/2265f56805fa
TBD
8. cmake 3 安装问题
Cmake出现CMake Error: Could not find CMAKE_ROOT !!!
hash -r
清除缓存
系统初始hash表为空,当外部命令执行时,默认会从PATH路径下寻找该命令,找到后会将这条命令的路径记录到hash表中,当再次使用该命令时,shell解释器首先会查看hash表,存在将执行之,如果不存在,将会去PATH路径下寻找,利用hash缓存表可大大提高命令的调用速率 (ref https://blog.csdn.net/weixin_42758707/article/details/90106031)
9. pushd popd
TBD
10. 修改大页内存不立即生效
echo 3 | sudo tee /proc/sys/vm/drop_caches
(ref - https://stackoverflow.com/questions/17303681/how-to-really-free-hugepages-in-linux-for-use-by-a-new-process)
11. SPDK IOAT 使用
https://software.intel.com/content/www/us/en/develop/articles/fast-memcpy-using-spdk-and-ioat-dma-engine.html
官方用例,在CPU紧张的场景可以考虑
12. 屏蔽clang检查
#ifndef clang_analyzer
#endif /* clang_analyzer */