Tag Info

Hot answers tagged


First, to create 4,000 MB of swap space: $ sudo dd if=/dev/zero of=swapspace bs=1M count=4000 4000+0 records in 4000+0 records out 4194304000 bytes (4.2 GB) copied, 5.92647 s, 708 MB/s Next turn it into a usable swap file: $ sudo mkswap /swapspace Setting up swapspace version 1, size = 4095996 KiB no label, UUID=7d1895e4-7ccf-42c6-979a-51ebddb49e91 ...


Follow these steps: sudo dd if=/dev/zero of=/mnt/{filename}.swap bs=1M count={swap_size} sudo mkswap /mnt/{filename}.swap sudo swapon /mnt/{filename}.swap sudo gedit /etc/fstab Add the following text at the end of the file, /mnt/{filename}.swap none swap sw 0 0 Note: Replace {filename} with any name you want to set to the file and replace ...


To answer your question indirectly, you don't need to manage swapfiles yourself. There is a package called swapspace which will dynamically add swap files as needed. sudo apt-get install swapspace Then you are done. Your system will grow and shrink swap space as needed.


Use the ram for something else. Processes allocating memory or disk IO trying to allocate cache will push out idle pages to swap to make room. The swappiness variable just makes the system prefer to push applications out to favor using ram for the filesystem cache instead.


You must decide which directory with enough space to create the swap file, you suppose is in /, (/swapfile). Open a terminal,Press Ctrl+Alt+T Run it for 2 Gb (bs=2048): sudo -i dd if=/dev/zero of=/swapfile bs=2048 count=256k mkswap /swapfile swapon /swapfile Now You can ensure that the swap is permanent by adding it to the fstab file. Continue running ...


I had the same problem and I found a solution that worked for me in this post. Basically: Open fstab: sudo gedit /etc/fstab Change this line: /dev/mapper/cryptswap1 none swap sw 0 0 to this: /dev/mapper/cryptswap1 none swap sw,noauto 0 0 Then go to sudo gedit /etc/rc.local and immediately before exit 0 add these two lines: sleep 5 swapon ...

Only top voted, non community-wiki answers of a minimum length are eligible