william

Keep Calm and Markdown.

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)

kitty 终端模拟器

安装 1 2 3 4 5 6 ## magick-cli sudo apt-get install imagemagick sudo apt-get install luajit sudo apt-get install luarocks luarocks install magick tmux.conf 1 2 3 4 5 ##----------------------------------------------------------------------------- ## HACK: for kitty set -gq allow-passthrough on set -g visual-activity off ##-----------------------------------------------------------------------------

nvim dap 映射 r 快捷键

最近在研究如何使用 nvim-dap 进行 debugging。在 gdb,我们可以很方便的使用单个按键就可以触发一些行为,如

  • r: run
  • c: continue
  • s: step-in

那么,我的想法也是在 nvim-dap 实现这样快捷键 r 来模拟 run 的行为。现在的问题是:由于在 normal mode,单个按键 r 代表 replace one character

因此,我们需要在 nvimbuffers 去识别是否启动了 nvim-dap

  • 如果存在 dap-repl,则映射 r
  • 如果找不到,则回退到 replace 的功能。
0%