NOTE: USER LEVEL - ADVANCE
How to create a Swapfile
Why the need for a swapfile?
A swapfile provides a temporary storage area commonly called a cache. This can be seen as a form of extended memory where the system can process 'live' data. This feature can be useful for low memory boxes such as, the Vu+ Solo or Duo.
So if one has lots of processes or plugins installed the system may be overloaded at times & having a swapfile can help.
Direct Image Creation
Creating a swapfile on some images is just a simple case of finding the option to dos so via the menu system. For example on ViX it can be found via:
Menu - Setup - ViX - Swap Manager
Blue (Create) - Green (Activate) - Yellow (Autostart - recommended).
A full restart of the receiver is required for the Swapfile to become active.
Manual Creation on HDD - via telnet session (cmd prompt, terminal, putty, DCC or VUCC)
Open a session & login
Type the following commands in the order they are shown & press enter after each one:
Code:
dd if=/dev/zero of=/media/hdd/swapfile bs=1024 count=131072
Set the swap area
Code:
mkswap /media/hdd/swapfile
Activate the swapfile
Code:
swapon /media/hdd/swapfile
To have the swapfile load automatically after the box is restarted the fstab file needs to contain an instruction to do so:
Code:
vi /etc/fstab
Add the following to the end of the file:
Code:
/media/hdd/swapfile swap swap defaults 0 0
To verify swapfile is set:
Code:
free
You should see information similar to:
Code:
total used free shared buffers
Mem: 1240068 154124 839340 632 246604 1010102
Swap: 131068 0 131068
NOTE: if you want to create the swap on a USB stick then substitute usb for hdd in all the commands above.
All images have software to create a swap file.
Download and install 'System Tools' from the feeds. Then use Swap Manager. There is a limitation with this approach however, in that you cannot create anything bigger than 256MB nor does one learn anything.
So best option is to use the commands above.
Stay Connected
M. Qaiser
creating a Swapfile - for advance users only
- Muhammad Qaiser
- Administrators
- Posts: 2142
- Joined: 29 Dec 2018, 12:56 pm
- Location: golden-forum.com
- Has thanked: 893 times
- Been thanked: 2363 times
creating a Swapfile - for advance users only
VU + Solo 4K
Tiger T 800+ Full HD
Online - when I'm there
Offline - when I'm not there
Tiger T 800+ Full HD
Online - when I'm there
Offline - when I'm not there
Who is online
Users browsing this forum: Amazon [Bot], Bing, Claude, Google Adsense and 3 guests