-
-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
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
Zellij is killed by OOM #803
Comments
Hey!
This could be, this could also be a compounding issue, eg. the descriptors leaking, and the plugin duplication. Currently we don't have a primitive for sharing plugins across different views, so if you are using plugins (for example in the default layout), they are still copied and that could also explain some part of the ram usage of many tabs. |
Yes. I use default layout. So do that plugins run in child processes or in the main process? (and inheriting plugins memory just because of fork?) |
Also can I use zellij without plugins at all? (i.e. I think tab bar and status bars are plugins too, right?) |
I am sadly not that knowledgeable about the plugin system myself.
Yes, you can. Though I think it is not that comfortable to do it completely Basically the layout-template is describing the plugins in the default context. We are somewhat close in making sharing plugins with multiple tabs possible, |
So looking at the code here: It looks like most work is going on in the main server process, and this forked one is just waiting for user-specified process to exit. To make it use less memory (because copy-on-write on the parent), it should either: quickly do In fact, as far as I can see, zellij already does most of the thing in the parent server process. So it might be better to use This should save tons of memory together with plugin sharing. |
The |
Yes, I think so. |
Cool, I'll try to whip up something in the near future. |
Thank you @tailhook this is awesome input! |
Great! I'm not familiar with codebase for doing a good review, but generally looks okay. |
Basic information
zellij --version
: 0.18.1tput lines
: 42tput cols
: 159uname -av
orver
(Windows): Linux nixos 5.14.10 #1-NixOS SMP Thu Oct 7 05:53:20 UTC 2021 x86_64 GNU/Linuxalacritty --version
: alacritty 0.9.0Further information
Zellij was killed by OOM while dropping all running processes. I'm not sure:
Prior to OOM killing there was high CPU usage spike. I'm not sure if that was by zellij or kernel trying to compress memory (is usually the case before OOM), or other running process inside zellij.
Here is the dmesg log:
Here is the panic I in the terminal running alacritty:
Also I've just noted, that just creating few tabs (running zsh if that matters) gets processes with each new one grows both virtual and RSS memory:
This pattern looks very similar to how descriptors are leaking #796. And this even be related issue.
The text was updated successfully, but these errors were encountered: