Hi,
On 3/5/21 1:56 PM, Zbigniew Jędrzejewski-Szmek wrote:
On Thu, Mar 04, 2021 at 07:50:11PM +0100, Hans de Goede wrote:
>> I am not sure about this. What services are you seeing which are extraneous? I do
see ps aux is going on miles and miles, but of the 218 processes I see from startup time
on my workstation, I see 165 of them are kernel processes versus user space ones. Of the
remaining 53, most of them seem hardware oriented (irqbalance, bluetooth, modemmanager,
smartd, udisksd, upowerd, etc). Looking at the rest we have about 20 processes which seem
outside of 'I don't want my laptop to work with modern hardware' and that
would be abrt, atd/crond/cupsd, packagekitd, colord, and the sssd processes. So while ps
auxww has a lot more going on in it, I actually see a lot fewer extraneous processes than
I remember from my Fedora 18 days.
>
> 20 processes is still a lot when e.g. booting from an eMMC or a sdcard those add a
significant amount of time to the startupo time.
I agree, we really have too many things starting, to many things
running, and too many things generating errors.
Instead of 'ps aux', 'systemctl -t service --state running' is easier to
interpret:
UNIT LOAD ACTIVE SUB DESCRIPTION
accounts-daemon.service loaded active running Accounts Service
alsa-state.service loaded active running Manage Sound Card
State (restore and store)
^ do we really need this
This used to be a startup / shutdown job thing only, but now I think it periodically
saves
the state. It might be good to file a (polite) bug against alsa-lib for this and see what
Jaroslav has to say about this.
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD
Stack
bluetooth.service loaded active running Bluetooth service
colord.service loaded active running Manage, Install and
Generate Color Profiles
cups.service loaded active running CUPS Scheduler
^ this should be socket activated, I haven't printed *anything* on this machine
ever
Agreed
dbus-:1.2-org.freedesktop.problems@0.service loaded active running
dbus-:1.2-org.freedesktop.problems@0.service
dbus-broker.service loaded active running D-Bus System Message
Bus
firewalld.service loaded active running firewalld - dynamic
firewall daemon
gdm.service loaded active running GNOME Display
Manager
geoclue.service loaded active running Location Lookup
Service
gpm.service loaded active running Console Mouse
manager
iio-sensor-proxy.service loaded active running IIO Sensor Proxy
service
libvirtd.service loaded active running Virtualization
daemon
low-memory-monitor.service loaded active running Low Memory Monitor
^ this is interesting. gnome-shell.rpm requires lower-memory-monitor.rpm, and the
default preset is on.
Do we still want this with systemd-oomd being on by default?
mcelog.service loaded active running Machine Check
Exception Logging Daemon
This is another one for which it is questionable to have it running, or is this a machine
with
ECC RAM ? And even then I'm not sure if it adds a lot of value, or if just like smartd
it
just logs some stuff into syslog (where normal users won't see it).
ModemManager.service loaded active running
Modem Manager
NetworkManager.service loaded active running Network Manager
pcscd.service loaded active running PC/SC Smart Card
Daemon
pmcd.service loaded active running Performance Metrics
Collector Daemon
pmie.service loaded active running Performance Metrics
Inference Engine
pmlogger.service loaded active running Performance Metrics
Archive Logger
polkit.service loaded active running polkit.service
sssd-kcm.service loaded active running SSSD Kerberos Cache
Manager
sssd.service loaded active running System Security
Services Daemon
switcheroo-control.service loaded active running Switcheroo Control
Proxy service
systemd-homed.service loaded active running Home Area Manager
^ hmm, I would think this would be go away on its own. Maybe something to fix
upstream.
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running User Login
Management
systemd-machined.service loaded active running Virtual Machine and
Container Registration Service
systemd-networkd.service loaded active running Network Service
systemd-resolved.service loaded active running Network Name
Resolution
systemd-timesyncd.service loaded active running Network Time
Synchronization
systemd-udevd.service loaded active running Rule-based Manager
for Device Events and Files
systemd-userdbd.service loaded active running User Database
Manager
udisks2.service loaded active running Disk Manager
upower.service loaded active running Daemon for power
management
user(a)1000.service loaded active running User Manager for UID
1000
user(a)6.service loaded active running User Manager for UID
6
wpa_supplicant.service loaded active running WPA supplicant
Then there's 'systemctl --user -t service --state running' which is even
longer :(
Yes, a good way to trim that down is also to look under /etc/xdg/autostart and
remove packages which you don't use which drop a file there.
E.g. at-spi-dbus-bus.service has it's own dbus-broker instance.
That's better than in the past, at least it's not a different implementation
of dbus than the session bus ;) But we should consider if we can use the
session bus again. (In the past, dbus-daemon wasn't efficient enough, so a
separate bus was created. But dbus-broker is supposed to be more efficient.)
> Note I'm not trying to blame anyone here; and especially not the
authors/maintainers of the mentioned packages
As one of those, I would say that the authors/maintainers of those
packages are the people best positioned to fix things. For example,
systemd-homed probably shouldn't be running, but this is something to
figure out upstream.
(BTW, one thing which has improved a lot in this list is the pcp
stack. It's still 3 services with ~10 processes altogether, but the
total memory usage is <50MB, and CPU usage which was excessive last
year is reasonable. The maintainers put in the work here.)
> but I do wish that we (the Fedora project) could make some time to
> go over this list and try to stop a whole bunch of programs /
> daemons from always starting when that is (IMHO) not really
> necessary. I would really like to see Fedora to become somewhat more
> lean / go on a diet here, which is something which I think would
> benefit everyone.
Yes.
> Given that I can halve the base processes RAM set with some hacks I
> think that it is fair to say that there are still way too much
> things starting by default. I have actually been considering doing
> a Fedora workstation light spin for budget x86 machines with 1G / 2G
> of RAM and an eMMC.
I think there's still plenty of stuff to improve that will apply everywhere.
homed, alsactl, geoclue, colord just shouldn't need to be there all the time.
I agree and TBH I was surprised that there were quite a few reactions
suggesting that such a spin would be a good idea. OTOH such a spin will
give lots of room for experimentation, to try out various things to
improve the situation which we can then merge back into the regular
Fedora Workstation.
So given that I got a couple of "go for it" reactions and that I was
already toying with the idea anyways I might actually try to make such
a spin happen.
The biggest problem for doing such a spin is finding the time for it...
Are there any people who would be interested in working on / co-maintaining
such a spin with me ?
Regards,
Hans