-
Notifications
You must be signed in to change notification settings - Fork 59
Client Choices and Performance
LTSP20 is much slower at the first launch of each app during each client session than LTSP5 was, and somewhat slower than standalone PCs (both using SSD rather than HDD).
- IMAGE_TO_RAM option in ltsp.conf
- Client Processor Power eg: CPU PassMark rating
App 1st launch times can be substantially reduced by using IMAGE_TO_RAM (ITR). The "image" is the client root filesystem image eg: /srv/ltsp/images/x86_64.img. But unmodified Xubuntu 20.04 clients (including Ubuntu snaps) need an absolute minimum of 8GB or preferably 10GB to deal with the image which is usually > 3.8GiB. Nearly half of the image size is down to snaps so I remove all snaps to reduce the RAM needed. Some apps are unaffected eg: Virtualbox VMs and other apps installed in user's home directories. NB: ITR improves app 1st launch time at the expense of a longer client boot time eg: from 55s to 75s.
- More RAM in client (providing enough to handle all concurrent apps).
- More SSD swap in client.
- SSD(s) or spinning disk(s) on server
- Having preload installed
- I assume that all clients have RAM of at least 4GB.
- CPU PassMark of 1000 is adequate for only minimal use of big web browsers. PM of 2000 is about the minimum for heavy use of big websites like facebook. NB: If all clients have RAM > (image size x 2) + 600MB then you might not need to do anything other than implementing PIB-ITR (below).
I have only tested Xfce clients, using chrootless (easier) images from an Xubuntu LTSP server. Xfce is a highly configurable, easy to lockdown, and fairly lean desktop. Ubuntu with Gnome, especially when switched to Wayland, will give different results. Xfce continues to require X.org and currently seems to have no plans to move to Wayland.
If Lubuntu's Qt apps suit you, and LXDE provides a sufficiently configurable desktop, then it will probably give even better results than Xubuntu. Lubuntu does currently plan to move to Wayland.
I remove all snaps and snapd from my Xubuntu server (and therefore from the client image) and have not found any disadvantages. If it becomes a problem I may switch to Mint Xfce - Mint does not use snaps at all. Standard Ubuntu is likely to acquire more snaps with software additions and future updates/upgrades, which will require even more RAM in clients to use any form of ITR.
I have not tried other desktops like MATE.
1. Use zstd compression to create slightly smaller images eg: # ltsp image -m "-comp zstd" /
(or create an alias for this)
2. Remove all snaps and snapd This can almost halve the size of the client image! If all clients have more than 8GB RAM then this might not be necessary.
As root:-
# snap list
Remove them all, except core18 and snapd:-
# snap remove gtk-common-themes gnome-3-28-1804 gnome-3-34-1804 snap-store
Generating a new client image (zstd) shows a reduction of 0.74GiB from 3.54 to 2.80GiB !
# snap remove core18
# snap remove snapd
# apt purge snapd
Reboot
Generating a new client image (zstd) shows a reduction of 0.75GiB from 2.80GiB to 2.05GiB.
# apt-get autoremove
removed 25MB of unused dependencies.
So the image has been reduced by 42%, 1.49GiB.
# apt-mark hold snap snapd
to prevent reinstallation.
Apps which get removed from Ubuntu: gnome-system-monitor, gnome-calculator, gnome-characters and gnome-logs, are not in Xubuntu anyway.
3. Exclude additional big dirs not required from the client image using the ltsp.conf parameter ADD_IMAGE_EXCLUDES eg: usr/src/* This can make a further significant reduction in the image size.
New Image Size <<3GiB (no snaps). Some clients have 4GB RAM, some 6GB or more. Best = ITR. App start times may not be improved for low-RAM clients.
New Image Size <<3GiB (no snaps). All clients have >= 6GB RAM. Best = PIB-ITR (below) gives slightly faster app 1st launch times and faster boot than ITR.
New Image Size < c3.5GiB eg: default snaps. Some clients have 4-6GB RAM, some 8GB or more. Best = ITR. App start times may not be improved for low-RAM clients.
New Image Size < c5.2GiB eg: more snaps. Some clients have 6-8GB RAM, some 12GB+ Best = ITR. App start times may not be improved for low-RAM clients.
"ITR" = IMAGE_TO_RAM=1
in the [client] section of /etc/ltsp/ltsp.conf. Low-RAM clients, unable to boot with ITR, can have their own sections in ltsp.conf containing IMAGE_TO_RAM=0
- these will have unimproved app 1st launch times.
"PIB-ITR" = PRE_INITRD_BOTTOM_IMAGE_TO_RAM="dd if=/root/images/x86_64.img of=/dev/null &"
in the [client] section of /etc/ltsp/ltsp.conf (instead of plain ITR)