Herramientas de usuario

Herramientas del sitio


personas:brolin:swap_file

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
personas:brolin:swap_file [2019/10/29 21:26] brolinpersonas:brolin:swap_file [2019/10/29 21:27] (actual) – se ha restaurado la vieja versión (2015/11/20 18:32) brolin
Línea 16: Línea 16:
   * Create the file to be used for swap.   * Create the file to be used for swap.
  
-  * sudo fallocate -l 1G /mnt/1GB.swap+    sudo fallocate -l 1G /mnt/1GB.swap
  
   * If fallocate fails or is not installed, run the following command.   * If fallocate fails or is not installed, run the following command.
  
-  * sudo dd if=/dev/zero of=/mnt/1GB.swap bs=1024 count=1048576+    sudo dd if=/dev/zero of=/mnt/1GB.swap bs=1024 count=1048576
  
   * Format the file for swap.   * Format the file for swap.
  
-  * sudo mkswap /mnt/1GB.swap+    sudo mkswap /mnt/1GB.swap
  
   * Add the file to the system as a swap file.   * Add the file to the system as a swap file.
  
-  * sudo swapon /mnt/1GB.swap+    sudo swapon /mnt/1GB.swap
  
   * Add this line to the end of /etc/fstab to make the change permanent.   * Add this line to the end of /etc/fstab to make the change permanent.
  
-  * /mnt/1GB.swap  none  swap  sw 0  0+    /mnt/1GB.swap  none  swap  sw 0  0
  
   * To change the swappiness value edit /etc/sysctl.conf and add the following line.   * To change the swappiness value edit /etc/sysctl.conf and add the following line.
  
-  * vm.swappiness=10+    vm.swappiness=10
  
     Start with a value of 10 and increase if needed. A typical default value for swappiness is 60. The higher the number (up to 100), the more often swap is utilized.     Start with a value of 10 and increase if needed. A typical default value for swappiness is 60. The higher the number (up to 100), the more often swap is utilized.
Línea 44: Línea 44:
   * Check that the swap file was created.   * Check that the swap file was created.
  
-  * sudo swapon -s+    sudo swapon -s
  
   * Reboot the server to ensure that the changes go into effect.   * Reboot the server to ensure that the changes go into effect.
personas/brolin/swap_file.1572384398.txt.gz · Última modificación: 2019/10/29 21:26 por brolin