Crossbar router start-up speed



What is your experience with crossbar router start up time?

I’ve been experimenting with crossbar systemd service start up times.
I’m using different upstream/custom debian images. (sometimes different hardware as well)

It takes around from 5.6 seconds all the way to the 9 seconds.
It takes a lot longer depending on what is enabled on the systemd at boot up.

After restarting it with systemctl restart, depending on the installed image, start up time reduces to 3.9s - 5.3 s.

The problem:
We have a couple of systemd services which are required to boot up very quickly.
And these services depends on the crossbar router, all of these services are delayed due to crossbar slow start-up time.

Do you have any optimization tips for reducing crossbar router start up time? Or is this normal?

Crossbar version: 18.11.1

Intel® Atom™ Processor E3930 @ 1.30GHz (2 cores)
4 GBs of RAM

Crossbar systemd unit file:
Description=crossbar io router



This is basically what /usr/local/wamp/ contains:
$ crossbar start -cbdir $PWD/.crossbar

I can share more configurations etc. if it’s required.

1 Like

Hello and Welcome to the Crossbar forum.

I don’t think there is anything today to launch a “trimmed down” version of crossbar to increase startup time but I experience similar problems when run crossbar on the raspberry pi, which takes even longer because of slow storage medium.

We should probably be doing some sort of performance benchmarks going forwards.

1 Like


This may not be relevant, but can you take a look at the systems exhibiting the variable startup times and detail how much entropy they typically have available?

cat /proc/sys/kernel/random/entropy_avail

An issue I’ve come across recently is that if this number is too low, it can cause some Python libraries to block until entropy becomes available … which for me manifested in Crossbar FX startup delays …

1 Like

Hi and thank you om26er

I was hoping that I made an configuration error and I could reduce the start up to 1-3 seconds.

Maybe I can survive with ~5 seconds but depending on what is enabled on systemd at boot up, I’ve seen go up as much as +15 seconds.


Hi and thank you oddjobz,

How much low is too low?

I’ve checked it with a entropy watcher service and it’s around 40~80 when wamp router is starting up. I need to investigate this further, thank you.

This may explain the speed drop during boot up but it still takes too much time when restarting it with systemctl.


@Acu43 my experience is that Crossbar(FX) will block if available entropy is less than 64. (when I say Crossbar, I think it’s actually dependent libraries doing the blocking) There are a bunch of tools you can install depending on your environment to increase entropy, the quickest brute force method I’ve found to get it over the line is “find /” … not that I’m recommending this as a fix … :wink:

If like me you’re using KVM, a relatively easy fix is to go into your virtual machine manager, do “add hardware”, select “RNG”, then Finish. (you may need a reboot) Otherwise, whatever platform you’re running on, look at options for virtual RNG hardware.

I was hitting the problem maybe 1 startup in three … i.e. under 64, now it looks like this;

gareth@cbnode3:~$ cat /proc/sys/kernel/random/entropy_avail

(and I don’t see the issue any more … at all …)

1 Like