Memory used but i can't see process that used it (Debian)
Asked Answered
C

4

12

Here is my problem:

top - 11:32:47 up 22:20,  2 users,  load average: 0.03, 0.72, 1.27
Tasks: 112 total,   1 running, 110 sleeping,   1 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8193844k total,  7508292k used,   685552k free,    80636k buffers
Swap:  2102456k total,    15472k used,  2086984k free,  7070220k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                                                                                           
28555 root      20   0 57424  38m 1492 S    0  0.5   0:06.38 bash                                                                                                                                                                                                              
28900 root      20   0 39488 7732 3176 T    0  0.1   0:03.12 python                                                                                                                                                                                                            
28553 root      20   0 72132 5052 2600 S    0  0.1   0:00.22 sshd                                                                                                                                                                                                              
28859 root      20   0 70588 3424 2584 S    0  0.0   0:00.06 sshd                                                                                                                                                                                                              
29404 root      20   0 70448 3320 2600 S    0  0.0   0:00.06 sshd                                                                                                                                                                                                              
28863 root      20   0 42624 2188 1472 S    0  0.0   0:00.02 sftp-server                                                                                                                                                                                                       
29406 root      20   0 19176 1984 1424 S    0  0.0   0:00.00 bash                                                                                                                                                                                                              
 2854 root      20   0  115m 1760  488 S    0  0.0   5:37.02 rsyslogd                                                                                                                                                                                                          
29410 root      20   0 19064 1400 1016 R    0  0.0   0:05.14 top                                                                                                                                                                                                               
 3111 ntp       20   0 22484  604  460 S    0  0.0  10:26.79 ntpd                                                                                                                                                                                                              
 3134 proftpd   20   0 64344  452  280 S    0  0.0   6:29.16 proftpd                                                                                                                                                                                                           
 2892 root      20   0 49168  356  232 S    0  0.0   0:31.58 sshd                                                                                                                                                                                                              
    1 root      20   0 27388  284  132 S    0  0.0   0:01.38 init                                                                                                                                                                                                              
 3121 root      20   0  4308  248  172 S    0  0.0   0:16.48 mdadm  

As you can see 7.5 GB of memory is used, but there is no process that use it. How it can be, and how to fix this?

Thanks for answer.

Carloscarlota answered 3/3, 2011 at 10:35 Comment(1)
I found that this situation made by one of our application processes. It load huge part of memory and then dies. But why memory doesn't realocated(not set to free) when procces that use it died?Carloscarlota
C
1

Look at the cached value. No OS is wasting memory by simply not using it. If your processes not demanding more, the OS is using it for internal caching of e.g. disk access.

Celinacelinda answered 27/3 at 6:25 Comment(0)
S
0

in order to see all process you can use that command:

ps aux

and then try to sort with different filters

ps faux

Hope that helps.

If your system starts using the swap file - then you have high memory load. Depends on the file system, programs that you use - linux system may allocate all of your system memory - but that doesn't mean that they are using it.

Lots of ubuntu and debian servers that we use have free memory 32 or 64 mb but don't use swap. I'm not Linux-gure however, so please someone to correct me if I'm wrong :)

Sawn answered 3/3, 2011 at 10:43 Comment(4)
it the same thing as "top" but in another way.Carloscarlota
So after dying of your process can you check what are values gives "free"?Sawn
it gives values the same as "top"Carloscarlota
You can use strace to debug your process. In that way you will see what is happening there.Sawn
N
0

I don't have a Linux box handy to experiment, but it looks like you can sort top's output with interactive commands, so you could bring the biggest memory users to the top. Check the man page and experiment.

Update: In the version of top I have (procps 3.2.7), you can hit "<" and ">" to change the field it's sorting by. Doesn't actually say what field it is, you have to look at how the display is changing. It's not hard once you experiment a little.

However, Arrowmaster's point (that it's probably being used for cache) is a better answer. Use "free" to see how much is being used.

Norinenorita answered 3/3, 2011 at 16:16 Comment(2)
D'oh. I thought there must be larger numbers down below somewhere. That's a light load.Norinenorita
yes, but also there is compsumtion of 7.5 GB of memory, and i don't know where(cause how you see there isn't any process with such load)Carloscarlota
R
0

I had a similar problem. I was running Raspbian on a Pi B+ with a TP-Link USB Wireless LAN stick connected. The stick caused a problem which resulted in nearly all memory being consumed on system start (around 430 of 445 MB). Just like in your case, the running processes did not consume that much memory. When I removed the stick and rebooted everything was fine, just 50 MB memory consumption.

Redfaced answered 29/4, 2015 at 10:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.