Benchmark numbers on VPS spec sheets rarely reflect real-world application performance. Actual throughput depends on virtualisation overhead, storage I/O scheduling, network routing, and the interplay between your application and the underlying hardware. This guide walks through a systematic performance testing methodology for your Hong Kong VPS — covering CPU, NVMe I/O, network throughput, and web application response times from Asia-Pacific vantage points.
Why Benchmark Your VPS?
- Verify that you are receiving the CPU and I/O performance you are paying for
- Establish a performance baseline before optimising your application
- Detect CPU steal time indicating resource oversubscription
- Compare before/after application configuration changes
- Verify CN2 GIA routing delivers expected latency to mainland Chinese endpoints
Step 1: CPU Performance Benchmark
apt install -y sysbench stress-ng
# Single-core CPU test (prime number calculation)
sysbench cpu --cpu-max-prime=20000 --threads=1 run
# Multi-core CPU test
sysbench cpu --cpu-max-prime=20000 --threads=$(nproc) runKey metric: events per second. A modern KVM VPS vCPU should achieve 400–800 events/second on the prime test. Significantly lower values may indicate CPU steal from an oversubscribed host.
Check CPU Steal Time
# Run this during a load test — watch the 'st' column
vmstat 1 30
# Also check with top — 'st' in the CPU line
top
# Or with mpstat
apt install sysstat -y
mpstat 1 30 | awk '/Average/ {print "CPU steal:", $9, "%"}'Acceptable CPU steal: 0–2%. Above 5% consistently indicates your provider is oversubscribing the physical host. On Server.HK KVM VPS with hard resource allocation, steal time should be near zero.
Step 2: NVMe Storage I/O Benchmark
apt install -y fio
# Test 1: Random 4K read IOPS (database I/O pattern)
fio --name=rand-read --rw=randread --bs=4k \
--numjobs=4 --iodepth=32 --size=1G \
--runtime=60 --time_based \
--filename=/tmp/fio-test \
--ioengine=libaio --group_reporting \
| grep -E "IOPS|lat"
# Test 2: Sequential write throughput (log writes, backups)
fio --name=seq-write --rw=write --bs=1M \
--numjobs=1 --iodepth=8 --size=4G \
--filename=/tmp/fio-seqwrite \
--ioengine=libaio --group_reporting \
| grep -E "BW|iops"
# Cleanup
rm -f /tmp/fio-test /tmp/fio-seqwriteExpected NVMe SSD Results on Server.HK VPS
| Test | Expected range | Indicates problem if |
|---|---|---|
| Random 4K read IOPS | 50,000–500,000 | Below 10,000 |
| Random 4K read latency | 0.05–0.5ms | Above 5ms |
| Sequential write throughput | 500–3,000 MB/s | Below 100 MB/s |
Step 3: Network Throughput Benchmark
apt install -y iperf3 speedtest-cli
# Test download throughput to public iperf3 server
iperf3 -c iperf.he.net -t 30 -P 4 --reverse
# Test upload throughput
iperf3 -c iperf.he.net -t 30 -P 4
# Simple speedtest
speedtest-cliCN2 GIA Latency Verification — Most Important Test
# Install mtr (better traceroute)
apt install -y mtr
# Test latency to mainland China (China Telecom IP)
mtr --report --report-cycles=20 202.97.0.1
# Test latency to Shanghai
mtr --report --report-cycles=20 202.96.0.133
# Verify CN2 GIA routing (look for 59.43.x.x or 202.97.x.x AS4809 hops)
traceroute -n 202.97.0.1What Good CN2 GIA Routing Looks Like
# Expected traceroute to mainland China via CN2 GIA:
# Hop 1: Your VPS gateway ~0.5ms
# Hop 2: HK CN2 entry point ~2ms
# Hop 3: 59.43.x.x (AS4809) ~5ms ← CN2 GIA backbone
# Hop 4: 59.43.x.x (AS4809) ~15ms ← Still on premium backbone
# Hop 5: 202.97.x.x ~25ms ← China Telecom backbone
# Hop 6: Target IP ~35ms
# If you see 202.96.x.x or 61.182.x.x — that's 163 (AS4134), NOT CN2 GIAStep 4: Web Application Response Time Testing
Apache Bench (ab) — Local Load Test
apt install -y apache2-utils
# 1000 requests, 50 concurrent — test your own application
ab -n 1000 -c 50 https://yourdomain.com/
# Key metrics to note:
# - Requests per second: should be 100+ for cached pages
# - Mean time per request: target under 100ms for cached
# - Failed requests: should be 0wrk — Modern HTTP Benchmarking
<code">apt install -y wrk 2>/dev/null || \ (apt install -y build-essential libssl-dev git && \ git clone https://github.com/wg/wrk && cd wrk && make && cp wrk /usr/local/bin/) # 30-second test, 4 threads, 100 connections wrk -t4 -c100 -d30s https://yourdomain.com/ # Output includes: # Requests/sec, Transfer/sec, Latency percentiles (p50, p75, p99)
Testing from China Vantage Points
The most meaningful performance data comes from testing from actual mainland China connections. Tools for China-origin testing:
- 17ce.com — Chinese website speed testing from 100+ mainland China nodes. Enter your domain and get response times, TTFB, and download speed from cities across China
- ping.pe — Global ping test including mainland China nodes; shows ICMP latency from Beijing, Shanghai, Guangzhou, and others
- IPIP.net — Comprehensive Chinese network testing tool showing latency from all major Chinese ISPs
Target TTFB from mainland China for a cached WordPress page on Hong Kong VPS: 30–80ms. Compare against your pre-optimization baseline.
Step 5: Database Performance Benchmark
# MySQL benchmarking with sysbench
apt install -y sysbench
# Create test database
mysql -u root -p -e "CREATE DATABASE sbtest;"
# Prepare test data (1M rows)
sysbench oltp_read_write \
--db-driver=mysql \
--mysql-db=sbtest \
--mysql-user=root \
--mysql-password=YOUR_ROOT_PW \
--table-size=1000000 \
--tables=4 \
prepare
# Run read/write benchmark (60 seconds)
sysbench oltp_read_write \
--db-driver=mysql \
--mysql-db=sbtest \
--mysql-user=root \
--mysql-password=YOUR_ROOT_PW \
--table-size=1000000 \
--tables=4 \
--threads=8 \
--time=60 \
run
# Cleanup
sysbench oltp_read_write \
--db-driver=mysql --mysql-db=sbtest \
--mysql-user=root --mysql-password=YOUR_ROOT_PW \
cleanupKey metric: transactions per second (TPS). A 2 GB VPS with NVMe should achieve 200–500 TPS on the mixed OLTP benchmark. A 4 GB VPS with tuned InnoDB buffer pool should achieve 500–1,500 TPS.
Step 6: Memory Bandwidth
apt install -y stream 2>/dev/null || \
(apt install -y gcc && \
wget https://www.cs.virginia.edu/stream/FTP/Code/stream.c && \
gcc -O3 -march=native -fopenmp stream.c -o stream && \
OMP_NUM_THREADS=$(nproc) ./stream)
# Reports memory bandwidth in MB/s for Copy, Scale, Add, Triad operations
# Expected on modern KVM VPS: 10,000–50,000 MB/sStep 7: Automated Benchmark Script
<code">cat > /opt/vps-benchmark.sh << 'SCRIPT' #!/bin/bash echo "=== VPS Benchmark Report ===" echo "Date: $(date)" echo "Hostname: $(hostname)" echo "OS: $(cat /etc/os-release | grep PRETTY_NAME | cut -d'"' -f2)" echo "CPU: $(grep 'model name' /proc/cpuinfo | head -1 | cut -d: -f2 | xargs)" echo "vCPUs: $(nproc)" echo "RAM: $(free -h | grep Mem | awk '{print $2}')" echo "" echo "=== CPU Test ===" sysbench cpu --cpu-max-prime=20000 --threads=$(nproc) run 2>/dev/null | grep "events per second"
echo ""
echo "=== Disk I/O ==="
fio --name=test --rw=randread --bs=4k --numjobs=4 --iodepth=32 \
--size=512M --runtime=10 --time_based --filename=/tmp/bench-fio \
--ioengine=libaio --group_reporting 2>/dev/null | grep "IOPS"
rm -f /tmp/bench-fio
echo ""
echo "=== Network ==="
curl -s https://speed.cloudflare.com/__down?bytes=104857600 -o /dev/null -w "Download: %{speed_download}" | \
awk '{printf "%.1f MB/s\n", $2/1048576}'
echo ""
echo "=== CN2 GIA Check ==="
mtr --report --report-cycles=5 202.97.0.1 2>/dev/null | \
grep -E "59\.43\.|202\.97\." | head -3
echo "========================="
SCRIPT
chmod +x /opt/vps-benchmark.shInterpreting Results: Red Flags to Watch For
| Symptom | Likely Cause | Action |
|---|---|---|
| CPU steal > 5% consistently | Host oversubscription | Contact support or change provider |
| Disk IOPS < 10,000 (4K random) | HDD or shared storage pool throttling | Verify NVMe, request review |
| China latency > 80ms (off-peak) | Not on CN2 GIA / routing issue | Run traceroute to verify AS4809 |
| China latency > 150ms (peak hour) | 163 backbone routing, not CN2 GIA | Confirm CN2 GIA with provider |
| Database TPS < 100 | Underpowered, or buffer pool too small | Tune innodb_buffer_pool_size |
| High TTFB despite fast hardware | Uncached PHP, missing Redis | Enable opcache and Redis object cache |
Conclusion
Systematic benchmarking gives you an objective baseline for your Hong Kong VPS performance — and the CN2 GIA latency test to mainland China is the single most important measurement for Asia-Pacific deployments. CPU steal time reveals oversubscription, NVMe IOPS confirm storage quality, and the 17ce.com test shows what real mainland Chinese users actually experience when loading your pages.
Run benchmarks on a fresh VPS before configuring production services — compare the clean baseline against measurements after application installation to understand exactly how much of your hardware capacity your application stack consumes.
Benchmark your own server: Browse Server.HK Hong Kong VPS plans — KVM hard isolation, NVMe SSD, and CN2 GIA routing ensure benchmark results reflect your actual guaranteed allocation.