Pages

Wednesday, January 16, 2013

Flush Memory


Flush Memory

[root@vx111a ~]# free -m

                         total   used   free   shared buffers cached
Mem:                  3031   1811  1220   0        201      1266
-/+ buffers/cache:          343    2688
Swap:                 4996       0   4996

[root@vx111a ~]# sync; echo 3>/proc/sys/vm/drop_caches

[root@vx111a ~]# free -m

                           total   used   free  shared buffers cached
Mem:                    3031   1821  1210  0            201 1266
-/+ buffers/cache:             353  2678
Swap:                   4996        0  4996


sync
Forces an immediate write of all updated data from buffers to hard drive (synchronize drive with buffers). While not strictly necessary, a sync assures the Sys admin or user that the data just changed will survive a sudden power failure.