Example 1: Case for serialisation of processes:
- I have multiple HDDs
- I copy a large file from sda1 to sdb1 (Dolphin)
- I copy another large file from sdc1 to sdb2 (Dolphin)
- both copy operations start running parallelly and are slower because of HDD limitations [1]
- Instead, if the workers could see each other, realise that both are writing to sdb and serialise themselves, that would be good
- even if it just pauses the second one, to resume when the first one is finished, that would be nice (this way, the user can override by clicking on the resume button in the notification, without requiring new UI features)
Example 2: Case for parallelisation of processes:
- I still have multiple HDDs
- I open KTorrent, select multiple torrent entries and run the “Check Data” function
- alternatively, I move some torrents to sdd2 and some others to sdf1
- KTorrent will serialise all, waiting for the previous one to finish before starting the next one
- Instead, if KTorrent could just give a list of actions to be done, to KIO Worker and it could decide which ones require to be serialised while the others could be parallelised, that would feel nice.
- There must be other examples for the second case, but this is the only one I can come up with rn.
What would be required by that something in KIO which would implement the functionality:
- know which physical device (resource) is providing a given address
- know the optimal parallelisation limits of the resource (of course the maximum limits are handled by Linux anyway)
- e.g. For a SATA HDD, you would expect 1 write or multiple reads (2-3) at a time, while SSDs might be fine with multiple write streams too, but network resources will have different characteristics
- know beforehand, the amount of load that a process is going to cause
- negligible workloads can be let run alongside longer processes
- know the current utilisation of resources by all running KIO workers and their corresponding dependencies
- if the controller does not have a comprehensive understanding of dependencies, it might cause deadlocks
I originally thought this for KTorrent, but then realised this could benefit every potential KIO user.
even though I mounted the drives with write caching on, but it would be good to consider conditions where write caching may be off ↩︎