We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
理解LINUX的MEMORY OVERCOMMIT
某个程序因为系统内存不被杀掉了,此时,由于没有输出详细的堆栈信息,很难定位问题。 可以设置 overcommit_memory 参数,禁止系统启用 overcommit 机制(原理参考上面链接的文章)。
overcommit_memory
overcommit
echo 2 > /proc/sys/vm/overcommit_memory
这样当系统内存不足时,程序就会主动 panic 从而输出 stack trace(以 Go 为例)。
panic
stack trace
The text was updated successfully, but these errors were encountered:
No branches or pull requests
参考
理解LINUX的MEMORY OVERCOMMIT
使用技巧
某个程序因为系统内存不被杀掉了,此时,由于没有输出详细的堆栈信息,很难定位问题。
可以设置
overcommit_memory
参数,禁止系统启用overcommit
机制(原理参考上面链接的文章)。这样当系统内存不足时,程序就会主动
panic
从而输出stack trace
(以 Go 为例)。The text was updated successfully, but these errors were encountered: