Change the swap without rebooting the operating system is not easy, but very easy!

Increase:

  1. Enjoying the current volume of swap (so as to increase the self-education):
    grep SwapTotal / proc / meminfo
  2. Select prostanstvo in 1Gb where there is enough space:
    dd if = / dev / zero of = / opt / swapfile bs = 1024 count = 1048576
  3. Create a swap-space:
    mkswap / opt / swapfile
  4. Hooking up (activate) swap:
    swapon / opt / swapfile
  5. Enjoying the resulting swap volume (compare with item 1):
    grep SwapTotal / proc / meminfo

Reduce ( but if we first increased and we do not need the swap-space that we have created! ):

  1. Enjoying the current volume of swap (we also need something to compare!):
    grep SwapTotal / proc / meminfo
  2. Look where we are located swap space:
    cat / proc / swaps
  3. Disable (deactivate) swap-space:
    swapoff / opt / swapfile
  4. Removes unnecessary us the file:
    rm / opt / swapfile
  5. Enjoying the resulting swap volume (compare with item 1):
    grep SwapTotal / proc / meminfo
(Visited 21 times, 1 visits today)
adminMy SqlTips
Change the swap without rebooting the operating system is not easy, but very easy! Increase: Enjoying the current volume of swap (so as to increase the self-education): grep SwapTotal / proc / meminfo Select prostanstvo in 1Gb where there is enough space: dd if = / dev / zero of = / opt /...

Do you want to be notified about new DBA updates, releases, jobs and free tips? Join our email newsletter. It's fast and easy. You will be among the first to know about hot new DBA updates and stuff, it will help you enhance your DBA skills.
We take your privacy very seriously