top of page

Debian - ZRAM - SWAP na memória RAM

  • Jorge Sousa
  • 4 de ago. de 2023
  • 1 min de leitura

Atualizado: 15 de ago. de 2023

Melhore a performance do seu Note ou Desktop e elimine os travamentos.

Instale o pacote zram-tools.

$sudo apt-get install zram-tools

Após instalação do arquivo edite o arquivo zramswap em /etc/default/zramswap.

$sudo nano /etc/default/zramswap

Altere os parâmetros e remova (#) nas linhas para sua configuração e salve.

Vejam minhas configurações abaixo em vermelho:

Arquivo zramswap

# Compression algorithm selection

# speed: lz4 > zstd > lzo

# compression: zstd > lzo > lz4

# This is not inclusive of all that is available in latest kernels

# See /sys/block/zram0/comp_algorithm (when zram module is loaded) to see

# what is currently set and available for your kernel[1]

# [1] https://github.com/torvalds/linux/blob/master/Documentation/blockdev/zram.txt#L86

ALGO=zstd

# Specifies the amount of RAM that should be used for zram

# based on a percentage the total amount of available memory

# This takes precedence and overrides SIZE below

PERCENT=60

# Specifies a static amount of RAM that should be used for

# the ZRAM devices, this is in MiB

#SIZE=256

# Specifies the priority for the swap devices, see swapon(2)

# for more details. Higher number = higher priority

# This should probably be higher than hdd/ssd swaps.

PRIORITY=100


Ative sua nova configuração com o comando abaixo:

$ sudo service zramswap reload

Check sua nova configuração com:

$lsblk


Seja feliz!


Posts recentes

Ver tudo

Comments


bottom of page