You are not logged in.

#1 2024-03-11 20:27:49

Perkel
Member
Registered: 2022-05-13
Posts: 16

[Solved] All aplications slow to launch

Hey there!
I've noticed that Arch is kinda slow in launching applications compared to Windows (and even Debian on USB stick). Firefox needs ~2-3 seconds to launch, so does Plasma's System Settings, Konsole... Joplin (note-taking app) takes about 7 seconds.
I have a decent rig (i5-13420H, 16GB RAM, M.2 SSD) so I would suppose that launching an app wouldn't be a problem.

Will be glad for any help. Thanks!

Last edited by Perkel (2024-03-15 08:47:31)

Offline

#2 2024-03-11 20:36:39

onemyndseye
Banned
Registered: 2010-06-18
Posts: 45

Re: [Solved] All aplications slow to launch

** Message Deleted **

Last edited by onemyndseye (2024-03-20 17:59:43)

Offline

#3 2024-03-11 20:40:10

Perkel
Member
Registered: 2022-05-13
Posts: 16

Re: [Solved] All aplications slow to launch

Umm... Basic info is in the post but for clarification I will expand it.

i5-13420H, 16GB RAM, NVIDIA RTX 4050, M.2 SSD, 16GB swap partition and running Plasma 6

Even tried different DE with freshly created user - result was similar.

Offline

#4 2024-03-11 21:47:31

seth
Member
Registered: 2012-09-03
Posts: 53,236

Re: [Solved] All aplications slow to launch

"launching an app" is maybe what you do on your phone, I'm pretty sure the process starts immediately, but you're waiting for some window to appear? Or the window to have content? Or you being able to interact with the window?

Also: What "different DE"? Tried openbox, no compositor?
And *how* do you "launch an app"? Click some icon? Run a command in an interactive shell?

Ftr. joplin isn't a "note-taking app", but an electron client, ie. as fat and heavy as any "app" can possibly get (… and there's even an appimage)

Online

#5 2024-03-12 07:15:24

Perkel
Member
Registered: 2022-05-13
Posts: 16

Re: [Solved] All aplications slow to launch

I hope we won't get stuck on correcting each other's terminology...

Yes the process starts immediately, verified via strace. And yes, I'm talking about an window appearing. Doesn't matter if I click on the .desktop entry or start it via cli; times are similar.

I tried GNOME and LXQT (which had slightly better times, but still slow compared to Fedora on USB stick).

Offline

#6 2024-03-12 08:38:58

seth
Member
Registered: 2012-09-03
Posts: 53,236

Re: [Solved] All aplications slow to launch

This isn't about terminology, but terms - specifically vague ones.
[Edit: https://bbs.archlinux.org/viewtopic.php?id=57855 ]

Eg. starting a process through an icon will typically invoke a shell instance which might do random stuff before executing, depending on the shell and its configuration.
Likewise "fast", "slow" and "better" are all meaningless.

Try to isolate the bottleneck.
Eg.

time echo "scale=5000; a(1)*4" | bc -l

to test the cpu, you can use dd or hdparm for disk IO, then please post your xorg log for a general overview of the setup (nvidia is slow to create GL contexts, a VRR output or PSR might lead to slow visual updates)

Bottom line, you want to know what part of the system acts slow, not "launching apps" - that's just generally a bigger workload.

Last edited by seth (2024-03-12 08:46:08)

Online

#7 2024-03-12 09:11:28

Perkel
Member
Registered: 2022-05-13
Posts: 16

Re: [Solved] All aplications slow to launch

your provided CPU benchmark took about 9.5 seconds
for disk IO (via dd): direct read speeds ~1.2GB/s; buffer-cache read speeds ~11.2GB/s
all benchmarks were run 5 times

As for the logs:
journalctl from last boot
Xorg log
kwin info
CPU info

Thanks for helping!

Offline

#8 2024-03-12 13:40:45

seth
Member
Registered: 2012-09-03
Posts: 53,236

Re: [Solved] All aplications slow to launch

The interesting part would be to compare the benchmarks against the other systems - in isolation they don't tell all that much.

Single GPU (i915) w/ the internal panel only, if anything, disabling psr and maybe fbc might be interesting.
Are the other systems encrypted as well? (probably not, because they're all live distros?)
Is the swap encrypted?

Disable docker and containerd, the applications in question are from the repo, not some flatsnapdockontainer?
But actually, I'm betting on the encryption.

Wrt. FF specifically: it will probably only run a single instance.
If such is already up and you run it again, it'll just spawn a new window - is that slow™ as well?

Online

#9 2024-03-12 19:18:27

Perkel
Member
Registered: 2022-05-13
Posts: 16

Re: [Solved] All aplications slow to launch

Disabling psr and fbc, docker and containerd services did nothing. And yes, they are from the repo; no snaps/flatpacks on my system. The swap is not encrypted.

When firefox is running already, launching a new window takes about 0.5 sec (instead of 2s).

I've tried running the dd benchmark again on my second partition which is not encrypted (but has ntfs filesystem instead of ext4), and I've got speeds a bit faster than on my encrypted ext4 (previous benchmarks were misleading because I've tried 2GB files instead of 1GB):
direct read speeds: on encrypted ext4 ~630MB/s, on non-encrypted ntfs ~920 MB/s
buffer-cache read speeds: on encrypted ext4 ~3.1 GB/s, on non-encrypted ntfs ~3 GB/s

I will try to benchmark on the live Fedora asap.

Offline

#10 2024-03-14 16:07:16

Perkel
Member
Registered: 2022-05-13
Posts: 16

Re: [Solved] All aplications slow to launch

Update: After a bit of brainstorming, I've tried to enable trimming on my crypted filesystem (as it's disabled by default because of security reasons), after the trimming has finished, the average time has been cut in half! So I guess that solves my issue.

If you have another idea in mind, I will be happy to try it out too.

Offline

#11 2024-03-14 16:49:13

seth
Member
Registered: 2012-09-03
Posts: 53,236

Re: [Solved] All aplications slow to launch

But actually, I'm betting on the encryption.

wink

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB