Fix Geekbench test failed and low memory was detected.
I ran yet-another-bench-script (yabs) script with my new VPS and encountered an error.
Example yabs result:
root@us:~# curl -sL yabs.sh | bash
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
Yet-Another-Bench-Script
v2023-02-27
https://github.com/masonr/yet-another-bench-script
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
Fri Mar 10 04:30:37 UTC 2023
Basic System Information:
Uptime : 0 days, 15 hours, 30 minutes
Processor : AMD EPYC 7551P 32-Core Processor
CPU cores : 1 @ 1999.999 MHz
AES-NI : ✔ Enabled
VM-x/AMD-V : ❌ Disabled
RAM : 969.5 MiB
Swap : 0.0 KiB
Disk : 902.3 GiB
Distro : Ubuntu 22.04.1 LTS
Kernel : 5.15.0-46-generic
VM Type : KVM
Basic Network Information:
Protocol : IPv6
ISP : HostHatch
ASN : AS63473 HostHatch, LLC
Host : HostHatch LLC
Location : Los Angeles, California (CA)
Country : United States
fio Disk Speed Tests (Mixed R/W 50/50):
Block Size 4k (IOPS) 64k (IOPS)
Read 6.88 MB/s (1.7k) 68.66 MB/s (1.0k)
Write 6.90 MB/s (1.7k) 69.07 MB/s (1.0k)
Total 13.79 MB/s (3.4k) 137.74 MB/s (2.1k)
Block Size 512k (IOPS) 1m (IOPS)
------ --- ---- ---- ----
Read 192.32 MB/s (375) 181.73 MB/s (177)
Write 202.54 MB/s (395) 193.83 MB/s (189)
Total 394.86 MB/s (770) 375.56 MB/s (366)
iperf3 Network Speed Tests (IPv4):
Provider Location (Link) Send Speed Recv Speed Ping
Clouvider London, UK (10G) 1.26 Gbits/sec 1.40 Gbits/sec
Scaleway Paris, FR (10G) 1.19 Gbits/sec busy 145 ms
NovoServe North Holland, NL (40G) 1.31 Gbits/sec busy 148 ms
Uztelecom Tashkent, UZ (10G) 845 Mbits/sec 675 Mbits/sec 240 ms
Clouvider NYC, NY, US (10G) 1.94 Gbits/sec busy 59.5 ms
Clouvider Dallas, TX, US (10G) 3.19 Gbits/sec 4.62 Gbits/sec 29.2 ms
Clouvider Los Angeles, CA, US (10G) 3.66 Gbits/sec 4.84 Gbits/sec 0.791 ms
iperf3 Network Speed Tests (IPv6):
Provider Location (Link) Send Speed Recv Speed Ping
^PClouvider London, UK (10G) busy busy
Scaleway Paris, FR (10G) 1.43 Gbits/sec 1.16 Gbits/sec 152 ms
NovoServe North Holland, NL (40G) 1.17 Gbits/sec 1.20 Gbits/sec 151 ms
Uztelecom Tashkent, UZ (10G) 782 Mbits/sec 669 Mbits/sec 238 ms
Clouvider NYC, NY, US (10G) 2.38 Gbits/sec 2.90 Gbits/sec 59.0 ms
Clouvider Dallas, TX, US (10G) 3.97 Gbits/sec 3.79 Gbits/sec 29.0 ms
Clouvider Los Angeles, CA, US (10G) 6.62 Gbits/sec 4.78 Gbits/sec 0.531 ms
Geekbench test failed and low memory was detected. Add at least 1GB of SWAP or use GB4 instead (higher compatibility with low memory systems).
YABS completed in 11 min 29 sec
root@usbackup:~# curl -sL yabs.sh | bash
How to fix
As we can see on my benchmark result, my ubuntu template didn't come with a swap (0.0 KiB). So to fix this error, add at least 1 GB of swap. Add swap with this method:
First, create a file that will be used as a swap:
sudo fallocate -l 2G /swapfile
Set the file permissions to 600
to prevent regular users to write and read the file:
sudo chmod 600 /swapfile
Create a Linux swap area on the file:
sudo mkswap /swapfile
Setting up swapspace version 1, size = 2 GiB (2147479552 bytes)
no label, UUID=fde7d2c8-06ea-400a-9027-fd731d8ab4c8
Activate the swap file by running the following command:
sudo swapon /swapfile
Verify that the swap is active by using either the swapon
or the free
command, as shown below:
sudo swapon --show
Output
root@us:~# sudo swapon --show
NAME TYPE SIZE USED PRIO
/swapfile file 2G 44M -2
As we can see, I added a 2GB Swap while my ram is 1GB.
However, if we reboot, the server will not retain the swap settings automatically. To make it permanent, add the swap file to our /etc/fstab
file.
Back up the /etc/fstab
file in case anything goes wrong:
sudo cp /etc/fstab /etc/fstab.bak
Add the swap file information to the end of your /etc/fstab
file by typing:
Re-run yabs script
Ran yabs script to benchmark again with:
curl -sL yabs.sh | bash
Thanks for reading!