Python-K8S

关闭 Mac 上的虚拟内存

查看当前正在使用的虚拟内存:

$ sysctl vm.swapusage
vm.swapusage: total = 1024.00M  used = 354.50M  free = 669.50M  (encrypted)

关闭虚拟内存以后,系统里还保留着这些用作虚拟内存的交换文件,可以删除:

$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

$ sudo rm /private/var/vm/swapfile*

用了一段时间还没有遇到系统不稳定问题,如果发现系统不稳的话可以重新开启虚拟内存:

$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

分类:

技术点:

相关文章:

  • 2022-02-15
  • 2021-12-12
  • 2022-01-01
  • 2021-12-05
猜你喜欢
  • 2021-12-17
  • 2021-06-30
  • 2021-08-12
  • 2021-07-23
  • 2021-06-09
  • 2021-12-02
相关资源
相似解决方案