Mailinglist Archive: opensuse (794 mails)

< Previous Next >
Re: [opensuse] Get an SSD just for swap?
Alternative suggestion. (Sorry if already mentioned).

Get an SSD for your root partition. Use the full disk as root and set a swap file instead of a swap partition. This is the default behavior in a lot of distros now if a root partition is not specified. The default swap file size is normally 2.1GB.

This way you can change your swap size easily when more disk space is needed. I believe swap files can also be dynamically allocated but I have never tried it.

on my PC I have a 128GB Samsung evo SSD for /
and a 1TB WD black Hard Disk for /home
My system has 16GB RAM and I have a 16.1GB Swap file in /

Take note of the sudo commands. Obviously make sure you omit sudo if you are running the commands in a root terminal.

Check your swap configuration:
cat /proc/swaps

Turn off all swap:
sudo swapoff -a

or just the one file:
sudo swapoff /swapfile

Make swap file bigger (or smaller, just change the count= to MB e.g. 1024 for 1GB) In this case roughly 16.1GB
sudo dd if=/dev/zero of=/swapfile bs=1M count=16486

Make the swap file useable:
sudo mkswap /swapfile

Turn on swap file:
sudo swapon /swapfile

Check your swap configuration again to make sure it has worked:
cat /proc/swaps

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >