diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-17 22:59:24 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-17 22:59:24 +0100 |
commit | 36c1d28e6fc34a39360f063cf2a375fe4df1363a (patch) | |
tree | cdbdf6ae3131dccf525567d3129593c9a26f9076 | |
parent | 539526a966c70defca6f355676d220f8b2968fd5 (diff) | |
download | desktop-autoloader-36c1d28e6fc34a39360f063cf2a375fe4df1363a.tar.gz desktop-autoloader-36c1d28e6fc34a39360f063cf2a375fe4df1363a.tar.bz2 desktop-autoloader-36c1d28e6fc34a39360f063cf2a375fe4df1363a.zip |
Formulate README.md properly.
-rw-r--r-- | README.md | 69 |
1 files changed, 58 insertions, 11 deletions
@@ -1,17 +1,47 @@ -# Desktop Session (Pre-)Autoloader +# Desktop (Pre-)Autoloader -FIXME: this README.md needs to be beautified... +This little project got inspired and co-authored by Klaus Ade Johnstad +from https://linuxavdelingen.no. -Old dirty hack. Stick this line in a file under /etc/rc.local.d/ -[ $(date +%s) -lt $(date -d 07:55 +%s) ] && su autoload -c "Xvfb :10 & -DISPLAY=:10 /usr/bin/dbus-launch --exit-with-session startxfce4 &" +The Desktop Autoloader project aims at being used on Diskless Workstations +(aka LTSP Fat Clients). + +In class rooms or similar PC setups, a bottle neck occurs when all +diskless clients startup simultaneously, students login simultaneously +and start the same application(s) simultaneously. The storage devices of +the serving machine cannot cope with all the simulataneous diskless +clients demanding the same but slightly shifted file access on the +server's NFS share or NBD block device (where the clients root filesystem +is hosted). + +Observations have shown that diskless workstations work smoothly if +people use them "asymmetrically", but become really really slow once 10 or +more people use the diskless workstations in a symmetrical usage pattern. +This normally happens when the users are students and follow instructions +in class. We observed launch times for LibreOffice of 15min and more. + +The way to work around this bottleneck is taking advantage of the file +system RAM cache of the Linux kernel. An application that has once been +launched can be re-launched and during the re-launch it gets mostly +accessed from the file system cache. This brings a tremendous +acceleration to the usability experience of diskless workstations. + +## History + +This code project formalize and generalizes an old dirty hack: + +Stick this line in a file under /etc/rc.local.d/ [ $(date +%s) -lt $(date +-d 07:55 +%s) ] && su autoload -c "Xvfb :10 & DISPLAY=:10 +/usr/bin/dbus-launch --exit-with-session startxfce4 &" This will start things if the machine boots up before 07:55, combine -this with wol, so things are up and running before pupils arrive. +this with WoL, so things are up and running before people arrive. Then, create a autostart.desktop file for the "autoload" user, which logs him automatically out after 90 sec, like this: -/home/autoload/.config/autostart/sleepandkill.desktop + +``` +$ cat /home/autoload/.config/autostart/sleepandkill.desktop [Desktop Entry] Encoding=UTF-8 Name=sleepandkill @@ -19,16 +49,33 @@ Exec=/bin/sh -c "sleep 90; pkill -u autoload" Terminal=false Type=Application StartupNotify=false +``` -I stick these desktopfiles in under -/home/autoload/.config/autostart/ as well: +I stick these desktopfiles in under ``/home/autoload/.config/autostart/`` +as well: + +``` firefox.desktop geogebra.desktop libreoffice-writer.desktop sleepandkill.desktop Thunar.desktop +``` + +That way Libre Office, Firefox, Thunar and Geogebra are already cached on the client. + +Dirty hack, but you notice the differene quite well. + +## The Generic Approach + +This code project attempts at a general approach of the above hack. +Whereas the above hack only works well for XFCE desktops, the Desktop +Autoloader project generalizes the concept and makes it compatible +with various desktop environments. + +The currently supported (i.e., tested) desktop environments are: + * MATE + * XFCE -That wau LO, FF, Thunar and Geogebra is already cached on the client. -Dirty hack, but you notice the differene quit well. |