You Asked: How Do I Set Swap Priority in Linux?
Contents

You can set the priority of swap in Linux by swapon . You can set 2 swap partions to have the same priority, pages are allocated on a round-robin basis between them. value chosen by the caller. Higher numbers mean higher priority.

How do I set swap priority?

3 Answers

  1. Power on the PC and log on to the desktop.
  2. Open a terminal and achieve root privilege. ( …
  3. Run fdisk -l to list disk partition table. …
  4. Run blkid /dev/sda7 to get the block id of the partition. …
  5. Run swapoff -a to off the swap partition.
  6. Run vim /etc/fstab . …
  7. Save and exit.
  8. Run swapon -a to enable swap partition.

What is swap priority in Linux?

Swap pages are allocated from areas in priority order, highest priority first. For areas with different priorities, a higher-priority area is exhausted before using a lower-priority area.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest