Vider le cache disque sous Linux

  • Posted on: 13 May 2015
  • By: mathias

Pour vider le cache disque de la mémoire sous Linux, une simple commande (en root) suffit :

sync; echo 3 > /proc/sys/vm/drop_caches

Exemple. Avant, on avait 249 Mo de libre :

free -m
             total       utilisé      libre     partagé tamp/cache   disponible
Mem:          15973        3645         249        2597       12078        9410
Partition d'échange:        7999           0        7999

Après passage de la commande, on a mainetnant 9 Go de libre :

free -m
              total       utilisé      libre     partagé tamp/cache   disponible
Mem:          15973        3692        9284        2578        2996        9421
Partition d'échange:        7999           0        7999

Comments

Thank you for the tip. ;-)

Add new comment

Plain text

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.