# First check after connecting to the server <figure> <Image src={cover} alt="Terminal output showing swap usage in Docker logs on a small VPS screen." />
</figure> free -h
# First check after connecting to the server <figure> <Image src={cover} alt="Terminal output showing swap usage in Docker logs on a small VPS screen." />
</figure> free -h
# First check after connecting to the server <figure> <Image src={cover} alt="Terminal output showing swap usage in Docker logs on a small VPS screen." />
</figure> free -h
total used free shared buff/cache available
Mem: 7.5Gi 6.8Gi 150Mi 1.2Gi 500Mi 30Mi
Swap: 2.0Gi 1.9Gi 100Mi
total used free shared buff/cache available
Mem: 7.5Gi 6.8Gi 150Mi 1.2Gi 500Mi 30Mi
Swap: 2.0Gi 1.9Gi 100Mi
total used free shared buff/cache available
Mem: 7.5Gi 6.8Gi 150Mi 1.2Gi 500Mi 30Mi
Swap: 2.0Gi 1.9Gi 100Mi
-weight: 600;">sudo dmesg -T | grep -i "out of memory"
-weight: 600;">sudo dmesg -T | grep -i "out of memory"
-weight: 600;">sudo dmesg -T | grep -i "out of memory"
[Tue May 12 03:14:28 2026] Out of memory: Kill process 12345 (postgres) score 987,
[Tue May 12 03:14:29 2026] Out of memory: Kill process 67890 (redis-server) score 876,
[Tue May 12 03:14:28 2026] Out of memory: Kill process 12345 (postgres) score 987,
[Tue May 12 03:14:29 2026] Out of memory: Kill process 67890 (redis-server) score 876,
[Tue May 12 03:14:28 2026] Out of memory: Kill process 12345 (postgres) score 987,
[Tue May 12 03:14:29 2026] Out of memory: Kill process 67890 (redis-server) score 876,
total used free shared buff/cache available
Mem: 7.5Gi 4.2Gi 2.0Gi 1.0Gi 1.3Gi 2.5Gi
Swap: 2.0Gi 100Mi 1.9Gi
total used free shared buff/cache available
Mem: 7.5Gi 4.2Gi 2.0Gi 1.0Gi 1.3Gi 2.5Gi
Swap: 2.0Gi 100Mi 1.9Gi
total used free shared buff/cache available
Mem: 7.5Gi 4.2Gi 2.0Gi 1.0Gi 1.3Gi 2.5Gi
Swap: 2.0Gi 100Mi 1.9Gi
-weight: 500;">docker run -d --memory="512m" --memory-swap="1g" your_image_name
-weight: 500;">docker run -d --memory="512m" --memory-swap="1g" your_image_name
-weight: 500;">docker run -d --memory="512m" --memory-swap="1g" your_image_name
# Temporarily change swappiness value
-weight: 600;">sudo sysctl vm.swappiness=10 # To make it permanent, add to /etc/sysctl.conf
# vm.swappiness=10
# Temporarily change swappiness value
-weight: 600;">sudo sysctl vm.swappiness=10 # To make it permanent, add to /etc/sysctl.conf
# vm.swappiness=10
# Temporarily change swappiness value
-weight: 600;">sudo sysctl vm.swappiness=10 # To make it permanent, add to /etc/sysctl.conf
# vm.swappiness=10
# Example measurement of average response time for a web -weight: 500;">service
# (These commands are illustrative; actual measurement tools should be used)
# Previous State: 250ms
# Subsequent State: 140ms
# Example measurement of average response time for a web -weight: 500;">service
# (These commands are illustrative; actual measurement tools should be used)
# Previous State: 250ms
# Subsequent State: 140ms
# Example measurement of average response time for a web -weight: 500;">service
# (These commands are illustrative; actual measurement tools should be used)
# Previous State: 250ms
# Subsequent State: 140ms