Vojtěch
Vojtěch

Reputation: 12436

Memory usage on Debian Linux

I am trying to figure out what is wrong with my Debian server - I am getting warnings of having not enough free memory - top (as you can see below) is saying that 1.8G is consumed, but I am unable to find which application is responsible for it. There is only Tomcat running, which consumes, according to top, ~25 % and so 530m. But There is more than 1 GB left, which I am unable to find!

Tasks: 54 total, 1 running, 53 sleeping, 0 stopped, 0 zombie
Cpu(s):100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2150400k total, 1877728k used, 272672k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 3271 root 18 0 1559m 530m 12m S 0 25.2 1:44.31 java
 1568 mysql 15 0 270m 71m 7332 S 0 3.4 0:50.79 mysqld 

(Full top output here)

Upvotes: 2

Views: 19100

Answers (2)

user193243
user193243

Reputation: 1

As i see, your 'Free' command returned NO swap space

Swap: 0k total, 0k used, 0k free, 0k cached

  1. either there is no swap partition available
  2. this swap space is not mounted
  3. one can manual make a swapfile
    • and mount this file as becoming the active swap

To test your real usage reboot the machine and test the used amount retest after 1 hour some processes are memory hoggs like apache or ntop

refer:

Upvotes: 0

Harald Brinkhof
Harald Brinkhof

Reputation: 4455

Linux systems always try to use as much ram as available for various functions like caching of executables our even just page reads from disk. That's what you bought your fast RAM for after all.

You can find out more about your system by doing a

cat /proc/meminfo

More info in this helpful blog post If you find out a lot is used in cache then you don't have to worry about the system.if individual processes warn you about memory issues then you'll have to check their settings for any memory limiting settings. Many server processes have those, like php or java based processes.

Questions of this nature are also probably more at home at https://serverfault.com/

Upvotes: 4

Related Questions