personas:brolin:swap_file
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previa | |||
personas:brolin:swap_file [2019/10/29 21:26] – brolin | personas: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 / | + | |
* 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=/ | + | |
* Format the file for swap. | * Format the file for swap. | ||
- | * sudo mkswap / | + | |
* Add the file to the system as a swap file. | * Add the file to the system as a swap file. | ||
- | * sudo swapon / | + | |
* 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. | ||
- | * / | + | |
* To change the swappiness value edit / | * To change the swappiness value edit / | ||
- | * 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 | + | |
* 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.txt · Última modificación: 2019/10/29 21:27 por brolin