I’ve started to test the CODE docker container, and I find it painfully slow to start. I launch it with docker-compose, and it takes up to 20 minutes before being ready to accept connections. Most of the time is apparently spent for creating symlinks, e.g.:
Wow - now it should start up in a handful of seconds. Try turning full trace logging on and sending the log in - hopefully that will timestamp what is going on. We do need to move files somewhere close so they can be copied, and we need quite a number of capabilities to be able to work sensibly:
I tried to restart the container with the additional parameters described in the previous post, but still it took ages. At this address you can find the logs of the startup process. It seems to me that most of the time is spent creating symlinks, they are a lot and each one needs about 100-150 ms according to the logs. But there must be some kind of overhead in how the startup script creates the links, since I tried to create a test symlink inside the container and it took just 3 ms:
root@9bed2b6e99f3:/# time ln -s start-collabora-online.sh testlink
real 0m0.003s
user 0m0.002s
sys 0m0.001s
This is interesting - we start to log because the linking is -so- slow.
kit-00043-00041 2021-11-03 06:56:22.848290 [ kit_spare_001 ] INF Jail path: /opt/lool/child-roots/nga9SP6lb0ulsOBD/| kit/Kit.cpp:2388
kit-00043-00041 2021-11-03 06:56:22.848525 [ kit_spare_001 ] INF Mounting is disabled, will link/copy /opt/lool/systemplate → /opt/lool/child-roots/nga9SP6lb0ulsOBD/| kit/Kit.cpp:2460
kit-00043-00041 2021-11-03 06:56:22.848594 [ kit_spare_001 ] INF linkOrCopy all from [/opt/lool/systemplate] to [/opt/lool/child-roots/nga9SP6lb0ulsOBD/].| kit/Kit.cpp:428
kit-00043-00041 2021-11-03 06:56:22.848664 [ kit_spare_001 ] TRC nftw: Skipping redundant path: /opt/lool/systemplate| kit/Kit.cpp:323
kit-00043-00041 2021-11-03 06:56:26.223104 [ kit_spare_001 ] WRN Linking/copying files from /opt/lool/systemplate to /opt/lool/child-roots/nga9SP6lb0ulsOBD/ is taking too much time. Enabling verbose link/copy logging.| kit/Kit.cpp:335
It would be great to get a view of what filesystems are used on your system for the jail paths there.
I believe we had a (still pending) patch from Gabriel to detect stack-fs and in this case do a copy to linkable/ and then hard-link since this is (apparently) much faster than making the FS do an underlying copy by hard-linking.
That should be easy by removing the first:
// first try a simple hard-link
if (link(fpath, newPath.c_str()) == 0)
return;
Any chance you can test with the latest alpha release of CO-2021 to see if it improves things? if not we may need to detect a new FS magic here and adapt - and/or back-port that patch to cp-6.4 if it is working well.
Thanks to both for your support. Currently I’m using the collabora/code image (image ID: 30827c1421b8) that was the latest one when I pulled it a couple of days ago. If I’m correct it sports loolswd 6.4.13 (git hash: 078e8b8). To test the fix the easiest way for me would be to have an updated docker image, is it (or will it be) available?
I tried to build the docker image by myself as explained in online/docker/README, but the code compilation gets stuck at:
cd /tmp/online/docker/from-source/builddir/core && ./g -f clone
Submodule 'translations' (https://gerrit.libreoffice.org/translations) registered for path 'translations'
Submodule 'dictionaries' (https://gerrit.libreoffice.org/dictionaries) registered for path 'dictionaries'
Cloning into '/tmp/online/docker/from-source/builddir/core/translations'...
since it seems that https://gerrit.libreoffice.org/translations does not exist.
Edit: I probably fixed it by substituting gerrit with git in the submodule URLs, but now it comes out that I can’t build the docker image since the build script wants to build on my system (Archlinux, which is not supported) rather than inside a container. Weird way to build a docker image…