Speedup of configure_x() in ltsp-client-setup script (LTSP-5)

I've set up LTSP-5 with Xubuntu 6.10 and found that at some point during the boot process of the thin clients (in the "Setting up LTSP client..." phase) it seemed to "stall" for a very long time (several minutes!). My thin clients are very "thin" indeed Smile (we use old Compaq Evo T20 clients with a ~300MHz Geode GX1 CPU and 64MB of RAM), which might be the reason for the slow boot process. However I did not want to accept it as a fact since with LTSP-4.x I did not experience anything like this.

I digged into the issue and came up with the following result: each invocation of the preseed() function within the ltsp-client-setup script took around 10-12 seconds on my thin clients. Shock The fact is that the execution of debconf-communicate has a fairly large overhead (at least on my thin clients), but the processing of its input commands has a quite acceptable speed. Fortunately debconf-communicate can accept multiple commands on its input, separated by newlines. My first test was to merge the two debconf-communicate calls within preseed() into one call, like this:

Original:
echo "set $question $value" | debconf-communicate $package
echo "fset $question seen true" | debconf-communicate $package
Merged:
echo "set $question $value\nfset $question seen true" | debconf-communicate $package

This took down the execution time of a preceed() call from 10-12 secs to 5-6secs! This seemed very promising so I worked on it a bit further. I've modified the preseed() function not to execute debconf-communicate on each call, but only "collect" the parameters in a variable, and added to the end of configure_x() to pipe all the commands in one batch to debconf-communicate. The result is that instead of several minutes, now configure_x() runs in ~30 seconds on my clients. Smile

As already mentioned, I use Xubuntu 6.10 where the latest version of ltsp-server is 0.124. In the ltsp-client-setup script in this LTSP version there're in "worst" case 19 calls to the preseed() function and each call has 2 debconf-communicate calls (a preseed() call took approx. 10s on my clients). These all together can took 6.5 minutes on my site, but with my patch it takes only 6 seconds! The execution time of debconf-communicate remained almost unchanged regardless of how many commands I piped into it. Smile More than 60 times speedup ... not bad. Wink

Of course this is only true on my slow Evo T20 thin clients. My modifications would not have such a huge impact on faster thin clients. I've attached both the full, modified version of ltsp-client-setup and a patch, where you can spot the modifications a lot more easily.

AttachmentSize
ltsp-client-setup-0.124.new11.22 KB
ltsp-client-setup-0.124.patch6.02 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

How are you booting the T20's?

I have a batch of T20's ready to be used (most NTe, some WinCE) and am looking for an alternative way of booting them. Would love to boot Linux on them. I have not been able to find any other way of booting then from the internal RAM, or by re-flashing with a modified firmware...

I am wondering how you are using your T20's.. Have you flashed the firmware? Are you PXE booting? USB booting? and if so, how did you manage to do this?

Thanks!

Evo T20 hacking

Take a look at the open-evot20 project page at Sourceforge.net. It's pretty well described in the two articles that you find there. Needs a lot of reading though ... you will have to dig into the subject pretty deep and understand how things work, because you won't find a single-click installer solution for getting Linux on an Evo T20. Smile But the two articles already contain solutions to the most difficult problems you might face.

There're several ways to boot Linux on the Evo T20 (as you wrote: various net booting options, USB or solely by putting everything on the internal flash disk), but the easiest to administer is the net booting (you'll have everything coming from a server). The Evo does not support neither of these by default, so you'll have to re-flash it with a modified (or custom made) firmware.

patch accepted :-)

Btw. ... my speedup patch was accepted into LTSP-5. Smile It was merged into the core in v5.0.7.

LTSP 5 Ubuntu

I was install LTSP 5 on Ubuntu, but dhcp server on zenwalk. LTSP run faster, I don't Know why. If dhcp server running on Ubuntu LTSP 5 running slow.