# Swap file priority "-1"

**URL:** <https://meta.discourse.org/t/swap-file-priority-1/39006>\
**Category:** Self-hosting\
**Tags:** server-resources\
**Created:** [February 4, 2016, 4:29am UTC](https://meta.discourse.org/t/swap-file-priority-1/39006 "2016-02-04T04:29:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhosein](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jhosein/32/50963_2.png) [@jhosein](https://meta.discourse.org/u/jhosein)\
**Post date:** [February 4, 2016, 4:29am UTC](https://meta.discourse.org/t/swap-file-priority-1/39006/1 "2016-02-04T04:29:09Z")

</div>

Installing my first instance of Discourse. (woo!)

Just finished creating my swapfile and I noticed that the priority is “-1”. Is that normal?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [February 4, 2016, 7:05am UTC](https://meta.discourse.org/t/swap-file-priority-1/39006/2 "2016-02-04T07:05:27Z")

</div>

Not from our instructions! Our instructions say:

`echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab sysctl -w vm.swappiness=10`

note `swappiness = 10` there

> **[Memory paging](https://en.wikipedia.org/wiki/Swappiness)**
>
> In computer operating systems, memory paging is a memory management scheme that allows the physical memory used by a program to be non-contiguous. This also helps avoid the problem of memory fragmentation and requiring compaction to reduce fragmentation. 
> Paging is often combined with the related technique of allocating and freeing page frames and storing pages on and retrieving them from secondary storage\[a\] in order to allow the aggregate size of the address spaces to exceed the physical mem...

The default value is apparently `60`, and I can confirm that’s true in Ubuntu 14, but it does also say

> With kernel version 3.5 and over, as well as kernel version 2.6.32-303 and over, it is likely better to use 1 for cases where 0 used to be optimal.
