Recent Changes - Search:

Home

RunningExperiments

AnalysingData

MEG Group

Administrative info

Computers and network

Meetings

How to improve this site

HowToAddSwapMemory

How to add swap memory to a workstation

Warning: adding swap memory is only useful
a) if you want to resolve an "out of memory" problem
b) if NO ONE is running programs on the computer (you can check this with command top)

In order to add swap memory on a workstation, follow these steps (commands on a Linux terminal):

1) Create a swap file (command dd) of the size you want the swap to be:

 dd if=/dev/zero of=/tmp/swap bs=1024k count=10000

Tips:
if = input file
of = output file
bs = output block size
The total memory size is computed as bs x count, i.e. in the example above the total memory is 10 GB = 1024KB(1MB) x 10000

2) Then add the swap (you will need the root password after su - command):

 su -
mkswap /tmp/swap
swapon /tmp/swap

3) Finally you can check that the swap memory has been increased with command top.

Important: the additional swap memory will disappear when restarting the computer.

Edit - History - Print - Recent Changes - Search
Page last modified on April 08, 2010, at 05:24 PM