-1

We are managing a dedicated server (WHM/cPanel) with 4-5(Magento & Woocommerce mostly) accounts in it, along with custom code that will connect those platforms with ERPs. This custom code works a lot with MySQL.

The server has 10GB of RAM and for the first time, past week was filled out and.

Now what makes me impression is that after restarting, server will go fully functional with only 2-3GB of RAM.

Is this reasonable? And if it's not and there is a memory leak, what would be the way to trace which of my accounts is filling up the memory?

kbariotis
  • 101
  • 4

1 Answers1

0

Chances are your memory is still there. top doesn't report memory usage minus the buffer cache the OS uses for file cache.

Type the following for true free memory

free -m

Look at the -/+ buffers/cache: line for the true free memory in megs.

Linux will use all memory for filesystem cache along with most OSes. It does that so it doesn't have to do slow disk reads each time it needs a commonly used file. The kernel will release memory used for filesystem cache when an application requests memory. If the column for free is low then you have something to worry about

Mike
  • 21,910
  • 7
  • 55
  • 79
  • after some researching i 've found http://www.linuxatemyram.com/ that explains everything. But last time the server was unable to serve requests, top said that memory was full and after restart everything went back find. Wouldn't this had anything to do with it? – kbariotis Oct 21 '14 at 14:52
  • you can't trust top.. next time look at `free -m`. You can use top and sort by memory if you type `M` while top is loaded. Then look at the RSS column to see what is using memory – Mike Oct 21 '14 at 16:11