Is your VPS running slower than expected? Or maybe you’re just curious about its performance capabilities? This guide will show you how to use command-line tools to test your Linux VPS speed, including CPU, hard drive, and network performance.
Linux: Measure Your VPS Performance: CPU and Hard Drive Speed Tests
Knowing how to assess your VPS performance can help you:
- Troubleshoot performance issues: Identify bottlenecks and areas for improvement.
- Compare VPS providers: Make informed decisions when choosing a VPS plan.
- Monitor performance over time: Track changes and ensure optimal performance.
We’ll be using a handy script called yabs.sh
for most of our tests. This script provides a comprehensive overview of your VPS performance with easy-to-understand results.
1. Install yabs.sh
To get started, download and run the yabs.sh
script:
curl -sL yabs.sh | bash
2. Hard drive speed test
To test your hard drive read and write speeds, use the following command:
yabs.sh -ig
This will output the IOPS (Input/Output Operations Per Second) and MB/s (Megabytes per second) for different block sizes. Higher values indicate better performance.
Understanding the Results:
- IOPS: The number of read/write operations the drive can handle per second. A higher IOPS means your drive can access and modify data more quickly.
- MB/s: The amount of data that can be read or written per second. A higher MB/s means faster data transfer speeds.
3. Test VPS network speed (Upload/Download)
bash -s -- -fgr
This will test your network connection to various servers around the world and display the results.
Understanding the Results:
- Ping: The latency or delay in communication between your VPS and the server. A lower ping indicates a more responsive connection.
- Provider: The name of the network service provider for the test server.
- Location (Link): The geographical location and network link of the test server.
- Send Speed: The speed at which your VPS can send data to the server (upload speed).
- Recv Speed: The speed at which your VPS can receive data from the server (download speed).
4. Test CPU performance
To test your VPS CPU performance, use the following command:
bash -s -- -fi
This will run a benchmark test and provide scores for single-core and multi-core performance.
Understanding the Results:
- Single Core: Measures the CPU’s performance in tasks that use only one core. Higher scores indicate better performance for single-threaded applications.
- Multi Core: Measures the CPU’s performance in tasks that utilize multiple cores. Higher scores indicate better performance for multi-threaded applications and overall processing power.
5. Test Internet Speed to Your Location
You can also test the speed of your internet connection to your specific location using tocdo.net
:
curl -Lso- tocdo.net | bash
This script will measure your download and upload speeds to a server near your location. This can be helpful to see how your VPS’s network performance compares to your own internet connection.
- dd Test: VPS network speed test results are performed using the dd tool to measure the read and write speeds of the drive. Each run is shown the I/O speed results and then averaged to give the average I/O speed. The VPS performance test results show an average speed of 861.3 MB/s.
- Fio Test: This section uses the Fio tool to measure the read and write speed of the drive. Results display read speed, number of reads per second (IOPS) and write speed, number of writes per second (IOPS). Your results show a read speed of 155 MB/s, a read IOPS of 37.8k, a write speed of 51.7 MB/s, and a write IOPS of 12.6k.
When testing the speed of Linux/VPS hard drives, with ordinary hard drives, the average write and read speed of HDD usually ranges from about 100 MB/s to 200 MB/s. However, there may be high-end HDD drives or 10,000 RPM (revolutions per minute) drives that can achieve higher speeds, between 200 MB/s and 250 MB/s. So with the above results we see that the dd test fluctuates around 861 MB/s ie the SSD drive. Of course, the higher the score, the stronger the speed and performance of your VPS.
By using these simple command-line tools, you can gain valuable insights into your Linux VPS performance. Regularly monitoring your VPS speed can help you ensure optimal performance and address any potential issues before they impact your applications.