possible memory leak ?

Support for webhosts that use CentOS
Post Reply
Ahaus
Posts: 3
Joined: 2005/09/03 02:10:03
Contact:

possible memory leak ?

Post by Ahaus » 2005/11/06 18:19:35

Hi, i'm running CentOS 4 for a webhosting services, but I expect some problem, the memory continually drop down, I have to reboot the server one time a day to avoid a crash. I'm running the kernel 2.6.9-22.0.1 and all package are up 2 date... I've installed DirectAdmin and it also up 2 date. At first, I was thinking that is a problem with the physical memory, but after some test done by the tech on my machine (my machine are hosted somewhere), no problem with RAM. Then I've expect that the problem can be the kernel, then I've updated it... but nothing changed... I explain my problem,

I start my server with 379 000 ko availaible. If I upload a file (10mb) with FTP, my mem drop down for 10mb (369 000ko), if I delete the file uploaded, my mem up for 10 mb (379 000ko) If i do an up2date command, or updatedb (something who need memory to work), my memory drom down and never go up. Memory is never free, very annoying....

i'm running kernel:
# uname -a
Linux seashell.nebukazar.net 2.6.9-22.0.1.EL #1 Thu Oct 27 12:26:11 CDT 2005 i686 i686 i386 GNU/Linux

and a copy of top
[code]
top - 13:16:35 up 3:46, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 92 total, 1 running, 91 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.4% us, 0.3% sy, 0.0% ni, 99.0% id, 0.2% wa, 0.0% hi, 0.0% si
Mem: 483552k total, 226084k used, 257468k free, 39236k buffers
Swap: 979956k total, 0k used, 979956k free, 120076k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5846 root 15 0 2656 836 656 R 2.0 0.2 0:00.01 top
1 root 16 0 2464 556 476 S 0.0 0.1 0:00.68 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
3 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 events/0
4 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
5 root 14 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
20 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
31 root 15 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
33 root 10 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
21 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd
32 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0
107 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
175 root 15 0 0 0 0 S 0.0 0.0 0:00.42 kjournald
987 root 6 -10 1796 460 380 S 0.0 0.1 0:00.02 udevd
1299 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 kauditd
1332 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 kmirrord
1333 root 7 -10 0 0 0 S 0.0 0.0 0:00.00 kmir_mon
1357 root 15 0 0 0 0 S 0.0 0.0 0:00.09 kjournald
2255 root 16 0 3068 604 508 S 0.0 0.1 0:00.37 syslogd
2259 root 16 0 2468 468 404 S 0.0 0.1 0:00.02 klogd
2285 rpc 15 0 3284 580 484 S 0.0 0.1 0:00.00 portmap
2304 rpcuser 18 0 2752 760 656 S 0.0 0.2 0:00.00 rpc.statd
2335 root 16 0 5016 1196 944 S 0.0 0.2 0:00.00 rpc.idmapd
2399 root 17 0 3036 816 608 S 0.0 0.2 0:00.00 smartd
2408 root 21 0 3220 548 476 S 0.0 0.1 0:00.00 acpid
2417 root 16 0 9392 2088 1640 S 0.0 0.4 0:00.02 cupsd
2456 root 16 0 5188 1708 1396 S 0.0 0.4 0:00.32 sshd
2492 root 15 0 3112 844 712 S 0.0 0.2 0:00.01 xinetd
2501 root 16 0 2840 296 256 S 0.0 0.1 0:00.00 da-popb4smtp
2510 nobody 15 0 6364 1088 900 S 0.0 0.2 0:00.49 directadmin
2519 mail 16 0 8560 1940 1568 S 0.0 0.4 0:00.00 exim
2532 root 18 0 2244 528 456 S 0.0 0.1 0:00.00 gpm
2546 root 16 0 24924 15m 9.8m S 0.0 3.2 0:00.50 httpd
2555 ftp 16 0 3788 1352 916 S 0.0 0.3 0:00.00 proftpd
2565 root 16 0 2324 588 500 S 0.0 0.1 0:00.05 vm-pop3d
2587 root 16 0 5536 1132 728 S 0.0 0.2 0:00.06 crond
2601 apache 16 0 26560 17m 10m S 0.0 3.6 0:05.02 httpd
2602 apache 16 0 25092 15m 10m S 0.0 3.3 0:04.53 httpd
2603 apache 16 0 26512 17m 10m S 0.0 3.6 0:05.74 httpd
2604 apache 16 0 26232 16m 10m S 0.0 3.6 0:05.42 httpd
2605 apache 15 0 25072 15m 10m S 0.0 3.3 0:04.52 httpd
2606 apache 15 0 27348 17m 10m S 0.0 3.8 0:06.09 httpd
2615 xfs 16 0 3708 1204 816 S 0.0 0.2 0:00.00 xfs
2632 root 16 0 3648 740 616 S 0.0 0.2 0:00.00 atd
2641 dbus 15 0 3000 1228 1084 S 0.0 0.3 0:00.04 dbus-daemon-1
2650 root 16 0 6640 4476 1612 S 0.0 0.9 0:00.43 hald
2669 root 18 0 6180 1224 1068 S 0.0 0.3 0:00.02 mysqld_safe
2713 mysql 16 0 32196 12m 2320 S 0.0 2.6 0:00.28 mysqld
2737 mysql 15 0 32196 12m 2320 S 0.0 2.6 0:00.18 mysqld
2738 mysql 20 0 32196 12m 2320 S 0.0 2.6 0:00.00 mysqld
2739 mysql 16 0 32196 12m 2320 S 0.0 2.6 0:00.00 mysqld
2740 mysql 16 0 32196 12m 2320 S 0.0 2.6 0:00.00 mysqld
2741 mysql 20 0 32196 12m 2320 S 0.0 2.6 0:00.00 mysqld
2759 mysql 16 0 32196 12m 2320 S 0.0 2.6 0:00.01 mysqld
2760 mysql 16 0 32196 12m 2320 S 0.0 2.6 0:00.00 mysqld
2761 mysql 16 0 32196 12m 2320 S 0.0 2.6 0:00.00 mysqld
2762 mysql 16 0 32196 12m 2320 S 0.0 2.6 0:00.00 mysqld
2769 root 18 0 2220 412 360 S 0.0 0.1 0:00.00 mingetty
2770 root 18 0 2960 416 360 S 0.0 0.1 0:00.00 mingetty
2771 root 19 0 1696 416 360 S 0.0 0.1 0:00.00 mingetty
2772 root 18 0 1792 416 360 S 0.0 0.1 0:00.00 mingetty
2773 root 18 0 2400 416 360 S 0.0 0.1 0:00.00 mingetty
2774 root 18 0 3480 416 360 S 0.0 0.1 0:00.00 mingetty
3089 apache 16 0 26468 17m 10m S 0.0 3.6 0:05.27 httpd
3101 named 18 0 36720 3020 2172 S 0.0 0.6 0:00.33 named
3113 apache 16 0 27080 17m 10m S 0.0 3.7 0:04.73 httpd
3118 apache 16 0 25868 16m 10m S 0.0 3.5 0:04.81 httpd
3119 apache 16 0 25084 15m 10m S 0.0 3.3 0:04.19 httpd
5442 nobody 16 0 6364 1088 900 S 0.0 0.2 0:00.00 directadmin
5443 nobody 15 0 6364 1088 900 S 0.0 0.2 0:00.00 directadmin
5444 nobody 15 0 6364 1088 900 S 0.0 0.2 0:00.00 directadmin
5693 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5701 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5712 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5723 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5736 root 16 0 7928 2216 1776 S 0.0 0.5 0:00.05 sshd
5738 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5739 logics 15 0 7928 2284 1836 S 0.0 0.5 0:00.18 sshd
5740 logics 15 0 4748 1380 1168 S 0.0 0.3 0:00.01 bash
5767 root 16 0 5492 1196 940 S 0.0 0.2 0:00.01 su
5770 root 15 0 5012 1428 1164 S 0.0 0.3 0:00.04 bash
5793 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5796 logics 16 0 4384 1800 1244 S 0.0 0.4 0:00.73 proftpd
5801 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5812 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5829 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5839 apache 15 0 24924 15m 9.9m S 0.0 3.3 0:00.00 httpd
5840 apache 16 0 24924 15m 9.8m S 0.0 3.2 0:00.00 httpd
5841 root 16 0 2324 588 500 S 0.0 0.1 0:00.00 vm-pop3d
5842 apache 16 0 24924 15m 9.8m S 0.0 3.2 0:00.00 httpd
5843 apache 16 0 24924 15m 9.8m S 0.0 3.2 0:00.00 httpd
[/code]

If anyone can help me.... that very annoying... and I don't wanna reload another OS

Thanks

eperez
Posts: 13
Joined: 2005/06/19 23:47:40
Location: Quito - Ecuador
Contact:

Re: possible memory leak ?

Post by eperez » 2005/12/11 02:21:53

Hi

as far as I remember directadmin compiles and uses its own apache package. It is, the apache you are using is from directadmin, not centos.

Anyway, coming from centos or not I think the problem is related to apache because of the top command you showed. Please check with directadmin or better: Try to optimize your httpd.conf in order to help overcome this problem.

regards
epe

redeye
Posts: 5
Joined: 2005/03/17 11:05:25

possible memory leak ?

Post by redeye » 2006/02/13 19:53:02

Epe is correct, apache is compiled by DA, when it is installed, but, that's not the issue. The thing is, this is how linux works. As log as there is enough memory left, it uses to cache pages, it's not like windows, memory is not flushed instandly.

Google for Linux memory management :lol:

Post Reply

Return to “CentOS 4 - Webhosting Support”