Outils du site

Je suis pas supersticieux. Ca porte malheur. [Coluche]

04-linux:10-administration:95-ssd

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
04-linux:10-administration:95-ssd [2018/04/16 00:17] – [Modifier fstab] Roge04-linux:10-administration:95-ssd [2020/02/15 05:57] (Version actuelle) – [Over-provisioning] Roge
Ligne 1: Ligne 1:
 ====== SDD ====== ====== SDD ======
  
-[[https://sites.google.com/site/easylinuxtipsproject/ssd#TOC-Limit-swap-wear|Source]]+<note important> 
 + 
 +Référence: https://easylinuxtipsproject.blogspot.com/p/ssd.html 
 + 
 + 
 +</note> 
  
 ===== UEFI ===== ===== UEFI =====
Ligne 12: Ligne 18:
    
 Max: 10 Go Max: 10 Go
 +
 +--> Plus d'actualité.
  
 ===== Formatage ===== ===== Formatage =====
Ligne 35: Ligne 43:
  
  
-===== install Firmware =====+===== install Firmware ??? =====
  
 https://unix.stackexchange.com/questions/333853/update-firmware-of-samsung-840-pro/ https://unix.stackexchange.com/questions/333853/update-firmware-of-samsung-840-pro/
- 
- 
  
  
Ligne 46: Ligne 52:
 Le TRIM est nécessaire pour que le SSD conserve de bonne performances sur le long terme. Le TRIM est nécessaire pour que le SSD conserve de bonne performances sur le long terme.
  
-''gksudo leafpad /etc/rc.local'' +Voir https://easylinuxtipsproject.blogspot.com/p/ssd.html
- +
-Avant la ligne contenant le ''exit 0'' il faut ajouter autant ''fstrim'' qu'il y a de partitions EXT4 partition. (ne concerne pas la partition de swap). +
- +
- +
-Exemple avec une seule partition root : rc.local +
- +
-<code bash> +
-#!/bin/sh -e +
-+
-# rc.local +
-+
-# This script is executed at the end of each multiuser runlevel. +
-# Make sure that the script will "exit 0" on success or any other +
-# value on error. +
-+
-# In order to enable or disable this script just change the execution +
-# bits. +
-+
-# By default this script does nothing. +
-fstrim / +
-exit 0 +
-</code> +
- +
- +
-Il est toujours possible d'exécuter le TRIM manuellement (prend du temps : à faire lorsqu'il n'y a pas d'activité sur le SSD) : +
- +
-''sudo fstrim -v /'' +
- +
- +
- +
-===== Disable the superfluous weekly cron job for TRIM ===== +
- +
- +
-In Ubuntu 14.04 and Linux Mint 17.2, disable the now superfluous weekly cron job for TRIM: +
- +
- +
-''sudo mv -v /etc/cron.weekly/fstrim /fstrim'' +
- +
- +
-With that command you've transferred the script file fstrim to the root directory, thus disabling it. +
- +
- +
- +
-===== Only for computers that are always on: daily by cron ===== +
- +
-For computers that are always on (24 hours a day, seven days a week), a TRIM action that's being executed when booting, is of course not useful. +
- +
-You can schedule a daily trimming as follows: +
- +
-''gksudo leafpad /etc/cron.daily/trim'' +
- +
- +
-Copier le code suivant dans un fichier: +
-<code bash> +
-#!/bin/sh +
-# call fstrim-all to trim all mounted file systems which support it +
-set -e +
-+
-# This only runs on Intel and Samsung SSDs by default, as some SSDs with +
-# faulty firmware may encounter data loss when running fstrim under high I/O +
-# load (e. g.  https://launchpad.net/bugs/1259829)You can append the +
-# --no-model-check option here to disable the vendor check and run fstrim on +
-# all SSD drives Like this (remove the hash): +
-#exec fstrim-all --no-model-check +
-exec fstrim-all +
-</code> +
- +
-Enregistrer. +
- +
-Rendre le fichier exécutable: +
- +
-''sudo chmod +x /etc/cron.daily/trim'' +
- +
- +
-===== Limiter le swap ===== +
- +
- +
-10. With the action described below, you limit the use of the swap partition (the virtual memory on the SSD). Without disabling it entirely, because that would go too far: in case of extreme RAM load, Ubuntu has to be able to "swap"+
- +
-Ubuntu's inclination to use the swap, is determined by a setting. The lower the setting number, the more system load is required before Ubuntu starts using the swap. +
- +
-On a scale of 0-100, the default setting is 60. Which is much too high for normal desktop use, and only fit for servers. For SSD's, it's just crazy. +
- +
-A detailed explanation can be found here (link dead? Then download this pdf file with the same content). +
- +
-Now the how-to: +
- +
-a. First make sure that you have installed the applications gksu and leafpad. +
- +
-b. Now check your current swappiness setting. Type in the terminal (use copy/paste): +
- +
-''cat /proc/sys/vm/swappiness'' +
- +
-Press Enter. +
- +
-The result will probably be 60. +
- +
-c. Now type in the terminal (use copy/paste): +
- +
-''gksudo leafpad /etc/sysctl.conf'' +
- +
-Press Enter. +
- +
-d. Add the following blue lines, at the very end of the existing text in that file  +
-(use copy/paste to avoid errors): +
-<code bash> +
-# Sharply reduce swap inclination +
-vm.swappiness=1 +
-</code> +
- +
-e. Save the file and close it. +
- +
-f. Now proceed to the next item. +
- +
-Almost ready after reboot +
- +
-11. Reboot your computer.  +
- +
- +
-Rebooter : +
-''sudo shutdown -r now''+
  
  
Dernière modification : 2018/04/16 00:17