Fractal is continously writing to disk
When Fractal is idle, it is still continuously writing to disk with a substantial rate (also leading to continuous CPU usage). The rate seems to depend on the connected account(s). For my matrix.org account it was writing with 10 MB/s continuously, for the account on my own homeserver it is doing 1MB/s. Signing out of accounts immediately lowers the rate.
Stracing reveals that it is probably the DB part of the SDK that is the cause of this. But, I think it is worth to keep track of this from the Fractal side.
Steps to reproduce
Just log in to some accounts. Monitor disk I/O usage using htop or some other tool.
Information
-
This bug is reproducible from the latest nightly build - Fractal Version: 5.alpha-a6f293cc
- OS Version: Debian 11 (bookworm/sid)
- Installation Source: GNOME Nightly
- Homeserver: matrix.org, my own
Output of 5 seconds of stracing on my laptop with only one account configured for Fractal:
$ sudo strace -t -e pwrite64 -fp 7229
strace: Process 7229 attached with 19 threads
[pid 7278] 15:15:07 pwrite64(19, "\247\276\203\377\377\377wA\337\377\377\177\0\0\200A\337\377\377\177\244\270\16F\10\371)\n\372\321\27\4"..., 186842, 3145728) = 186842
[pid 7276] 15:15:07 pwrite64(19, "\234X5\332\10\371\312\232\372\321\27\4\24\266\0\0\0\0\1+\0\v!\0\26\212\331\232\212'\5]"..., 337446, 3332570) = 337446
[pid 7280] 15:15:07 pwrite64(19, "\211\7\251S\377\377oA\337\377\377\177\0\0xA\337\377\377\177\336\256>\305\10\371\"\344\372\322\27\4"..., 189451, 3670016) = 189451
[pid 7277] 15:15:07 pwrite64(19, "7\212\356\375\10\370\254\372\322\27\4.\366x\0\0\0\0\1+\0\t!\2\324\207\252\203\325\t\16\353"..., 334837, 3859467) = 334837
[pid 7273] 15:15:08 pwrite64(19, "\322\233\243\214\377\377gA\337\377\377\177\0\0pA\337\377\377\177\20\276W\224\10\371!A\372\323\27\4"..., 184016, 7340032) = 184016
[pid 7278] 15:15:08 pwrite64(19, "\350Q%\362\10\371\f]\372\323\27\4\r\0\0\0\0\0\0\1\240\0\"\0030Q\224\207Y-\211s"..., 340272, 7524048) = 340272
[pid 7280] 15:15:08 pwrite64(19, "\246A\251\373\377\377_A\337\377\377\177\0\0hA\337\377\377\177\24q\224\16\10\3715\266\372\324\27\4"..., 189991, 4718592) = 189991
[pid 7279] 15:15:08 pwrite64(19, "`[\237\210\10\371\247V\372\324\27\4\4\370\203\0\0\0\0\1\265\0\tB\27_Jb1l\343\373"..., 334297, 4908583) = 334297
[pid 7275] 15:15:09 pwrite64(19, "\375\335\243$\377\377WA\337\377\377\177\0\0`A\337\377\377\177\321Y9\22\10\371\37\242\372\325\27\4"..., 186645, 5767168) = 186645
[pid 7276] 15:15:09 pwrite64(19, "\313\317WU\10\371\312\232\372\325\27\4\24\266\0\0\0\0\1+\0\v!\0\26\212\331\232\212'\5]"..., 337643, 5953813) = 337643
[pid 7280] 15:15:09 pwrite64(19, "gza\231\377\377OA\337\377\377\177\0\0XA\337\377\377\177\264d.\364\10\371)\n\372\326\27\4"..., 186842, 2621440) = 186842
[pid 7274] 15:15:09 pwrite64(19, "`\35\214r\10\370\254\372\326\27\4.\366x\0\0\0\0\1+\0\t!\2\324\207\252\203\325\t\16\353"..., 337446, 2808282) = 337446
[pid 7275] 15:15:10 pwrite64(19, "<\346kF\377\377GA\337\377\377\177\0\0PA\337\377\377\177\256!\336\r\10\371\"\344\372\327\27\4"..., 189451, 4194304) = 189451
[pid 7278] 15:15:10 pwrite64(19, "\277\306G}\10\371\f]\372\327\27\4\r\0\0\0\0\0\0\1\240\0\"\0030Q\224\207Y-\211s"..., 334837, 4383755) = 334837
[pid 7279] 15:15:10 pwrite64(19, "\271\313\330p\377\377?A\337\377\377\177\0\0HA\337\377\377\177\1\217\207\343\10\371!A\372\330\27\4"..., 184016, 6815744) = 184016
[pid 7277] 15:15:10 pwrite64(19, "Pt\3053\10\371\240W\372\330\27\4@\0\0\0\0\0\0\0\f!\26\373e\32\354\211\2505\0225"..., 340272, 6999760) = 340272
[pid 7276] 15:15:11 pwrite64(19, "\342W\322\257\377\3777A\337\377\377\177\0\0@A\337\377\377\177\366\352mm\10\371%\346\372\331\27\4"..., 185124, 7864320) = 185124
[pid 7276] 15:15:11 pwrite64(19, "\275\203\365z\10\371\247V\372\331\27\4\4\370\203\0\0\0\0\1\265\0\tB\27_Jb1l\343\373"..., 339164, 8049444) = 339164
[pid 7280] 15:15:11 pwrite64(19, "\24\372H\35\377\377/A\337\377\377\177\0\08A\337\377\377\177u\317\244\261\10\3715\266\372\332\27\4"..., 189991, 5242880) = 189991
[pid 7273] 15:15:11 pwrite64(19, "\330\242Z8\10\370\254\372\332\27\4.\366x\0\0\0\0\1+\0\t!\2\324\207\252\203\325\t\16\353"..., 334297, 5432871) = 334297
[pid 7278] 15:15:12 pwrite64(19, "OfB\302\377\377'A\337\377\377\177\0\0000A\337\377\377\177\5\240\276\f\10\371)\n\372\333\27\4"..., 186842, 3145728) = 186842
[pid 7279] 15:15:12 pwrite64(19, "\370\270\210\265\10\371\312\232\372\333\27\4\24\266\0\0\0\0\1+\0\v!\0\26\212\331\232\212'\5]"..., 337446, 3332570) = 337446
[pid 7274] 15:15:12 pwrite64(19, ";\274H\265\377\377\37A\337\377\377\177\0\0(A\337\377\377\177\240;)\37\10\371\37\242\372\334\27\4"..., 186645, 6291456) = 186645
[pid 7277] 15:15:12 pwrite64(19, "\276AF\252\10\371\f]\372\334\27\4\r\0\0\0\0\0\0\1\240\0\"\0030Q\224\207Y-\211s"..., 337643, 6478101) = 337643
File descriptor 19 of the Fractal process:
$ ls -l /proc/7229/fd/19
lrwx------ 64 paul paul 31 May 15:16 /proc/7229/fd/19 -> /home/paul/.var/app/org.gnome.Fractal.Devel/data/.../matrix-sdk-state/db