Why does installation of x-pack take so long time?


(Mathias) #1

Hi,
It takes more than 15 minutes to install x-pack in Kibana.
Is that normal?
Is there a debug option to see what is going on during installation phase?

Running on Ubuntu 16.04.
Elastic stack 5.0.0

Br Mat


(Lee Drengenberg) #2

Hi Mat,
Installing x-Pack has 2 parts that can each take a while.

The first is when it's downloading the Kibana X-Pack zip file. It's about 54MB and I just downloaded that to check and it took me 51s to download. That part could take more or less time depending on your connection.

The second part is the Optimizing and caching browser bundles... and it can take a couple of minutes. On my last install the whole thing took just over 3 minutes, so that optimizing step took a little over 2 minutes. But I have seen it take longer. The dev team is aware that this step is slow and are planning to rewrite some code to reduce or eliminate that time. But it's a significant change and I don't know when we'll see it in a release.

Is yours taking all the time during the Optimizing and caching browser bundles...?

There's not any debug logging you could turn on that shows what's going on during that Optimizing and caching browser bundles... step.

Here's my timed install of a test version of x-pack;

[root@localhost vagrant]# time /usr/share/kibana/bin/kibana-plugin install http://....../downloads/kibana-plugins/x-pack/x-pack-5.0.0.zip
Attempting to transfer from http://..../downloads/kibana-plugins/x-pack/x-pack-5.0.0.zip
Transferring 56957357 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation complete

real    3m1.211s
user    2m8.156s
sys     0m7.569s

Regards,
Lee


(Mathias) #3

Hi Mat,

I measured and it took me 9 min and 24 secs to run the installation.
I have 100Mbit/s connection but is currently connected to office which limits the connection to 20Mbit/s.
The download is fast.

I noticed that the the CPU is idling quite a lot.
top - 17:45:29 up 5:56, 2 users, load average: 1.36, 1.06, 0.54
Tasks: 144 total, 2 running, 142 sleeping, 0 stopped, 0 zombie
%Cpu0 : 18.9 us, 1.3 sy, 0.0 ni, 19.2 id, 0.0 wa, 0.0 hi, 0.3 si, 60.3 st
%Cpu1 : 8.1 us, 2.5 sy, 0.0 ni, 52.8 id, 0.0 wa, 0.0 hi, 0.0 si, 36.6 st
KiB Mem : 2048252 total, 90456 free, 1247136 used, 710660 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 596408 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6874 root 20 0 2102388 999.9m 21652 R 114.3 50.0 5:52.90 /usr/share/kibana/bin/../node/bin/node --no-warnings /usr/share/kibana/bin/../src/cli_plugin install x-pack
7 root 20 0 0 0 0 S 6.6 0.0 3:17.20 [rcu_sched]
6047 root 20 0 640072 22224 10256 S 1.7 1.1 0:07.62 /usr/share/metricbeat/bin/metricbeat -c /etc/metricbeat/metricbeat.yml -path.home /usr/share/metricbeat -path.config /etc/metricbeat -path.data /var/lib/+
6946 ubuntu 20 0 40548 3700 3016 R 1.7 0.2 0:00.52 top
3279 root 20 0 25092 21136 12372 S 1.3 1.0 0:54.55 /opt/consul agent -config-dir /etc/consul
34 root 20 0 0 0 0 S 0.7 0.0 0:03.28 [kswapd0]
4082 kibana 20 0 1291496 127420 21280 S 0.3 6.2 2:39.26 /usr/share/kibana/bin/../node/bin/node --no-warnings /usr/share/kibana/bin/../src/cli -c /etc/kibana/kibana.yml
6931 ubuntu 20 0 95368 4216 3260 S 0.3 0.2 0:00.15 sshd: ubuntu@pts/1
13993 root 20 0 275080 5080 3856 S 0.3 0.2 0:04.75 /usr/lib/accountsservice/accounts-daemon
32033 dnsmasq 20 0 51588 2100 1700 S 0.3 0.1 0:00.96 /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-ser+
1 root 20 0 185368 6072 4052 S 0.0 0.3 0:39.87 /lib/systemd/systemd --system --deserialize 24

A failed installation (due to already the plugin is already is installed stops after 1 min and 12 secs)

sudo time /usr/share/kibana/bin/kibana-plugin install x-pack
Attempting to transfer from x-pack
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-5.0.0.zip
Transferring 56932561 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin x-pack already exists, please remove before installing a new version
Command exited with non-zero status 70
58.52user 15.53system 1:12.07elapsed 102%CPU (0avgtext+0avgdata 699732maxresident)k
16inputs+320048outputs (1major+301060minor)pagefaults 0swaps

I will later try to get more cores and more memory to see if it makes any difference.

Br Mathias


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.