Score:0

My Ubuntu 20.04 server is using A LOT of memory

in flag

I run a web-app on this server, and I run node.js programs with Elasticsearch. My server has 16GB of memory, but it constantly uses over 15GB at all times. I know that I can limit my Elasticsearch memory use from 4GB to something lower, but I really don't think my server should be using this much memory.

I have screenshots of memory usage. I am hoping I am doing something wrong and that it won't require me to hardware upgrade the server.

screenshot of memory usage

Michael Hampton avatar
cz flag
This looks fine. Are you concerned about something in particular?
m1i2t3 avatar
in flag
I'm worried because i don't think my program uses this much memory. When I test on my personal machine, which only has 8gb ram, it runs well even with many other applications running.
Michael Hampton avatar
cz flag
Your program doesn't use much memory. It's elasticsearch that is using 8.7GB of memory according to your screenshot. But you still have plenty of RAM, nearly 4GB, available.
m1i2t3 avatar
in flag
Oh I got it. I was reading that chart incorrectly. I thought "free" meant available ram, but I now see that "available" with about 4gb is the number I was looking for. Thank you. I should probably limit elasticsearch to 4gb.
Michael Hampton avatar
cz flag
See also https://www.linuxatemyram.com/
Henrik Carlqvist avatar
cn flag
Memory not in use is memory to no use. The Linux kernel will use part of your RAM to cache disk to speed up disk access. If some application needs that RAM the Linux kernel will give that application the RAM and use less for buffer/cache. Even if you have enough RAM for your applications you might want to add some swap were Linux can place virtual memory used by rarely used or unused processes. Swapping out some memory might give better performance as more RAM can be used for disk cache/buffer.
m1i2t3 avatar
in flag
I will definitely look further into memory swapping.
mangohost

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.