(转)Linux 网络大流量传输优化方法
提升 Linux 性能。
提升 Linux 性能。
今天在看这篇介绍 Linux 性能调优 的博客(Linux Performance: Almost Always Add Swap Space),其中涉及到如何调整内核内存的调整机制。主要的参数有
swappiness: This control is used to define how aggressively the kernel will swap memory pages. Higher values will increase aggressiveness; lower values decrease the amount of swap. (default = 60, recommended values between 1 and 60) Remove your swap for 0 value, but it is usually not recommended in most cases.vfs_cache_pressure: Controls the kernel’s tendency to reclaim the memory, which is used for caching of directory and inode objects. (default = 100, recommend value 50 to 200)最近在研究如何使用 nvim-dap 进行 debugging。在 gdb,我们可以很方便的使用单个按键就可以触发一些行为,如
r: runc: continues: step-in那么,我的想法也是在 nvim-dap 实现这样快捷键 r 来模拟 run 的行为。现在的问题是:由于在 normal mode,单个按键 r 代表 replace one character。
因此,我们需要在 nvim 的 buffers 去识别是否启动了 nvim-dap
dap-repl,则映射 r;replace 的功能。今天看到一个帖子:Just realized you can put shell script inside c source files,想到以前有个朋友也是这么使用 c,觉得挺神奇的。
这个是在 c 源代码文件,使用 macro 宏定义一组 shell 命令,然后再退出 shell,这样就不会在继续执行真正的 c 代码了。这样做的好处是可以使用一个命令 sh main.c 即可快速运行可执行文件,对于一些简单部署的任务比较方便。
|
|
|
|