What causes the long delays which switching or starting apps?
#1
I was watching top via an SSH session.

When I select a new app there is a long delay before the new app shows up on the screen.

I had expected to see something like high CPU usage, or perhaps high io wait while the app is loading.

But I see neither.

What is going on during the long app startup times?

Do other people experience this behavior?
  Reply
#2
Assuming you are on Mobian (I am). I see the same behaviour.

My assumptions would have been same, so that's interesting what you observed via top.

On Android for instance, lots of stuff is actually kept in memory for fast switching / better user experience.
Cheers,
TRS-80

What is Free Software and why is it so important for society?

Protocols, not Platforms

For the most Linux-y experience on your Linux phone, try SXMO!

I am (nominally) the Armbian Maintainer for PineBook Pro (although severely lacking in time these days).
  Reply
#3
I've noticed this as well. (It's hard not to!) My assumption has been that it's due to the low speed of eMMC and SD cards causing long load times.
  Reply
#4
Indeed, I am running Mobian off of SD card.  Probably good to get used to that, then when I switch to eMMC later it should be noticeable improvement.  Big Grin
Cheers,
TRS-80

What is Free Software and why is it so important for society?

Protocols, not Platforms

For the most Linux-y experience on your Linux phone, try SXMO!

I am (nominally) the Armbian Maintainer for PineBook Pro (although severely lacking in time these days).
  Reply
#5
(07-06-2021, 05:29 PM)TRS-80 Wrote: Indeed, I am running Mobian off of SD card.  Probably good to get used to that, then when I switch to eMMC later it should be noticeable improvement.  Big Grin

It does run a bit faster off of the eMMC but programs still take their time loading.
  Reply
#6
Very interesting that the I/O wait time is not reflected in iowait in the CPU stats.
One would think the CPU would be busy somewhere.

root@mobian:~# dd if=/dev/mmcblk2 of=/dev/null bs=8M count=100
100+0 records in
100+0 records out
838860800 bytes (839 MB, 800 MiB) copied, 16.0952 s, 52.1 MB/s

52 MB/s seems pretty fast. (though it is sequential and not random)
  Reply
#7
My understanding is that a lot of the delay is due to the GTK+ interface of Mobian apps not being accelerated on the PinePhone's graphics hardware.
  Reply
#8
Some Xorg WMs are just slow. I've noticed fluxbox can take it's time opening new windows while FVWM does not. There's probably something similar going on with Phosh. Then there's loading all the SOs and whatnot that might not be cached.
I highly doubt GPU acceleration has much to do with it. It might even make things worse by taking memory that could be used for disk cache and using it for compositing instead, but I don't know enough about the pinephone hardware to really know for sure.
  Reply
#9
(07-06-2021, 05:16 PM)Zebulon Walton Wrote: I've noticed this as well. (It's hard not to!) My assumption has been that it's due to the low speed of eMMC and SD cards causing long load times.

I second your assumption. As mentioned in this forum, the eMMC has about 65 MB/s read speed.
For comparison, the built-in SSD memory of the iPhone SE 2nd gen has  - wait for it  -  439 MB/s read speed (german site )

I ran:

Code:
perf top

while starting up the gnome Maps app and by far the most frequent sys call (about 16% of all calls during startup - not accounting for how long each call takes [!] ) is:
Code:
do_lookup_x

which is the syscall used to load e.g. .so files etc. during startup.


To me this means the only chance to have faster-starting apps is to have apps which actually start faster (d'oh). Meaning it is not up to the distro or upstream, but it is up to the app devs to speed their apps up. A way to do that without having to change any code is to link the whole application statically. This results in a (way) larger application executable but gets rid of additional file i/o during app start.

For end users the only way to go for now seems to look for apps with smaller footprint and try them out.
I would love it if linmob or the mobian wiki would list the startup time, just roughly in seconds would be great!
  Reply
#10
A possibility is to install the preload daemon. Mixed results so far: https://forum.pine64.org/showthread.php?...#pid101574
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Audio output switching anomalies treebeard 1 923 06-10-2024, 06:37 AM
Last Post: anonymous
  Keyboard not popping up on QT apps 3x5co 1 1,019 02-08-2024, 11:45 PM
Last Post: Kevin Kofler
  DDing mobian to emmc or microSD not starting... Mr.Berzerk 2 1,769 08-05-2022, 06:09 PM
Last Post: mark1250
  Giving certain audio apps priority on the lock screen and pulldown 3x5co 0 1,102 07-17-2022, 10:34 AM
Last Post: 3x5co
  Using lat/lon in GPS/GNSS apps and Messaging biketool 6 4,157 05-04-2022, 11:45 AM
Last Post: wibble
  Apps and SD Card biketool 2 2,355 03-06-2022, 09:47 AM
Last Post: biketool
  Reskinning Apps for Mobile biketool 6 4,376 12-05-2021, 02:30 PM
Last Post: biketool
  no access to webdav files (for some apps) jsch 0 1,508 11-13-2021, 09:46 AM
Last Post: jsch
  Sizing apps to fit to screen county93 4 4,025 10-23-2021, 11:36 PM
Last Post: bcnaz
  Installed Apps not opening mmd604 5 4,916 10-08-2021, 09:29 AM
Last Post: ragreenburg

Forum Jump:


Users browsing this thread: 2 Guest(s)