0

Self-explanatory question, I have Ubuntu itself on an SSD and all the user files on an HDD.

Ubuntu is now much slower on startup after putting about a dozen GB worth of family photos to the HDD. It was not always the case so I highly suspect it had something to do with the family photos.

I used to be on 20.04 but upgraded to 22.04 recently. It made no difference.

What can I do to troubleshoot the problem?

  • By "all the user files on an HDD" do you mean /home is on the HDD? If so then yes, the more file you have there the slower it'll be, especially on an old HDD. – ChanganAuto Sep 03 '22 at 17:15
  • Yes. Exactly. /home consists of the entire partition on the HDD. Is there anything I can do to remedy it or understand why it does this? I rarely if ever access said photos. It is counter-intuitive to me why it does that. – Hyouin Kyouma Sep 03 '22 at 17:19
  • The current recommendation is to use SSDs, period. That said there's nothing wrong (and as zero impact on performance) in reusing old HDDs as additional storage. So, /home should be on the SSD as well since ALL user settings and each and every personal file is indexed at boot. Large collection of media can be stored in the HDD, this being the partitioning that makes sense nowadays. – ChanganAuto Sep 03 '22 at 17:27
  • Indeed, the indexing by tracker is the only explanation why a system could be "slower" if there is lots of data on a disk. – vanadium Sep 04 '22 at 10:51

1 Answers1

0

In principle, an operating system should not (markedly) be slowed down when a hard drive contains more data. Data just sits on a drive, and data retrieval is not significantly slowed down if a disk is more full, unless it has become badly fragmented.

The reason you experience significant slowdown likely is due to the file indexing service Tracker. Tracker searches files and contents and indexes this in a (what can become very large, i.e. GB) database, in order to allow for quick full text search of files. (see also this Askubuntu answer).

On each start, it scans the indexed directories to look for new and changed files. These files are opened to look for text and metadata, to include in the index.

If you put a lot of data there, the next time Tracker will have a lot of work inspecting all these new files, which is likely why now you experience a relatively sluggish, hard working system with loud cooling vans.

There are three options, 1) be patient and allow the indexing to complete 2) eliminate files from being indexed and 3) disable tracker altogether.

Option 1. Be patient - it will get better

After adding your files, Tracker has to go over all these files and retrieve their metadata in order to index them for quick search later. For many files, that will take significant time, during which your processor will be heavily used to an extent that - depending on your processor power - you experience a more sluggish system. You typically will hear the cooling van turning.

This indexing only proceeds once, and is repeated only when a file has changed. Still, after starting up the computer, Tracker scans all files to re-index these that have changed. That means that you still can expect high processor use shortly after startup for up to several minutes.

Option 2. Restrict the files that are indexed

Head to "Settings" - "Search". The button "Search Locations" allows to turn off the search of Pictures.

Side effects:

  1. You cannot anymore locate photo's using Search in activities overview;

  2. The application Gnome Photos, if you use that, will not anymore work for these photo's. Other photo management applications do not use Tracker and will be unaffected.

Option 3. Disable tracker

Tracker cannot be removed from your system, but it can be fully disabled.

Side effects

  1. You cannot anymore search for files in Activities overview

  2. In Files, file search by name will continue to work as well as before. However, full search will not anymore work.

  3. In Files, the feature to mark favorite files with a star will not work anymore.

  4. Gnome applications like Gnome Photo's, Documents or Music (not installed by default in Ubuntu) will not work.

For me personally, disabling tracker is one of the first actions after a fresh install.

vanadium
  • 88,010
  • That did the trick.

    For whatever reason the GUI wasn`t working so I had to do it via command line https://www.linuxuprising.com/2019/07/how-to-completely-disable-tracker.html

    But startup is now blazing fast as it used to be.

    – Hyouin Kyouma Sep 27 '22 at 19:07