Configuring systems for higher service load

There are some configuration entries to tune the server to allocate more resources to PowerFolder.

One for example is the possibility to configure the maximum allowed threads.
In Windows there is no thread limit so there is no need to configure anything but in Linux there is mostly a thread limit overall and a thread limit per user.

Differnet distributions

In some distributions those limits are configured in another way. This Wiki Article is tested only with Linux (Ubuntu 18.04 and 20.04).

Max value of threads that can get generated on the OS

You can show the value how many threads are allowed in your system with:
sudo sysctl -a | grep threads

The output of "kernel.threads-max" is the maximum value that is set by default on your server.


You now can raise it temporarily with the following command with root permission:
echo "<value>" > /proc/sys/kernel/threads-max

User can change the system threads permanently through the following entry:

sudo sysctl -w kernel.threads-max=<value> >> /etc/sysctl.conf

Example:

sudo sysctl -w kernel.threads-max=1030055 >> /etc/sysctl.conf

After saving the file the changes take effect when using the command:
sudo sysctl -p

Max value of threads that can get generated by a user

You can show all the values by using the following command:
ulimit -a

Changing it is pretty easy and has only effect for the user that is using this command (example pfuser for PowerFolder service):

sudo ulimit -i <value> (for pending signals)

Example: 

sudo ulimit -i 515354


sudo ulimit -u <value> (for max user processes)

Example:

sudo ulimit -u 515354

Web server configuration

(Available with version 11.6.708 and above)

Our software is using Jetty as a web server. There are some configuration entries that can change its behavior and allocated more rescources to serve the incoming connections of the web portal and http Tunnel.

web.threadpool.min=0 (default)

Controls the minimum threadpool size of the jetty. Using a higher value keeps more rescources when starting or beeing idle to server incoming users. Recomended: 50 MB or lower

web.threadpool.max=254 (default)

Controls the maximum threadpool size of the jetty. Using a higher value allows it to allocate more rescources but might increase load when the server is idle. Recommended: A value between 254 and 500

web.acceptors=2 (default)

Controls the ammount of acceptor and selector threads that are opened by jetty. This value should get configured carefully since every acceptor and selector can highly raise CPU usage. Don't configure more than you have CPU cores available.

Before configure these settings read the following article: https://www.eclipse.org/jetty/documentation/9.3.x/high-load.html