UTM icon indicating copy to clipboard operation
UTM copied to clipboard

enabling 'virtualization'-like performances by new iPadOS background tasks API

Open C4ntor opened this issue 6 months ago • 1 comments

On WWDC 2025 Apple presented an updated feature for iPadOS called Background Tasks. You can read more about this on Apple website (https://www.apple.com/newsroom/2025/06/ipados-26-introduces-powerful-new-features-that-push-ipad-even-further/) here I would like to mention just some relevant lines: "Taking advantage of the incredible power of Apple silicon, iPadOS 26 unlocks the ability to perform computationally intensive Background Tasks" ...continues ... "developers can use an updated Background Tasks API that allows users to perform long-running tasks from their apps, too."

Is there any chance that this updated Background Tasks API exploiting GPU can be used to enhance UTM SE performances on iPadOS? (https://developer.apple.com/documentation/BundleResources/Entitlements/com.apple.developer.background-tasks.continued-processing.gpu)

C4ntor avatar Jun 09 '25 20:06 C4ntor

It won't improve any performance but it may be useful to support multiple concurrently running VM and not having to close to Home Screen when exiting a vm. I'll look into it.

osy avatar Jun 10 '25 20:06 osy

I've done more research and found it will not be useful for us at all. The new background tasks API requires a long running task with a determined end point which can be scheduled by iPadOS at will. It's useful for something like downloading large files (which we may use for that purpose in the future for downloading .utm from the web). It won't benefit VM performance at all. In fact, if you pin the VM to a background task, it will degrade in performance.

osy avatar Jul 08 '25 05:07 osy

Could it be used for allowing headless VMs running in background via ssh (avoiding background termination by iOS watchdog)?

C4ntor avatar Sep 05 '25 14:09 C4ntor

See above https://github.com/utmapp/UTM/issues/7220#issuecomment-3047418663

osy avatar Sep 05 '25 14:09 osy

it is not clear how much freedom iPadOS allows there in setting the end point for the task: is there a way to prolong it/renew it over time? I am aware that performance will degrade anyway, but wouldn't this still be feasible on JIT-enabled machines?

C4ntor avatar Sep 05 '25 14:09 C4ntor