I will give an example of viewing and increasing the open_files_limit parameter in MySQL.
Continue reading “How to change open_files_limit in MySQL”
Will perform operations in the Ubuntu Server 16.04.
Once on one high-load access server with about 5 Gb/s traffic in /var/log/syslog, errors began to appear frequently:
Continue reading “Solution «TX driver issue detected, PF reset issued»”
innotop is a utility for monitoring the status of MySQL server.
I will give an example of installing innotop in Ubuntu. Since innotop is present in mysql-client, we install it and the necessary components:
Continue reading “Installing and using innotop”
The script every second displays the number of incoming and outgoing packets per second on the specified network interface.
Continue reading “PPS Viewer Script (Packets Per Second)”
Place the contents of the script into a file, for example, pps.sh and execute by specifying the name of the network interface (you can stop the execution of the script with CTRL+C):
Through “Scaling Governor”, you can choose the optimal CPU frequency control scheme, which affects power consumption and performance.
On highly loaded access servers, acquaintances had cases of server hangup during “ondemand”, although I did not have such cases, but still I recommend changing it to “performance”.
Continue reading “Changing CPU Scaling Governor on Linux”
On laptops and lightly loaded servers, you can leave “ondemand” to save energy.
I will give an example of balancing only incoming traffic with two channels using Quagga.
On the test, I will use Ubuntu 16.04.4 LTS and Quagga 0.99.24.1, the network interface ens1f0 for the second provider with one neighbors and ens2f0 for the first provider with two neighbors, the local network will be connected to ens2f1. Both providers announce “default”.
22.214.171.124/23 this will be my network with white IP addresses.
Continue reading “BGP. Channel Balancing on Quagga”
NetData – monitoring system that displays real-time statistics on web panels.
On the test, I will install NetData on Ubuntu 18.04 and Ubuntu 16.04.
Before installing, you can upgrade the system:
sudo apt-get update
sudo apt-get upgrade
If Ubuntu version is 18.04 and newer, then NetData is installed with the command:
sudo apt-get install netdata
After installation, the configuration will be in /etc/netdata/, the logs in /var/log/netdata/.
On Ubuntu 16.04 and older, you can install as follows (the installation will be done in /opt/netdata/):
sudo bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
Restart NetData can command:
sudo systemctl restart netdata
sudo systemctl status netdata
sudo ps ax | grep netdata
After installing NetData, you can immediately open it in the browser http://HOST:19999
I recommend to immediately restrict access to the tcp port 19999, for example through iptables.
MySQLTuner – This is a Perl script that will give recommendations for improving the performance and stability of the MySQL server.
GitHub Page – https://github.com/major/MySQLTuner-perl
MySQLTuner in Ubuntu can be installed with the command:
sudo apt-get install mysqltuner
In CentOS as follows:
yum install mysqltuner
Continue reading “Installing and using mysqltuner.pl”
Apache JMeter — load testing tool.
For Apache JMeter you need to install Java, see my article – Installing Java on Linux.
For an example I’ll install Apache JMeter in Ubuntu Desktop 18.04.
After Java is installed, copy the link to the archive with the latest version of Apache JMeter from the official site http://jmeter.apache.org/download_jmeter.cgi and download it:
Extract the archive:
tar -xf apache-jmeter-4.0.tgz
After the startup, a message was displayed that you can create tests in the Apache JMeter graphical mode, and you can execute them only from the terminal, for example:
jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
By the way, Apache JMeter in Windows is run through the jmeter.bat file.
Iperf — cross-platform console client-server program – a TCP and UDP traffic generator for testing network bandwidth.
The installation command in Ubuntu:
sudo apt-get install iperf
To display help in the console, type:
Let’s see what version was installed:
To test network bandwidth, the following commands are executed:
iperf -s -i1
On the client:
iperf -c HOST -t 5
On the client from Windows, you can run the bat file, the pause command will prevent the window from closing:
iperf -c HOST -t 5
You can download the version for Windows on the website iperf.fr
If iperf 2 is installed on the server, then the same is downloaded for Windows. The client of the third version did not connect to the server on the second one.
I’ll describe some startup options:
-i (statistics update interval)
-s (running in server mode)
-c (running in client mode)
-p (manual port specification, standard 5001 TCP)
-D (start the server as a daemon)
-t (test time, standard 10 seconds)
Suppose we run the server as a daemon:
iperf -s -D
Press Ctrl+C to exit, the server will work in the background to complete it, see PID commands and finish:
sudo ps ax | grep iperf
sudo netstat -tulpn | grep :5001
sudo kill -9 PID
IPTables rules for Iperf