Open dstu opened 11 months ago
The curl_alt_svc_cache is written by curl, there is not really a way for us to disable that without disabling http/3 support. You can open an upstream curl issue though, I think?
The 2 file descriptors for lmdb are normal, one is for writing and one is for reading. The high disk load from that is because on every sync we need to persist the new sync token before we sync again. Otherwise some messages might become undecryptable. Now why you see so many syncs, I can't say, you need to check your sync content for that. You probably get a lot of presence events?
Thanks for taking a look.
The server I'm connected to is pretty sleepy (unfederated, about 10 or 20 people connected/active at any given time, frequent long stretches where no one is saying anything in any rooms). I suppose it's possible that someone could be toggling between online and offline. (Maybe they have a crummy Internet connection or flaky client.) But the rate at which I was seeing writes come in was a lot higher than what I would expect, even if someone were compulsively flipping through apps on a cell phone and causing their Matrix client to flip their online status rapidly.
To complicate things further, these writes aren't happening right now. If I notice that something seems to trigger them, I'll share what it is.
Is there an easy way to get debugging traces with built-in logging to explain sync events (perhaps with an environment variable or suitable command line parameter)? If so, I can make a habit of running Nheko under that configuration.
I can also get debugging symbols and take a look in gdb (although this is not a familiar codebase, so I may not find much). I don't have a lot of time for debugging during the week, unfortunately, but this might be reasonably straightforward.
No, when I added support for dumping the sync, it caused quite some CPU usage even when turned off, so I removed it again. I usually just patch my Nheko to write it out when I need it.
I have similar experiences, but I haven't done such extensive I/O research on it. When nheko is running, my HDD is constantly active (I can hear it, because it's a HDD), also the LED is blinking and the "conky" app shows disk activity. As soon as I close nheko, the system calms down. This is a Debian based distro, with no systemd. IceWM window manager.
Nheko Version: 0.11.3-2
I'm using it on normal use case, not such limited as reported above. I'm in various chat rooms, and I have various 1-1 contacts on it. Still, I'd be very happy if this could be improved e.g. by using a memory cache and less disk writes. For me the only solution is to start nheko when I really need the Matrix - otherwise the HDD activity is too annoying. So I look in for messages, answer them and quit.
Thanks in advance if any improvement could be done for this. Maybe majority of the users do not see it because of using SSD and there is no "noise"?
Mh i also see this in iotop. i did ignore it thou until today. and luckily someone already opened an issue, thanks :3
A possible data point: I had someone tell me today that my presence indicator on our server was flickering between away and present. ("a moment ago it was just "raaaaaaaave"")
I was logged in with Nheko at the time, but the machine that was logged in was idle. I was also logged in on my phone (Element Android client) and in a browser tab on a laptop (Element Web client). The flickering presence indicator happened when the browser tab was the most recent client I had used. The browser tab was in the background. (I was on another workspace, so the browser was effectively minimized/not in focus.)
I make two tentative inferences from this:
Does anyone else who is experiencing this issue habitually connect with another client at the same time and use it while Nheko is idle? Has anyone who shares a Matrix channel with you ever noticed your away status flickering rapidly?
@dstu I do not use multiple clients at same time. I'm using Matrix on PC only, mainly when booting Windows I use Element, when booting Linux I use NHeko. Not at same time, since it's one computer. I'm not aware that my "status" would flicker, but I don't know. Thanks for your research, I hope there will be some mitigation to this problem. I also checked "iotop" and noticed NHeko is at top.
Describe the bug
When Nheko is sitting idle and connected to a low-traffic server (unfederated, no one's saying anything or sending reactions or other events I can discern in any rooms I'm in), I see I/O activity that I do not expect.
iotop
reports writes in the range of 3-5 MB/s.To Reproduce
What happened?
If I attach
strace
, I see that Nheko is in some sort of tight I/O. (See log output field for a snippet.) Operations I can readily discern which keep happening:$HOME/.cache/nheko/nheko/curl_alt_svc_cache.txt
. This file consists of comments and appears to be a stub.$HOME/.local/share/nheko/nheko/407374753a777a72647a2e636f6f6c/data.mdb
.Does (1) need to happen? Maybe it's the result of using libcurl to monitor for network events. Seems weird, but I'm not an expert on libcurl or Nheko internals.
(2) seems weird. The contents of
data.mdb
keep changing (verified by looking at checksums), but its size does not. Is there some metadata that gets updated on every iteration of a polling loop? And why is the same file open via two different file descriptors? I also see$HOME/.local/share/nheko/nheko/407374753a777a72647a2e636f6f6c/lock.mdb
, which suggests that it should not be.(3) doesn't seem unusual to me.
Expected behavior
No excessive writes or network activity when Nheko is idle.
Screenshots
No response
Version
0.11.3-2+b4
Operating system
Linux
Installation method
Some repository (AUR, homebrew, distribution repository, PPA, etc)
Qt version
No response
C++ compiler
No response
Desktop Environment
X11 (just Window Maker, no fancy DE)
Did you use profiles?
Relevant log output
Backtrace
No response