Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Sébastien Luttringer
infrastructure
Commits
d33d6b7e
Verified
Commit
d33d6b7e
authored
May 18, 2017
by
Jan Alexander Steffens (heftig)
Browse files
roles/archbuild: Merge distro swap.conf
parent
b176e57c
Changes
1
Hide whitespace changes
Inline
Side-by-side
roles/archbuild/files/swap.conf
View file @
d33d6b7e
...
...
@@ -10,9 +10,9 @@
# https://www.kernel.org/doc/Documentation/vm/zswap.txt
zswap_enabled
=
1
zswap_compressor
=
lz4
zswap_max_pool_percent
=
25
zswap_zpool
=
z3fold
zswap_compressor
=
lz4
# lzo lz4
zswap_max_pool_percent
=
25
# 1-99
zswap_zpool
=
z3fold
# zbud z3fold
################################################################################
# ZRam
...
...
@@ -22,10 +22,10 @@ zswap_zpool=z3fold
# https://www.kernel.org/doc/Documentation/blockdev/zram.txt
zram_enabled
=
0
zram_size
=$(($
ram_size
/
4
))
K
# This is 1/4 of ram size by default.
zram_size
=$(($
ram_size
/
4
))
K
# This is 1/4 of ram size by default.
zram_streams
=$
cpu_count
zram_alg
=
lz4
# lzo lz4 deflate lz4hc 842 - for Linux 4.8.4
zram_prio
=
32767
zram_alg
=
lz4
# lzo lz4 deflate lz4hc 842 - for Linux 4.8.4
zram_prio
=
32767
# 1 - 32767
################################################################################
# Swap File Universal
...
...
@@ -44,27 +44,28 @@ swapfu_directio=0
# files with size 2G (mounted by loop), fs: btrfs
# fio: test 4k, randrw, iodepth 64, libaio, directio 1
# HDD 1TB 5400k
# loop directio 0 Behaviour IO/s
# prealloc=0 + nocow=0 - NOT stable speed ~ 2400
# prealloc=1 + nocow=0 - stable speed, HORRIBLY SLOW ~ 160
# prealloc=0 + nocow=1 - stable speed, can degraded by time ~ 3300
# prealloc=1 + nocow=1 - stable speed ~ 2000
# loop directio 1
# prealloc=0 + nocow=0 - not stable speed ~ 50
# prealloc=1 + nocow=0 - not stable speed ~ 69
# prealloc=0 + nocow=1 - not stable speed ~ 63
# prealloc=1 + nocow=1 - not stable speed ~ 75
# raw file (loop device are slow)
# prealloc=0 + nocow=0 - not stable speed ~ 7600
# prealloc=1 + nocow=0 - not stable speed ~ 69
# prealloc=0 + nocow=1 - not stable speed ~ 13000
# prealloc=1 + nocow=1 - not stable speed ~ 174
# Loop device:
# PREALLOC | NoCoW | DirectIO | ~ IO/s | Comment
# - | - | - | 2400 | NOT stable speed
# + | - | - | 160 | stable speed, HORRIBLY SLOW
# - | + | - | 3300 | stable speed, can degraded by time
# + | + | - | 2000 | stable speed
# - | - | + | 50 | not stable speed
# + | - | + | 69 | not stable speed
# - | + | + | 63 | not stable speed
# + | + | + | 75 | not stable speed
# raw file (loop device are slow):
# PREALLOC | NoCoW | DirectIO | ~ IO/s | Comment
# - | - | + | 7600 | not stable speed
# + | - | + | 69 | not stable speed
# - | + | + | 13000 | not stable speed
# + | + | + | 174 | not stable speed
# File will not be available in fs after script start
# Make sure what script can access to this path during the boot process.
# Full path to swapfile
swapfu_path
=/
var
/
swap
swapfu_prio
=
-
1024
swapfu_path
=/
var
/
lib
/
systemd
-
swap
/
swapfu
swapfu_prio
=
1
# 1 - 32767
################################################################################
# Swap File Chunked
...
...
@@ -73,10 +74,10 @@ swapfu_prio=-1024
swapfc_enabled
=
0
swapfc_frequency
=
1
s
# How often check free swap space
swapfc_chunk_size
=
256
M
# Allocate size of swap chunk
swapfc_max_count
=
16
# 0 - unlimited
swapfc_max_count
=
16
# 0 - unlimited
, note: 32 is a kernel maximum
swapfc_free_swap_perc
=
15
# Add new chunk if free < 15%
# Remove chunk if free > 15+40% & chunk count > 2
swapfc_path
=/
var
/
.
swapfc
/
swapfc_path
=/
var
/
lib
/
systemd
-
swap
/
swapfc
/
################################################################################
# Swap devices
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment