Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. ################################################################################
  2. # Defaults are optimized for general usage
  3. ################################################################################
  4.  
  5. ################################################################################
  6. # You can override any settings by files in:
  7. # /etc/systemd/swap.conf.d/*.conf
  8. ################################################################################
  9.  
  10. ################################################################################
  11. # Zswap
  12. #
  13. # Kernel >= 3.11
  14. # Zswap create compress cache between swap and memory for reduce IO
  15. # https://www.kernel.org/doc/Documentation/vm/zswap.txt
  16.  
  17. zswap_enabled=1
  18. zswap_compressor=lz4 # lzo lz4
  19. zswap_max_pool_percent=25 # 1-99
  20. zswap_zpool=zbud # zbud z3fold
  21.  
  22. ################################################################################
  23. # ZRam
  24. #
  25. # Kernel >= 3.15
  26. # Zram compression streams count for additional information see:
  27. # https://www.kernel.org/doc/Documentation/blockdev/zram.txt
  28.  
  29. zram_enabled=0
  30. zram_size=$(($RAM_SIZE/4)) # This is 1/4 of ram size by default.
  31. zram_streams=$NCPU
  32. zram_alg=lz4 # lzo lz4 deflate lz4hc 842 - for Linux 4.8.4
  33. zram_prio=32767 # 1 - 32767
  34.  
  35. ################################################################################
  36. # Swap File Chunked
  37. # Allocate swap files dynamically
  38. # For btrfs fallback to swapfile + loop will be used
  39. # ex. Min swap size 512M, Max 8*512M
  40. swapfc_enabled=0
  41. swapfc_force_use_loop=0 # Force usage of swapfile + loop
  42. swapfc_frequency=1s # How often check free swap space
  43. swapfc_chunk_size=512M # Allocate size of swap chunk
  44. swapfc_max_count=8 # 0 - unlimited, note: 32 is a kernel maximum
  45. swapfc_free_swap_perc=15 # Add new chunk if free < 15%
  46. # Remove chunk if free > 15+40% & chunk count > 2
  47. swapfc_path=/var/lib/systemd-swap/swapfc/
  48. # Only for swapfile + loop
  49. swapfc_nocow=1 # Disable CoW on swapfile
  50. swapfc_directio=1 # Use directio for loop dev
  51. swapfc_force_preallocated=0 # Will preallocate created files
  52.  
  53. ################################################################################
  54. # Swap devices
  55. # Find and auto swapon all available swap devices
  56. swapd_auto_swapon=1
  57. swapd_prio=1024
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement