2

for ex. sudo apt install gthumb will spend a small time doing everything else. When it calls update-mime-database /usr/share/mime it spends more than 10 minutes!!!

I wonder if I could install everything w/o calling update-mime-database, then manually call it with ionice update-mime-database /usr/share/mime (as it also generates a lot of IO despite writing just about 4MB iotop) in a child/background process?

any other tip/idea?

ubuntu 20.04

  • Same issue here! Not only is it slow, but it makes my whole system laggy, killing IO performances. This seems to be related to https://bbs.archlinux.org/viewtopic.php?id=255817 but I didn't find any Ubuntu-related fix. – Pierre-Antoine Feb 10 '21 at 10:13
  • until it is fixed, may be, we could kill update-mime-database in a way that still let the install finish properly (SIGTERM?), so we can continue installing other things, and run update-mime-database again with ionice idle background process later. – Aquarius Power Feb 10 '21 at 19:53
  • There is an issue on launchpad, actually: https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1816674 – Pierre-Antoine Feb 12 '21 at 11:50
  • I think that killing update-mime-database would make dpkg consider that the installation failed, and pollute its database... What I didn't try is to run apt update after setting the env variable PKGSYSTEM_ENABLE_FSYNC=0, as suggested in the ArchLinux forum. – Pierre-Antoine Feb 12 '21 at 11:55
  • @Pierre-Antoine Still not fixed, unfortunately. It certainly does help to set PKGSYSTEM_ENABLE_FSYNC=0 immediately before running update-mime-database, but it won't do anything for apt update (it would need to be before apt install or *upgrade) – Auspex Jan 02 '24 at 18:35
  • Also, no you really can't install without calling update-mime-database. That gets called in the postinst scripts, so is not strictly under apt's control. You could technically copy update-mime-database to somewhere else, and symlink update-mime-database to /usr/bin/true, but then you'd have to remember to run the original program manually after all upgrades. Probably easier to put PKGSYSTEM_ENABLE_FSYNC=0 in the system environment, though to be honest, it runs so fast with that set that I'm not at all confident it's doing anything! – Auspex Jan 02 '24 at 18:41
  • @Auspex I'm sorry I can't help you there. In the meantime, I have upgraded to more recent versions of Ubuntu (currently 23.10) and I don't have the issue (I honnestly can't remember when was the last time I faced it). – Pierre-Antoine Jan 09 '24 at 09:23
  • @Auspex re. PKGSYSTEM_ENABLE_FSYNC, I think you should not worry about it being "too fast". My understanding is that it instruct update-mime-database no NOT wait until the drive has fully synced before it terminates, which is OK as long as your drive is working properly (it will sync up eventually) and you don't have a power outage just after running the program... – Pierre-Antoine Jan 09 '24 at 09:26
  • Thank you, @Pierre-Antoine (and I'm about to upgrade one of my systems to 23.10, so it will be interesting to see if it goes away there) – Auspex Jan 11 '24 at 00:48

0 Answers0