Memory leak

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Memory leak
# 8  
Old 05-30-2011
i am new in linux, so pls guide me what is it. i have more other boxes but it not uses like this. pls tell me what to do next...
# 9  
Old 05-30-2011
Cache is cache. Whenever linux uses the disk it stuffs disk contents into memory in case it needs them again. It gives them up as easily as free memory.

As for what's going wrong, tell us exactly what problem you're having with the system.
# 10  
Old 05-30-2011
exactly problem is i have 12 Red hat servers. all the servers consuming 20% of memory except this one its use more than 95 % of memory. its working also slow compare other rest servers. it always use 95%, 96% of memory. when i use command "sync ; echo 3 > /proc/sys/vm/drop_cache". then it release the memory and after 2,3 hours it will again use full memory. why it happen
pls reply
# 11  
Old 05-30-2011
Quote:
Originally Posted by reply.ravi
exactly problem is i have 12 Red hat servers. all the servers consuming 20% of memory except this one its use more than 95 % of memory.
We've already been over this. You just had the usual "oh my god linux uses free memory as cache" newbie freakout. Lots of memory being cached is completely normal, even expected behavior. If none of your other servers have any memory used as cache, they are the ones that have something wrong with them. Cache is good. Cache makes your system faster. Cache is also still "free" memory that your server will give up and hand over to programs should they ask for it.

Stop freaking out. Stop messing around with your VM modes -- disabling cache hurts your systems -- and undo the changes you did. (If you don't know how, just reboot your system.)

Quote:
also slow compare other rest servers.
This problem is completely unrelated to memory. It has 6 gigabytes of free memory. You don't have to keep prodding at VM modes. The memory's fine, or was until you started messing with it.

What, exactly, is slow? Forget the memory already and tell us what performance problems you're having. What's your load average?
# 12  
Old 05-30-2011
the load average is
Code:
#uptime
 22:44:16 up 21 days, 17:04,  1 user,  load average: 1.05, 1.08, 1.03


Last edited by Scott; 05-30-2011 at 03:11 PM.. Reason: Code tags
# 13  
Old 05-30-2011
Something's occupying one core 100% of the time. Run top to see what it is.

Also:

Quote:
Originally Posted by Corona688
What, exactly, is slow? Forget the memory already and tell us what performance problems you're having.
# 14  
Old 05-30-2011
Code:
top - 22:58:11 up 21 days, 17:18,  1 user,  load average: 1.00, 1.00, 1.00
Tasks: 246 total,   2 running, 244 sleeping,   0 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:   7805952k total,  7682840k used,   123112k free,   301988k buffers
Swap: 16892336k total,      184k used, 16892152k free,  6485460k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0 10348  692  584 S  0.0  0.0   0:01.61 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:01.02 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.14 ksoftirqd/0
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.81 migration/1
    6 root      34  19     0    0    0 S  0.0  0.0   0:00.05 ksoftirqd/1
    7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:01.03 migration/2
    9 root      34  19     0    0    0 S  0.0  0.0   0:00.05 ksoftirqd/2
   10 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/2
   11 root      RT  -5     0    0    0 S  0.0  0.0   0:01.02 migration/3
   12 root      34  19     0    0    0 S  0.0  0.0   0:00.05 ksoftirqd/3
   13 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/3
   14 root      RT  -5     0    0    0 S  0.0  0.0   0:01.06 migration/4
   15 root      34  19     0    0    0 S  0.0  0.0   0:00.01 ksoftirqd/4
   16 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/4
   17 root      RT  -5     0    0    0 S  0.0  0.0   0:00.74 migration/5
   18 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/5
   19 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/5
   20 root      RT  -5     0    0    0 S  0.0  0.0   0:00.62 migration/6
   21 root      34  19     0    0    0 S  0.0  0.0   0:00.01 ksoftirqd/6
   22 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/6
   23 root      RT  -5     0    0    0 S  0.0  0.0   0:00.94 migration/7
   24 root      34  19     0    0    0 S  0.0  0.0   0:00.11 ksoftirqd/7
   25 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/7
   26 root      10  -5     0    0    0 S  0.0  0.0   0:00.01 events/0
   27 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/1
   28 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/2
   29 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/3
   30 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/4
   31 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/5
   32 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/6
   33 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/7
   34 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
   35 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
   37 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 xenwatch
   38 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 xenbus


Last edited by Scott; 05-30-2011 at 03:12 PM.. Reason: Code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Help regarding memory leak in this C program

I have written this code in C which reads a very large collection of text files and does some processing. The problem with this code is that there are memory leaks which I am not able to figure out as to where the problem is. When I run this code, and see the memory usage using top command, then I... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies

2. Programming

Memory Leak

Hi, I am trying a database server which keeps a B+ plus tree structure and works on it. I am trying to find the memory used/leak while executing this process. I check the memory leak by using ps uax command. When i execute a delete query i am sure that my code frees up the existing... (9 Replies)
Discussion started by: kumaran_5555
9 Replies

3. Programming

memory leak problem

hi all Can any one plz explain me about memory leak problem Thankx (5 Replies)
Discussion started by: sonali
5 Replies

4. IP Networking

memory leak?

Hi All, my client server application can work in two modes: 1) one direction - only client sends msgs to server 2) two directions - server gives 'answers' to client. when program run in the first mode it looks OK, but when server answers to client than client's application exit its... (2 Replies)
Discussion started by: lenna
2 Replies

5. UNIX for Advanced & Expert Users

Need to create a memory leak

Hi. This might be a strange request, but does anyone have any idea on a simple shell script that would use more and more memory as it ran? Like a purposeful leak. I want to test the behaviour of an already running program when the machine runs out of memory. Thanks! (4 Replies)
Discussion started by: rebelbuttmunch
4 Replies

6. Programming

Memory LEAK with pthreads

I have this code... #include <stdio.h> #include <iostream> #include <pthread.h> static void* cliente(void *datos); int main() { pthread_attr_t tattr; int ret; size_t size = PTHREAD_STACK_MIN + 0x0100; ret = pthread_attr_init(&tattr); ret =... (8 Replies)
Discussion started by: JEscola
8 Replies

7. UNIX for Advanced & Expert Users

Memory leak while using pthread_cancel()

I tried to execute a sample pthread program to cancel a newly created one using pthread_cancel(). but using valgrind on my code shows some memory leak. My Code: #include "iostream" #include "unistd.h" #include "pthread.h" #include "signal.h" using namespace std; void handler(int); void*... (4 Replies)
Discussion started by: kcr
4 Replies

8. UNIX for Advanced & Expert Users

Check memory leak

I am running c++ code on AIX unix.I have a doubt that my code is using some memory but it is not clearing that.Some time i am getting heap allocation problem.In my code i am not using any malloc,new functions also i am justing using pointers and arrays. Is there any way i can find out if the... (2 Replies)
Discussion started by: ukatru
2 Replies

9. Programming

about virtual memory and memory leak

Hi, First of all I appreciate this group very much for its informative discussions and posts. Here is my question. I have one process whose virtual memory size increases linearly from 6MB to 12MB in 20 minutes. Does that mean my process has memory leaks? In what cases does the... (4 Replies)
Discussion started by: shriashishpatil
4 Replies
Login or Register to Ask a Question