ulyssa / iamb

A Matrix client for Vim addicts
https://iamb.chat
Apache License 2.0
630 stars 45 forks source link

iamb causes a lot of disk write #156

Closed bodqhrohro closed 7 months ago

bodqhrohro commented 1 year ago

Possibly in the mmapped ~/.config/iamb/profiles/bq/matrix/matrix-sdk-state/db, as I see no active write operations in strace.

iotop-c shows around 1 M/s write all the time.

I suppose that's not healthy for my SSD.

tidux commented 10 months ago

Confirmed this is still present in 0.0.9-alpha.1

tidux commented 10 months ago

It looks like this is rooted in the default behavior of the Sled datastore used by the matrix-sdk crate if you write to it too often. Maybe cache more in memory and flush to disk only periodically?

paulcarroty commented 10 months ago

Can't reproduce it on latest dev build.

tidux commented 10 months ago

Can confirm, the sled worker threads no longer show up in iotop on iamb 0.0.9-alpha.1 (999399a) and I'm not seeing elevated disk I/O.

ErrorNoInternet commented 7 months ago

Still seeing this on a2a708f1ae1dc8d08620f1b302b2cafb159cb40a in iotop-c image

ulyssa commented 7 months ago

@ErrorNoInternet I updated the SDK in #200 , which now uses SQLite instead of sled. Testing on my laptop at ec81b72, I'm seeing long periods of inactivity, with the occasional spike up to ~70 K/s. Can you check if a more recent build improves things for you?

ErrorNoInternet commented 7 months ago

Ah I had to compile it manually with cargo and that worked. The Nix flake (nix run github:ulyssa/iamb) was out of date somehow. Seeing basically zero disk usage now :)