Modify Inotify Watches Limit to Improve IDEA Performance
Official documentation For an intelligent IDE, it is essential to be in the know about any external changes in files it is working with - e.g. changes made by VCS, or build tools, or code generators etc. For that reaso
目录4 个章节
Official documentation
For an intelligent IDE, it is essential to be in the know about any external changes in files it is working with - e.g. changes made by VCS, or build tools, or code generators etc. For that reason, IntelliJ platform spins background process to monitor such changes. The method it uses is platform-specific, and on Linux, it is the Inotify facility.
Inotify requires a "watch handle" to be set for each directory in the project. Unfortunately, the default limit of watch handles may not be enough for reasonably sized projects, and reaching the limit will force IntelliJ platform to fall back to recursive scans of directory trees.
To prevent this situation it is recommended to increase the watches limit (to, say, 512K)
In short, when IDEA is running, a background process constantly scans the project folder for file changes. On Linux this is implemented using the Inotify feature, but Linux has a watch handle limit — simply put, a watch size limit. Typically this limit is smaller than what our projects need, so IDEA has to frequently scan the project directories itself instead of using the system feature, which causes it to lag.
The way to fix this is to change the system configuration and raise this limit.
Solution
Add the following line to either /etc/sysctl.conf file or a new *.conf file (e.g. idea.conf) under /etc/sysctl.d/ directory:
fs.inotify.max_user_watches = 524288Then run this command to apply the change:
sudo sysctl -p --system
Official documentation
https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
About

Learn more on my WeChat Official Account:DealiAxy Every post was in my blog:blog.deali.cn
_EOF_
Modify Inotify Watches Limit to Improve IDEA Performance
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
Python、CSharp、Go、Nextjs,不同框架的性能到底差多少?
AspNetCore 9 以 15k RPS 碾压全场,Go+Gin 内存省但吞吐也就那样。Django 老调重弹,至于 Next.js 做 API?别为难它了。
2025-12-01 · 杂七杂八 · 约 1 分钟
我也入坑折腾黑苹果,还成功了~
前言 Windows真的太难做开发了啊。。。Linux本来是最好的选择,然而又缺少太多软件,像微信、QQ这些就是想都不要想腾讯会给你开发的,用wine版本的又卡,用网页版又不能发表情包= = 所以很难受,也没有多少选择了,只剩下一个mac可以选,但是苹果电脑又贵性价比又低,怎么可能买mac呢,于是只能黑苹果啦~~ 先放一张桌面的截图吧,免得后面字太多没人想看。 其实在以前我就了解到有黑苹果这种东西
2021-12-18 · 杂七杂八 · 约 1 分钟
Git-Commit-Emoji
| emoji | emoji 代码 | commit 说明 | | :---------------- | :---------------------------- | :-------------------- | | 🎉 (庆祝) | :tada:
2023-01-02 · 杂七杂八 · 约 1 分钟
Chrome浏览器单独删除已保存的地址
步骤 在地址栏中输入地址,按方向键选择需要删除的地址, Windows/Linux Shift + Delete 删除。
2021-12-18 · 杂七杂八 · 约 1 分钟
讨论
共 0 条加载评论中…