Muchas veces nos encontramos que nuestro servidor/maquina linux tiene casi toda la memoria RAM ocupada aunque el top no nos muestre ningún proceso consumiendo un exceso de RAM. Para mirar el consumo de RAM propongo 2 formas:
# top
y una vez abierto shift+m (ordenar por consumo de memoria)
# free -m
la m corresponde a megas, si queremos que nos lo muestre en gigabytes usaremos g, bytes b y kilobytes k.
Para ello hay una forma (no destructiva) de liberar esta RAM reservada a procesos que ya no están activos.
echo 1 > /proc/sys/vm/drop_caches
Para los que tengáis ganas de leer:
Invalidating the Linux Buffer Cache
When you write data, it doesn’t necessarily get written to disk right then. The kernel maintains caches of many things, and disk data is something where a lot of work is done to keep everything fast and efficient.
That’s great for performance, but sometimes you want to know that data really has gotten to the disk drive. This could be because you want to test the performance of the drive, but could also be when you suspect a drive is malfunctioning: if you just write and read back, you’ll be reading from cache, not from actual disk platters.
So how can you be sure you are reading data from the disk? The answer actually gets a little complicated, particularly if you are testing for integrity, so bear with me.
Obviously the first thing you need to do is get the data in …