-
-
Notifications
You must be signed in to change notification settings - Fork 685
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 frequent disk write activity #3127
Comments
Zellij takes snapshots of all active sessions every 1sec (link). I guess that might be all the noise that you are seeing. Looking at the docs, there is no way to change the default interval, but you can disable it all together with |
I can confirm it is the session being serialized, maybe exposing a setting to change the frequence would be nice to have. |
Configuration option sounds like a welcome step forward - for example I personally would dial it down to something more like 60sec-5min on my own systems given the opportunity. If it doesn't already, maybe also ensure that the session-quit command (Ctrl-O Q?) does one last flush of the current state to the serialized copy. |
I believe this is already an option |
From the code and this comment it seems it's available as a config var: #2946 (comment) I've seen some other options undocumented (they aren't generated from code). |
Also, in this PR the default serialization interval changed from 1s to 60s: |
PR #2923 (v0.39.1) introduced the serialization interval config (not documented yet) and PR #2951 (v0.39.2) changed the default interval from 1sec to 60sec for how often the layout is serialized into memory. But the background job still writes into both session-metadata.kdl and session-layout.kdl (only after its first flush in this case) files every second for all active sessions (code), regardless of what the |
I disabled |
For me it's 150-200 KB/s of read and around 80-100 KB/s of write. I have 3 sessions almost always running, each reads the whole config each second, and writes seemingly only it's part to it. So far I was just hoping that kernel/fs-driver optimizes those writes somehow and it's not actually always writes to the device. It would be very nice to have that thing configurable. |
In addition to disabling session serialization you can now also disable writing the session metadata to disk with: |
I've made a little draft PR just to illustrate one possible solution to the issue - just making the poll interval configurable |
Seems like this has already found it's way into zellij as: |
Unfortunately the |
there is the downside of increasing this interval is that you will not see up-to-date session information in the session manager |
Maybe it should save session information only when something is changed (i.e. still run a timer, but skip serializing when nothing has changed) and load all session data only when that session manager is being accessed? |
i can add my opinion since noone else answered yet: |
Synchronising multiple instances on a file seems alright, but only as long as that file is in-memory. I feel that writes to persistent disk are only necessary on events like shutting down or explicit user saves, but permissible under timers that let disks idle/sleep, so at least 2 minutes, preferably 5+
This would probably help unless something silly like a timestamp is sneaking in and changing the file every time. |
Basic information
zellij --version
: 0.39.2stty size
:uname -av
orver
(Windows): Linux x 6.6.10-1-MANJARO #1 SMP PREEMPT_DYNAMIC x86_64 GNU/LinuxFurther information
Reproduction steps, noticeable behavior, related issues, etc
2. Issues with the Zellij UI / behavior / crash
Issue description
While running in foreground or even detached, the disk activity of zellij seems to do too frequent writes on disk. I have an unusual noisy disk, and I detect what I consider bad behavior on software by the noise the disk does. After trying zellij for a few days, I noted my disk was a lot more noisy than habitual. Looking at
sudo iotop
I can see zellij doing lots of tiny writes too frequent which is causing my disk to spin when my computer should be idle. Other software causes this kind of writes, mostly writing sessions to disk, like firefox. But the frequency of the writes is not that elevated which keeps the noise to somewhat acceptable threshold, but zellij in comparison to these other seem to be doing something between 3-5 more writes.Minimal reproduction
Other relevant information
The text was updated successfully, but these errors were encountered: