Amazon-ec2 ubuntu ram(memory) issue

in flag

My ec2 ubuntu server shows memory was full when I use the command htop and only 1GB is free.


When I try the command free cache memory was occupied 29 GB also available memory shows the same size of cache memory.

ubuntu@ip:~$ free
Mem: total        used     free      shared  buff/cache   available
     32231844    1078136   1022672     23744    30131036   30666420
Swap:             0           0         0

And there is available memory I don't know what it is. If install a new application, it will automatically allocate memory from the cache otherwise I need to change my instance, or better I can drop page_cache using the below command

echo 1 > /proc/sys/vm/drop_caches

Some engineers mentioned this is not the right way to remove cache in servers. Experts pls shoot your answers.


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.