|Summary:||memory stays in|
|Product:||[Retired] Red Hat Linux||Reporter:||Mike <miha>|
|Component:||kernel||Assignee:||Arjan van de Ven <arjanv>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Brock Organ <borgan>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2004-09-30 15:39:10 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Mike 2001-09-05 07:32:54 UTC
From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Description of problem: the system runs mysql database and tomcat. when ONLY system starts it uses 60 MB of 1GB RAM. after we start mysql and tomcat, the system uses 200MB.when we shutdown mysql & tomcat it still shows 200MB as used. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.it happens with default & new-recompiled kernel 2.4.2 2.start some memory eat processes 3.make sure it uses enough memory 4.shutdown the processes 5. make sure in top that it shows same amoung of memory as "used" 6. reboot helps Actual Results: the system does not free memory. Expected Results: the system started with 60MB, after running our processes it used 400MB,after closing our processes the system should unused memory. Additional info: i tried to put a new kernel 2.4.9 but have the same problem.
Comment 1 Arjan van de Ven 2001-09-05 07:43:33 UTC
I'm fairly convinced one of the kernel caches (such as the disk-cache) that retains the memory in case you use it again. You can force these caches to be cleared by typing "dd if=/dev/zero of=/tmp/foofile bs=1M count=1024 ; rm /tmp/foofile" if this "clears" the memoryleak you see it's the diskcache; this memory will be freed on demand.
Comment 2 Mike 2001-09-05 07:58:49 UTC
the problem happens on RAM , not with disk space/cache. There was a same problem with 2.2 kernel and there was a patch to make kernel free unused memory.
Comment 3 Arjan van de Ven 2001-09-05 08:01:56 UTC
The diskcache is in RAM. And you WANT the kernel to keep that around until you really need the memory, as your next access to the same data on disk will be very fast due to the cache. The kernel will just free the memory used for caches when applications need it. The "dd" line I gave will need memory and as a result the caches will get freed.
Comment 4 Mike 2001-09-05 08:08:41 UTC
BUT: when i start our processes again (mysql, tomcat with many java processes, oracle) - they are all fail with error "not enough memory". The reboot fixes it well and they all can be started. Even more, when i start only one of them (mysql) - i got the same error. maybe there is a way to signal to the kernel to not keep caches and clear them when process end? please suggest.
Comment 5 Arjan van de Ven 2001-09-05 11:18:50 UTC
hmm. this sounds like programs are not releasing their shared memory. Could you run the "ipcs" program to see if there is a lot of shared memory left in use after the programs have existed ?
Comment 6 Mike 2001-09-05 12:50:36 UTC
OK. here is a log. The system was up and running. all our processes were up too (mysql, tomcat, oracle). There were 300MB of RAM used. now all process are down. the system shows that it still uses 300MB. the output of "ipcs" before processes shutdown and after is attached. Before: ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00280267 0 root 644 1048576 3 0x00000000 32769 oracle 640 77824 14 0x00000000 65538 oracle 640 17825792 14 0x00000000 98307 oracle 640 17825792 14 0x00000000 131076 oracle 640 20971520 14 0x847fad80 163845 oracle 640 16961536 14 ------ Semaphore Arrays -------- key semid owner perms nsems status 0x00280269 0 root 666 14 0x8bedf710 131073 oracle 640 154 ------ Message Queues -------- key msqid owner perms used-bytes messages After: ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00280267 0 root 644 1048576 4 ------ Semaphore Arrays -------- key semid owner perms nsems status 0x00280269 0 root 666 14 ------ Message Queues -------- key msqid owner perms used-bytes messages please suggest
Comment 7 Bugzilla owner 2004-09-30 15:39:10 UTC
Thanks for the bug report. However, Red Hat no longer maintains this version of the product. Please upgrade to the latest version and open a new bug if the problem persists. The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, and if you believe this bug is interesting to them, please report the problem in the bug tracker at: http://bugzilla.fedora.us/