Was this page helpful?
Caution
You're viewing documentation for a previous version of ScyllaDB Enterprise. Switch to the latest stable version.
System configuration steps are performed automatically by the Scylla RPM and deb packages. For information on getting started with Scylla, see Getting Started.
All Scylla AMIs and Docker images are pre-configured by a script with the following steps. This document is provided as a reference.
Several system configuration settings should be applied. For ease of use, the necessary scripts and configuration files are provided. Files are under dist/common
and seastar/scripts
in the Scylla source code and installed in the appropriate system locations. (For information on Scylla’s own configuration file, see Scylla Configuration.)
File Name |
Description |
---|---|
scylla.conf |
Remove system resource limits |
scylla-server |
Server startup options |
(written by |
Configure core dumps to use the |
The following scripts are available for you to run for configuring Scylla. Some of these scripts are included in the scylla_setup script. This script is used for configuring Scylla the first time, or when the system hardware changes.
perftune.py |
Configures various system parameters in order to improve the Seastar application performance |
---|---|
scylla_bootparam_setup |
Sets the kernel options in the bootloader. In addition, it tunes Linux boot-time parameters for the node that Scylla is running on (e.g. huge page setup). |
scylla_coredump_setup |
Sets up coredump facilities for Scylla. This may include uninstalling existing crash reporting software for compatibility reasons. |
scylla_io_setup |
Benchmarks the disks and generates the io.conf and io_properties.yaml files. |
scylla_ntp_setup |
Configures Network Time Protocol |
scylla_prepare |
This script is run automatically every time Scylla starts and the machine needs to be tuned. |
scylla_raid_setup |
Configures RAID and makes an XFS filesystem. |
scylla_save_coredump |
Compresses a core dump file (Ubuntu only) |
scylla_setup |
Sets up the Scylla configuration. Many of these scripts are included in the setup script. |
scylla_stop |
Resets network mode if running in virtio or DPDK mode. |
scylla_swap_setup |
Configures a swap space on the host. |
scylla_sysconfig_setup |
Rewrites the /etc/sysconfig/scylla file. |
Script Name |
Description |
---|---|
node_health_check |
Gathers metrics and information on the node, checking that the node is configured correctly. |
scylla-blocktune |
Tunes the filesystem and block layer (e.g. block size I/O scheduler configuration) for Scylla. |
scylla_cpuscaling_setup |
Configures the CPU frequency scaling (IOW, puts the CPU in “performance” mode, instead of the slower “powersave” mode). |
scylla_cpuset_setup |
Configures which CPUs the Scylla server threads run on. |
scylla_fstrim |
Runs |
scylla_fstrim_setup |
Configures a job so that |
scylla-housekeeping |
Checks if there are new versions of Scylla available, and also shares some telemetry information for us to keep track of what versions are installed on the field. |
scylla_rsyslog_setup |
Configures the “rsyslog” service, which is used to send logs to a remote server. |
scylla_selinux_setup |
Disables SELinux for Scylla. |
Note
It’s important to keep I/O scheduler configuration in sync on nodes with the same hardware. That’s why we recommend skipping running scylla_io_setup when provisioning a new node with exactly the same hardware setup as existing nodes in the cluster.
/etc/scylla.d/io.conf
/etc/scylla.d/io_properties.yaml
Using different I/O scheduler configuration may result in unnecessary bottlenecks.
If Scylla is installed on an Amazon AMI, the bootloader should provide the clocksource=tsc
and tsc=reliable
options. This enables an accurate, high-resolution Time Stamp Counter (TSC) for setting the system time.
This configuration is provided in the file /usr/lib/scylla/scylla_bootparam_setup
.
Remove the apport-noui
or abrt
packages if present, and set up a location and file name pattern for core dumps.
This configuration is provided in the file /usr/lib/scylla/scylla_bootparam_setup
.
It is highly recommended to enforce time synchronization between Scylla servers.
Run ntpstat
on all nodes to check that system time is synchronized. If you are running in a virtualized environment and your system time is set on the host, you may not need to run NTP on the guest. Check the documentation for your platform.
If you have your own time servers shared with an application using Scylla, use the same NTP configuration as for your application servers. The script /usr/lib/scylla/scylla_ntp_setup
provides sensible defaults, using Amazon NTP servers if installed on the Amazon cloud, and other pool NTP servers otherwise.
Setting the file system to XFS is the most important and mandatory for production. Scylla will significantly slow down without it.
The script /usr/lib/scylla/scylla_raid_setup
performs the necessary RAID configuration and XFS filesystem creation for Scylla.
Arguments to the script are
-d
specify disks for RAID
-r
MD device name for RAID
-u
update /etc/fstab for RAID
On the Scylla AMI, the RAID configuration is handled automatically in the /usr/lib/scylla/scylla_prepare script
.
When installing Scylla, it is highly recommended to use the scylla_setup script. Scylla should not share CPUs with any CPU consuming process. In addition, when running Scylla on AWS, we recommend pinning all NIC IRQs to CPU0 (due to the same reason). As a result, Scylla should be prevented from running on CPU0 and its hyper-threading siblings. To verify that Scylla is pinning CPU0, use the command below: If the node has four or fewer CPUs, don’t use this option.
To verify:
cat /etc/scylla.d/cpuset.conf
Example output:
--cpuset `1-15,17-31`
Prevent irqbalance from moving your NICs’ IRQs.
Bind all NICs’ HW queues to CPU0:
for irq in `cat /proc/interrupts | grep <networking iface name> | cut -d":" -f1`
do echo "Binding IRQ $irq to CPU0" echo 1 > /proc/irq/$irq/smp_affinity done
Enable RPS and bind RPS queues to CPUs other than CPU0 and its hyper-threading siblings.
Enable XPS and distribute all XPS queues among all available CPUs.
The posix_net_conf.sh script does all of the above.*
Prevent irqbalance from moving your NICs IRQs.
Bind each NIC’s IRQ to a separate CPU.
Enable XPS exactly the same way as for AWS above.
Set higher values for a listen() socket backlog and for unacknowledged pending connections backlog:
echo 4096 > /proc/sys/net/core/somaxconn
echo 4096 > /proc/sys/net/ipv4/tcp_max_syn_backlog
The posix_net_conf.sh script with the -mq
parameter does all of the above.
Configuration for Scylla itself is in the Scylla Configuration section of the administration guide.
The following item is not required in production.
When working on DPDK support for Scylla, enable hugepages.
NR_HUGEPAGES=128
mount -t hugetlbfs -o pagesize=2097152 none /mnt/huge
mount -t hugetlbfs -o pagesize=2097152 none /dev/hugepages/
for n in /sys/devices/system/node/node?; do
echo $NR_HUGEPAGES > $n/hugepages/hugepages-2048kB/nr_hugepages;
done
Huge page configuration is written to /etc/sysconfig/scylla-server
by the script /usr/lib/scylla/sysconfig_setup
System Limits - outlines the system limits which should be set or removed.
Was this page helpful?