---
title: "Ubuntu 18 : Pourquoi autant de SWAP ?"
url: https://www.cyber-neurones.org/2020/03/ubuntu-18-pourquoi-autant-de-swap/
date: 2020-03-11
modified: 2020-04-01
author: "Frederic"
description: "Je ne comprends pas pourquoi j'ai autant de SWAP avec ma configuration de swappiness : $ swapon -s Filename Type Size Used Priority /dev/sda3 partition 8388604 924672 -2 $ cat..."
categories:
  - "Ubuntu"
tags:
  - "Ubuntu"
word_count: 154
---

# Ubuntu 18 : Pourquoi autant de SWAP ?

Je ne comprends pas pourquoi j'ai autant de SWAP avec ma configuration de swappiness :
**$ swapon -s**
Filename Type Size Used Priority
/dev/sda3 partition 8388604 924672 -2
**$ cat /proc/sys/vm/swappiness**
1
**$ cat /proc/sys/vm/vfs_cache_pressure**
100
**$ getconf PAGESIZE**
4096
**$ cat /etc/os-release | grep "PRETTY_NAME"**
PRETTY_NAME="Ubuntu 18.04.3 LTS"
**$ free -m**
total used free shared buff/cache available
Mem: 64081 4045 8756 506 51279 58818
Swap: 8191 903 7288

Quand je regarde la documentation, vu que j'ai 64 Go de RAM je ne devrais pas avoir de SWAP :

-
> swappiness can have a value between 0 and 100.

-
> swappiness=0:
>
> Kernel version 3.5 and newer: disables swapiness.
> - Kernel version older than 3.5: avoids swapping processes out of physical memory for as long as possible.

-
> swappiness=1:
>
> Kernel version 3.5 and over: minimum swappiness without disabling it entirely.

-
> swappiness=100:

> Tells the kernel to aggressively swap processes out of physical memory and move them to swap cache.
 

[![](https://www.cyber-neurones.org/wp-content/uploads/2020/03/screenshot-from-2020-03-11-20-21-07-1024x650.png)](https://www.cyber-neurones.org/wp-content/uploads/2020/03/screenshot-from-2020-03-11-20-21-07.png)