libera/#maemo-leste/ Wednesday, 2024-03-27

arno11Wizzup: i found why conversations UI is randomly so slow to start: the root cause is the tracker, and it affects most qt5 apps.09:34
arno11disabling the tracker with 'tracker daemon -t' speeds up things a lot on the n90009:35
arno11(i noticed that when you launch any qt5 app, tracker-store starts immediately and uses lot of cpu for a couple of sec)09:42
arno11with tracker disabled, qt5 apps start really faster09:44
Wizzup_huh, why would tracker do that11:19
arno11Wizzup: really no idea :(12:11
arno11but without tracker, qt5 apps start in 2-5 sec12:12
Wizzup_maybe it's somehow atime related12:13
Wizzup_do we mount with atime?12:13
Wizzup_relatime12:13
Wizzup_probably dbus can tell us12:15
Wizzup_I haven't noticed this before, but I'll try to reproduce12:15
arno11ok12:15
arno11i haven't noticed this before too12:16
Wizzup_freemangordon: shouldn't we use noatime?12:19
Wizzup_or at least lazyatime12:19
Wizzup_I mean relatime isn't necessarily our problem here wrt tracker, but I don't see why we would keep it enabled since we're mostly on nand/emmc12:21
uvosWizzup_: tracker uses some cpu whenever something in the tracked folders changes which it watches via inotifywait13:24
uvosit seams that in the default configuration its watching $HOME13:24
uvosso maybe qt touches alot of config files13:25
uvosregarless i dont think this antivirus like behavior is sane on a phone and we should restict its scanning tightly to some media directory13:25
Wizzup_uvos: either that or atime13:30
Wizzup_but I agree probably scanning $HOME is not great13:30
Wizzup_I don't think it does that recursively though13:30
uvosit somehow found random media in downloads for me13:30
uvosso i think it dose recusevly13:30
uvosor maybe thats from XDG places spec13:31
Wizzup_you can find in gsettings what it searches13:33
Wizzup_and yeah it does search some xdg docs/download stuff13:33
freemangordonyeah, maybe we shall exclude $HOME16:18
freemangordonWizzup_: why would noatime affect tracker performance?16:19
freemangordondo you think it gets inotified on a file being read?16:20
freemangordonWizzup_: and yes, I also think tracker does recursive scanning16:20
Wizzup_freemangordon: I don't know what inotify does with access time changing16:24
Wizzup_freemangordon:16:24
Wizzup_$ gsettings get org.freedesktop.Tracker.Miner.Files index-recursive-directories16:24
Wizzup_['&DESKTOP', '&DOCUMENTS', '&MUSIC', '&PICTURES', '&VIDEOS', '/mnt/sd/']16:24
Wizzup_$ gsettings get org.freedesktop.Tracker.Miner.Files index-single-directories16:25
Wizzup_['&DOWNLOAD']16:25
Wizzup_I don't see $HOME there16:25
Wizzup_(/mnt/sd is what I added obviously)16:25
Wizzup_I wonder if we awnt to play with 'throttle' and/or 'index-on-battery' perhaps16:26
Wizzup_we could also set enable-monitors to false, but I think the inotify thing is mostly ince16:26
freemangordonok, maybe we shall start miner/extractor from the shell with verbose log enabled, to check if they really do something on qt app starting16:27
freemangordonI am suspicious about the '...is randomly so slow...' part16:29
freemangordonit either runs every time or not16:29
Wizzup_mhm16:29
freemangordonthat could be just a coincidence that tracker runs when he tried to start an app16:29
freemangordonactually conversations is qml, and afaik qml caches shaders16:37
freemangordonthat might somehow interfere16:37
Wizzup_I doubt those are in any of the dirs in index-recursive-directories16:38
arno11freemangordon: i doubt it is a coincidence. when i say 'randomly', that's because sometimes conversations started in 8, 10, 15 or even 20 sec.20:06
arno11now that's 2, 4, 8 sec max20:06
freemangordonI see20:08
freemangordonarno11: could you start tracker processes from console with verbose debug enabled to see what's going on?20:08
arno11sure20:09
arno11tracker daemon -s --set-log-verbosity=debug ?20:11
freemangordonnot sure20:11
freemangordonthere are several processes20:12
freemangordonlemme check20:12
arno11ok20:12
freemangordonarno11: try first with /usr/libexec/tracker-extract -v 320:17
arno11ok20:17
freemangordonand then immediately run some qt process20:17
arno11ok20:17
freemangordonas it will exit after 10 seconds of inactivity20:18
freemangordonif nothing useful, then stop tracker-miner-fs and then start it by hand with /usr/libexec/tracker-miner-fs -n -v 320:19
freemangordonhmm, seems after all $HOME is monitored20:21
freemangordon(tracker-miner-fs:5769): Tracker-DEBUG: 21:37:32.607: Received monitor event:3 (G_FILE_MONITOR_EVENT_CREATED) for file:'file:///home/user/orcexec.NDMv16'20:21
arno11(dinner time) bbiab20:23
Wizzup_it might be monitored but it shouldn't act on it I think20:23
freemangordonwhy it is monitored if we dont act on it?20:24
freemangordonTracker-Message: 21:41:33.921: Setting up directories to iterate from config (IndexSingleDirectory)20:25
freemangordonTracker-Message: 21:41:33.921:   Adding:'/home/user'20:25
freemangordonAdded monitor for path:'file:///home/user', total monitors:120:26
freemangordonso $HOME *is* monitored20:26
freemangordonand it seems qt creates a file there20:26
freemangordon(tracker-miner-fs:4012): Tracker-DEBUG: 21:44:33.736: Processing file 'file:///home/user/orcexec.THNr5D'...20:27
freemangordonwhy the hell creates file in $HOME?!?20:27
freemangordon*qt creates20:27
Wizzup_what files are created there?20:30
Wizzup_btw, I don't think it makes sense for tracker to be this realtime with its indexing20:30
Wizzup_can you check your index single directory gsettings and see what they say?20:30
freemangordonhttps://askubuntu.com/questions/336552/what-are-orcexec-files20:30
freemangordonthis ^^^20:31
Wizzup_freemangordon: what about your gsettings?20:35
Wizzup_do they list $HOME20:35
Wizzup_gsettings get org.freedesktop.Tracker.Miner.Files index-single-directories20:37
Wizzup_and20:37
Wizzup_gsettings get org.freedesktop.Tracker.Miner.Files index-recursive-directories20:37
freemangordonuser@devuan:~$  gsettings get org.freedesktop.Tracker.Miner.Files index-single-directories20:38
freemangordon['$HOME', '&DOWNLOAD']20:38
freemangordonarno11: ^^^ could you check on n90020:38
freemangordonhttps://gstreamer.freedesktop.org/projects/orc.html20:40
freemangordonwho with his right mind creates temp files in $HOME?!?20:41
Wizzup_freemangordon: wow why is $HOME in there20:41
Wizzup_I mean for single I guess it makes sense20:41
freemangordonies, it is in single20:41
Wizzup_not sure actually20:41
freemangordon*yes20:41
Wizzup_in any case, maybe arno can remove the entry from his gsettings and see if it solves the problem20:42
freemangordonI don;t think it should be there20:42
freemangordonmhm20:42
freemangordonthis is the default I  guess20:42
freemangordonwe can fix it20:42
Wizzup_honestly to me it seems like we should set a 'crawling-interval' and disable enable-monitors20:42
Wizzup_and maybe see that the 'throttle' key does20:42
freemangordonno, please, why?20:42
Wizzup_( gsettings list-keys org.freedesktop.Tracker.Miner.Files )20:43
Wizzup_why, well, because it seems to in general wreak havoc on n90020:43
freemangordonif we don;t monitor $HOME it should be better20:44
Wizzup_sure20:44
Wizzup_hopefully20:44
Wizzup_but this could very well be why things are slow(er) during boot too20:44
freemangordonand I prefer to have my music files indexed ASAP, not in 2 hours20:44
freemangordonmhm20:46
Wizzup_https://gitlab.gnome.org/GNOME/tracker-miners/-/issues/23620:47
Wizzup_throttle is set to 0 by default (bad)20:48
Wizzup_I suggest we set initial-sleep to something like 600 (seconds), it's currently 1520:48
freemangordonagree20:48
freemangordonwell, 600 is kinda extreme20:49
Wizzup_it's only 10 minutes20:49
Wizzup_but fine, something high enough at least20:49
freemangordonyes, lets make it 2 minutes initially20:49
Wizzup_I think that's not enough for n900 to boot20:49
freemangordonwe can increase it further20:49
Wizzup_I'd rather make it long first and then decrease if we find the boots are much better20:50
freemangordonright, but combined with throttle will help20:50
Wizzup_it might also make sense to set this to true:20:50
Wizzup_gsettings get org.freedesktop.Tracker.Extract wait-for-miner-fs20:50
Wizzup_per https://askubuntu.com/questions/1258757/tracker-miner-fs-is-taking-90-of-cpu20:51
Wizzup_also, the issue report I mentioned mentions tracker3, which I think we are not on yet20:51
freemangordonalso, see https://github.com/maemo-leste-upstream-forks/tracker-miners/blob/maemo/chimaera-devel/data/org.freedesktop.Tracker.Miner.Files.gschema.xml#L14120:51
Wizzup_I guess I must have removed it myself20:53
freemangordonmhm20:53
freemangordonbut still, I don;t see why temp files shall be created in $HOME20:53
Wizzup_I can see why, many systems have some tmpfs set to noexec20:54
Wizzup_whereas that is unlikely for something in home, but you'd still expect it to maybe go in .cache or something20:55
freemangordonmhm20:55
Wizzup_arno11: let us know when you're back, I think changing some settings will make all the difference20:55
freemangordonI'd recommend to try changing throttle first21:03
Wizzup_and remove home, initial sleep..21:10
arno11Wizzup: back21:10
freemangordonWizzup_: https://cgit.freedesktop.org/gstreamer/orc/tree/orc/orccodemem.c#n30521:11
freemangordonit should create in XDG_RUNTIME_DIR, not in HOME21:12
arno11i'm ready if you want me to change some settings21:16
freemangordonWizzup_: ^^^21:19
Wizzup_hi21:23
Wizzup_arno11: maybe try to set21:24
Wizzup_gsettings set org.freedesktop.Tracker.Miner.Files throttle 2021:24
Wizzup_gsettings set org.freedesktop.Tracker.Miner.Files initial-sleep 30021:24
Wizzup_gsettings set org.freedesktop.Tracker.Extract wait-for-miner-fs true21:24
Wizzup_and maybe remove the HOME entry from:21:24
Wizzup_gsettings get org.freedesktop.Tracker.Miner.Files index-single-directories21:24
arno11ok21:25
Wizzup_you could skip the last part for now21:26
Wizzup_in any case, I hope this will help with boot times and converstionst startup21:26
Wizzup_freemangordon: I think we set XDG_RUNTIME_DIR,21:26
Wizzup_don't we?21:26
freemangordonyes, we do21:26
freemangordonok, I am a bit lost21:26
freemangordonafter a restart those temp files are no longer created in $HOME21:26
arno11Wizzup_: ok, do i need to run other stuff or can i reboot now ?21:29
freemangordonhmm, it seems gst creates them21:32
Wizzup_arno11: reboot is fine21:33
arno11ok let's go21:34
freemangordonWizzup_: tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=401312k,mode=755)21:35
freemangordon'/run' has noexec set21:36
Wizzup_as expected21:36
Wizzup_brb21:36
freemangordonwell, but XDG_RUNTIME_DIR=/run/user/100021:36
freemangordonand orc does fallback to $HOME21:37
Wizzupwell we don't want to remove noexec21:39
freemangordonwhy? https://github.com/systemd/systemd/issues/408121:40
freemangordonthe question "where JIT compilers are supposed to write their output" is valid21:41
Wizzupruntime dir is for pid files and stuff21:42
freemangordonno, it is user specific21:42
freemangordonrun/user/$UID21:42
freemangordonas is $HOME21:42
freemangordonread the issue ^^^21:42
Wizzupyeah I don't agree with lennart (as usual)21:43
freemangordonok, so, to your understanding, what is the correct place to put JIT compiler output?21:44
WizzupXDG provides none21:44
Wizzuphttps://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html21:44
WizzupI'd probably use $XDG_CACHE_HOME21:45
freemangordon$XDG_RUNTIME_DIR - ...The directory MUST be on a local file system and not shared with       any other system. The directory MUST by fully-featured by the       standards of the operating system. More specifically, on       Unix-like operating systems AF_UNIX sockets, symbolic links,       hard links, proper permissions, file locking, sparse files,       memory mapping, ...21:46
WizzupI'm looking at openrc on my laptop and /run is not set noexec21:46
WizzupI wonder what sets it on devuan then21:46
freemangordonWizzup: we'll find that21:46
freemangordonbut lets first agree on whether it should be noexec or not :)21:47
Wizzupnote that none of the things mentioned above are hurt by noexec afaik21:47
freemangordonmemory mapping is21:47
freemangordonbecause you cannot map with  PROT_EXEC21:47
Wizzupyes, so specific memory mapping doesn't I suppose21:48
Wizzupin any case if gentoo openrc doesn't do it then I'm fine with not doing it on devuan21:48
freemangordonmaybe elogind make that21:48
Wizzupthat would be truly hilarious given lennarts stance21:48
freemangordonmhm21:49
Wizzuphttps://bugs.launchpad.net/ubuntu/+source/systemd/+bug/199166121:49
Wizzupmy debian server also has it set (noexec)21:49
freemangordonmy ubuntu as well (14.04)21:50
WizzupI found it via https://askubuntu.com/questions/1432383/mounting-run-as-noexec/143320821:50
Wizzupin any case I think this is pretty minor and I do think that tracker should not trip up over programs making tmp files in home21:50
WizzupI'm fine with it using home as scratch21:50
freemangordonso, you think tracker shall not monitor $HOME?21:51
freemangordonI am fine, but I wonder if we reinstall tracker whether it will change the setting21:52
Wizzupeven if it does, it doesn't need to act *immediately* and hurt the ux21:52
Wizzupthere's no reason to find say a mp3 file within a second21:52
freemangordonwhat is the acceptable time?21:52
Wizzupminutes or more imo21:52
freemangordonnot for me :)21:52
freemangordonI WANT MY MUSIC NOW!!!21:53
freemangordon:D21:53
WizzupI mean even now it takes many minutes for it show up in omp21:53
Wizzupsince we can write them faster than we can analyse them21:53
freemangordononly on first boot/copy21:53
WizzupI really see tracker as a background thing that should eventually figure things out but not immediately21:53
freemangordonthen if you add more files it happens way faster21:53
freemangordonbut really, wating 10 minutes for your just copied music to appear in the player is very broken UX21:54
WizzupI think that is currently already the case, but I have a big music collection on it (100GB or so)21:55
freemangordonWizzup: and you wait 10 minutes after boot on d4 for OMP to show the files?21:55
Wizzupwhy after boot?21:56
Wizzupit is available immediately of course21:56
Wizzupno additional mining is necessary21:56
freemangordonright, seems I misunderstood21:56
arno11Wizzup: unfortunately boot time is still high and qt5 apps are still slow to start :(21:56
freemangordonarno11: could you do /usr/libexec/tracker-miner-fs -v 3 -n and start that qt app21:57
freemangordonto see if miner gets notified21:58
freemangordonperhaps you should killall tracker-miner-fs first21:58
arno11ok (i already stopped trackers)21:59
Wizzuparno11: did you also remove monitoring HOME?21:59
arno11Wizzup: nope22:00
arno11i can try22:00
arno11what is the command btw ?22:00
WizzupI need a few mins to figure it out22:02
WizzupI think just set with the values you want to keep in quotes22:02
Wizzupbut maybe make sure that killing trackers indeed solves it22:02
WizzupI didn't expect boot time not to be high, but maybe to at least be a bit better22:02
arno11freemangordon: sorry, tracker miner fs returns too much things. i can't find anything relevant atm. (just my n900 around)22:13
arno11Wizzup: ok22:14
WizzupI'll try to look at my n900 as well22:14
arno11Wizzup: i'm still not able to remove $HOME, need to check how exactly gsettings commands work lol22:34
uvoseh honestly i think it might be better to just disable inotify indexing entirely by default and provide a "scan for media" button in omp...22:46
Wizzupuvos: yeah maybe23:47
Wizzupit might also ultimately get better from tracker323:47
WizzupI just think we should for now try to minimise the time we spend on it23:47

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!