How to Measure Performance on Your Linux VPS Server

A virtual private server with Linux operating system is one of the most profitable solutions for the development of e-commerce, other types of business, and private tasks (source). Sometimes the client needs to know the technical parameters of the system in order to plan development strategies. If there are doubts about the smooth operation of the virtual private server, it is necessary to make sure of its high performance. Different tools and commands are used to measure the technical performance of Linux VPS. For example, the command line utility hdparm is designed to view and configure the hard disk parameters. You can use the application to find out what is the maximum speed supported by the HDD and what is its current operating speed.

Often the utility is included in the package of distributions provided by the hoster as part of the plan. If it is missing, you need to install the software to perform testing. A special command is used for this purpose. Using the utility is quite simple: hdparm [technical parameters] [device name]. For example, to find out the speed of reading data from the disk, two parameters are used simultaneously – t and T. In the first one, it is the speed of reading data from the cache, in the second one, it is the actual speed without caching the data. 

To find out the maximum speed of your hard drive, use the /dev/sda parameters. Entering the command will cause the data to appear on the screen: Gen1 (digital bit/sec)*Gen2 (digital bit/sec) signal bit rate. 

To find out CPU performance, the multi-threaded sysbench tool evaluates many technical characteristics. The utility tells you the performance of your CPU, memory, and database. If the program is not bundled as part of your price plan, you must install it using the same approach as when you installed hdparm. The next step is to enter an expression into the command line: sysbench test=cpu run or sysbench test=cpu-max-prime=20000 run. As a result of these actions, a statistical report will appear on the screen. If you want to test memory, enter "memory help" instead of "cpu run". By changing the parameters in the command you can get information about the technical characteristics of the Linux VPS. 

How to control the performance of a Linux VPS

To monitor the performance of a Linux VPS at the command line you can use the top command. The top application runs a table of real-time processes. The result is a list of all running processes. To activate top you need to log on to the server using the SSH network protocol and type the command at the command line. A table containing the data will appear on the monitor:

  • System uptime – the period since the last load. 
  • The number of users who have logged on to the server.
  • The number of running tasks with information about status, and execution status (pending, termination, completion).
  • CPU state – load with the share of users, system, and waiting time for the completion of the input and output command. 
  • Memory usage – physical and virtual. 

You can use the individual keys to get additional information, such as the processing of processes started by a particular user. The commands also allow you to change the sort order and terminate a workflow. 

Solution options

Having a Linux VPS plan requires periodic performance testing. Important indicators are the number of web requests per second and the period of latency of web requests. These values will help to determine the level of comfort for end users who visit the website. Slow down the web resource can be such factors as a large number of installed applications, tables, and scripts, as well as complex rendering (the process of obtaining graphical images on the computer). 

The lack of caching or improper cache settings also contributes to the slowdown. You can measure the HDD's read and write speed with the dd utility. One command is enough to get the information you need, namely how fast the file is being written to the hard disk. The program will create and write random data to the file. As a result, the screen will show information about the weight of the file and the time it took to write it. This is how the speed of writing to the hard disk is determined. Any speed that exceeds 50 MB/s is considered normal. For the server, it is better to use an SSD (Solid State Drive), which will provide the necessary capacity for data storage.

Benchmark tests

It is not uncommon for a tenant to find it difficult to switch to a Linux VPS from a virtual shared server. Usually, difficulties arise if the tenant tries to configure the system by himself. Hosted servers are a simple solution that can save time and prevent many performance issues. Monitoring performance can also be a challenge. There are several simple utilities that can help troubleshoot server issues:

  • The HTop application is the result of the evolution of the top program. Unlike its predecessor, it gives detailed information about the processes. You can use the F6 key to sort through the memory usage to see which processes are loading the hard disk most. 
  • The AB utility is a performance checker tool within the Apache software. This tool will help you determine the speed of a website. When you enter the command, you specify parameters such as the number of requests and the number of simultaneous requests. The result includes the number of requests processed per unit of time. 
  • The MTop application is used to control the operation of MySQL databases. With the help of the utility, you can get information about the number of queries in real time, the cache, and the period required to process the query. 
  • The command line utility netstat is needed to find out which ports are open and which processes are using those ports. At the same time, information about ongoing hacker attacks becomes available. 

To use the MTop application, you will need to install it beforehand. Performance along with characteristics such as input and output speed and Internet connection speed are the main performance indicators of a Linux VPS server. 

To check the network speed, which directly affects the speed of processing requests from website users, you need to use a special tool Speedtest.net. This is a web service that allows you to analyze the speed of your Internet connection and detect delays. Usually, the connection speeds offered by providers range from 100 Mbit/s to 10 Gbit/s. The necessary parameters are chosen according to the needs, for example, the daily number of visitors to the website. 

To ease the task of setting up a Linux VPS server and testing its technical characteristics, it is better to turn to professionals – IT professionals.

Leave a Reply

Your email address will not be published. Required fields are marked *