Skip to content
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 memory when detached? #3646

Closed
adudenamedruby opened this issue Oct 5, 2024 · 4 comments
Closed

Zellij memory when detached? #3646

adudenamedruby opened this issue Oct 5, 2024 · 4 comments

Comments

@adudenamedruby
Copy link

Hi. I'm pretty new to zellij, coming from tmux, and I've set it up so it works great for me. I'm switching because, honestly, the borders around the panes, lol. I'm a sucker for great visual aesthetics. Hoping ya'll can provide some context or me. So I'm in my base terminal, detached from either zellij or tmux, with the following state

Screenshot 2024-10-05 at 6 58 46 AM

In both multiplexers, I've made all windows/tabs and panes/splits be at the cli, not running anything in the background. And if I check out activity monitor, I get the following

Screenshot 2024-10-05 at 7 02 21 AM Screenshot 2024-10-05 at 7 02 38 AM

Why the vast difference in memory footprint & threads when I'm detached and not running anything? Is this expected?

versioning:
zellij 0.40.1
tmux 3.5
wezterm 20240203-110809-5046fc22
macOS 14.7

@giyany
Copy link

giyany commented Oct 8, 2024

Zellij and tmux are different pieces of software and naturally will have different memory footprints. I'm not sure what the question is otherwise, nothing here seems unusual or like a problem unless I'm misunderstanding.

@adudenamedruby
Copy link
Author

Totally fair. Just a new piece of software to me, and I'm asking questions to better get to know it. It just seemed big given where I'm coming from. I'll often have 20-30 sessions open at a time for stuff, and having 2-3G gone just for having a session open, not even having processes running in them, seemed odd to me. But if this is the expected behaviour, no worries.

@giyany
Copy link

giyany commented Oct 8, 2024

Yeah, that's fair. There's work on improving memory usage and of course resolving memory leaks, like #1625. It's the "why is this software not another software" that has no straightforward answer. If you want to learn about the inner workings of zellij, there are good discussions on the Discord/Matrix (and also good vibes!).

@imsnif
Copy link
Member

imsnif commented Oct 9, 2024

Also, if I may add: Zellij is a runtime. Runtimes tend to take up more memory. As the issue template says, it's a different app with different goals that behaves differently.

A tip about memory utilization monitoring in this context (if I may): be sure you're measuring the right thing (eg. resident vs. virtual). The rust allocator tends to be a bit greedy when releasing memory, but this should not actually affect your system. More on this in the issue linked by @giyany above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants