How can I prevent [flush-8:16] and [jbd2/sdb2-8] from causing GUI unresponsiveness? [closed]

I'll venture a theory:

/dev/sdb1 is perhaps swap space?

If something central to the graphical interface has been offloaded to disk, the GUI can't continue until it has received those data. If the swap disk is sleeping, this means it's stuck until the disk responds.

I think this would give a temporary lockup, and the 10-20 second period fits the time it takes for a sleeping disk to respond. The terminal is presumably still responsive because all it needs is already in RAM.

Some terminal tools to explore the theory:

  • hdparm -C /dev/sdX tells you whether a disk is sleeping:

    $ sudo hdparm -C /dev/sdb
    /dev/sdb:
    drive state is:  standby
    

    active/idle means that it's running. In state standby or sleeping it has stopped spinning and will take a while to start up again. See man hdparm.

  • free -m says how much swap space is used:

    $ free -m     
                 total       used       free     [...]
    Mem:          5973       4928       1045     [...]
    -/+ buffers/cache:       1091       4882
    Swap:         6234          0       6234
    

    "Swap:" is the relevant line, in this example 6.2 GB swap is available and nothing is used.

If this is the issue, you could either move swap to sda or disable spindowns for sdb.