Memory problem

gonzalezgjaime

Joined
Nov 10, 2008
Messages
23
Likes
0
Points
0
#1
Hi to all, i have a question, i installed elastix 1.5, and all works well, but, after some days of use, the system starts using up all the memory, i can se it in the memory usage bar, there is nothing else installed on this server except elastix, any input on this issue will be greatly appreciated.

Thanks in advance.

Jaime Gonzalez.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
from bash as root:

top

will give you a real time view of what is using memory (shift m, will sort by memory user high to low)



so do that and post the "memory hogs"
 

gonzalezgjaime

Joined
Nov 10, 2008
Messages
23
Likes
0
Points
0
#3
Thank you for your quick reply here is the output



PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2321 mysql 24 0 134m 19m 4716 S 0.0 7.8 0:03.02 mysqld
4050 asterisk 20 0 37428 17m 4688 S 0.0 6.9 0:05.57 httpd
4055 asterisk 18 0 36208 16m 5400 S 0.0 6.6 0:04.49 httpd
4053 asterisk 18 0 36276 16m 5216 S 0.0 6.6 0:04.06 httpd
4056 asterisk 20 0 36196 16m 5220 S 8.3 6.6 0:04.43 httpd
4049 asterisk 20 0 36608 16m 4792 S 0.0 6.5 0:04.91 httpd
4051 asterisk 18 0 35996 16m 5292 S 0.0 6.5 0:03.87 httpd
4052 asterisk 18 0 36148 16m 5016 S 0.0 6.5 0:05.35 httpd
4054 asterisk 20 0 35884 15m 4812 S 0.0 6.3 0:04.48 httpd
2622 asterisk 15 0 28652 10m 5912 S 0.7 4.0 0:10.31 asterisk
2818 asterisk 15 0 12120 8396 1892 S 0.0 3.3 0:02.72 op_server.pl
4047 root 18 0 25504 8276 5136 S 0.0 3.2 0:00.61 httpd
2209 ntp 15 0 4380 4380 3376 S 0.0 1.7 0:00.11 ntpd
2714 haldaemo 18 0 5472 3696 1700 S 0.0 1.4 0:01.05 hald
2457 cyrus 18 0 17272 2996 1784 S 0.0 1.2 0:00.33 cyrus-master
3691 root 15 0 9932 2816 2288 S 0.0 1.1 0:02.42 sshd
2485 cyrus 18 0 31452 2188 1764 S 0.0 0.9 0:00.01 imapd
2478 cyrus 18 0 31448 2184 1764 S 0.0 0.9 0:00.02 imapd
2481 cyrus 18 0 31244 2184 1772 S 0.0 0.9 0:00.02 lmtpd
2489 cyrus 18 0 31452 2180 1756 S 0.0 0.9 0:00.02 imapd
2482 cyrus 18 0 31448 2176 1756 S 0.0 0.9 0:00.01 imapd
2536 cyrus 20 0 31448 2176 1756 S 0.0 0.9 0:00.04 imapd
2537 cyrus 20 0 31452 2176 1756 S 0.0 0.9 0:00.01 imapd
2538 cyrus 20 0 31452 2176 1756 S 0.0 0.9 0:00.01 imapd
2545 cyrus 25 0 31448 2176 1756 S 0.0 0.9 0:00.01 imapd
2477 cyrus 18 0 31448 2172 1756 S 0.0 0.8 0:00.02 imapd
2491 cyrus 18 0 31448 2172 1756 S 0.0 0.8 0:00.01 imapd
2543 cyrus 24 0 31448 2172 1756 S 0.0 0.8 0:00.01 imapd
2544 cyrus 25 0 31448 2172 1756 S 0.0 0.8 0:00.01 imapd
4830 postfix 16 0 6960 2164 1776 S 0.0 0.8 0:00.03 cleanup
2479 cyrus 18 0 31148 2128 1716 S 0.0 0.8 0:00.03 pop3d
2486 cyrus 18 0 31148 2128 1716 S 0.0 0.8 0:00.03 pop3d
2480 cyrus 18 0 31148 2124 1716 S 0.0 0.8 0:00.04 pop3d
2487 cyrus 18 0 31152 2124 1716 S 0.0 0.8 0:00.02 pop3d
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
make it easy on the eyes for me please:

post output of:


ps aux | awk '{print $4"\\t"$11}'|sort -rn


(just the memory used and the process name

an also the output of:


free
 

gonzalezgjaime

Joined
Nov 10, 2008
Messages
23
Likes
0
Points
0
#5
Im sorry if i am not doing this the correct way, i am not all that on linux commands, below all this is the output for free

Just to make a note this is a virtual machine that has only 249mb of ram, but the other elastix box i have has 2gb and does the same thing

[root@elastix etc]# ps aux | awk '{print $4"t"$11}'|sort -rn
7.8t/usr/sbin/httpd
7.4t/usr/sbin/httpd
7.4t/usr/sbin/httpd
7.3t/usr/libexec/mysqld
7.1t/usr/sbin/httpd
7.1t/usr/sbin/httpd
6.9t/usr/sbin/httpd
6.9t/usr/sbin/httpd
6.7t/usr/sbin/httpd
6.5t/usr/sbin/httpd
3.2t/usr/sbin/httpd
2.3t/usr/sbin/asterisk
2.0t/usr/bin/perl
1.7tntpd
1.0tsshd:
0.9t/usr/lib/cyrus-imapd/cyrus-master
0.8tpop3d
0.8tpop3d
0.8tpop3d
0.8tpop3d
0.8tpop3d
0.8tpop3d
0.8tpop3d
0.8tpop3d
0.8tlmtpd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.8timapd
0.7tqmgr
0.6t/usr/libexec/postfix/master
0.6tpickup
0.5thald
0.5t/bin/sh
0.5t-bash
0.5t-bash
0.4tlogin
0.3txinetd
0.3t/usr/sbin/sshd
0.3t/usr/sbin/hfaxd
0.3tsh
0.3tps
0.3tawk
0.2t/usr/sbin/faxq
0.2t/usr/sbin/acpid
0.2tsyslogd
0.2tsort
0.2t/sbin/audispd
0.2trpc.statd
0.2tportmap
0.2tinit
0.2thald-runner
0.2thald-addon-keyboard:
0.2thald-addon-acpi:
0.2tdbus-daemon
0.2tcrond
0.2t/bin/sh
0.2tauditd
0.1t/usr/sbin/vsftpd
0.1t/usr/sbin/saslauthd
0.1t/usr/sbin/atd
0.1t/sbin/udevd
0.1t/sbin/mingetty
0.1t/sbin/mingetty
0.1t/sbin/mingetty
0.1t/sbin/mingetty
0.1t/sbin/mingetty
0.1t/sbin/dhclient
0.1trpc.idmapd
0.1tklogd
0.1tidled
0.1thald-addon-storage:
0.1t-bash
%MEMtCOMMAND
0.0t[watchdog/0]
0.0t/usr/sbin/saslauthd
0.0t/usr/sbin/saslauthd
0.0t/usr/sbin/saslauthd
0.0t/usr/sbin/saslauthd
0.0t[scsi_eh_0]
0.0t[pdflush]
0.0t[pdflush]
0.0t[migration/0]
0.0t[kthread]
0.0t[kswapd0]
0.0t[ksoftirqd/0]
0.0t[ksnapd]
0.0t[kseriod]
0.0t[kpsmoused]
0.0t[kmpathd/0]
0.0t[kjournald]
0.0t[kjournald]
0.0t[khubd]
0.0t[khelper]
0.0t[kgameportd]
0.0t[kblockd/0]
0.0t[kauditd]
0.0t[kacpid]
0.0t[events/0]
0.0t[cqueue/0]
0.0t[ata_aux]
0.0t[ata/0]
0.0t[aio/0]


[root@elastix etc]# free
total used free shared buffers cached
Mem: 255592 239344 16248 0 6372 76040
-/+ buffers/cache: 156932 98660
Swap: 524280 11048 513232
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
Although everything seems within bounds, You only seem to have 256M memory, this is low for Elastix and apache is using lots.

You can reduce the number of allowed processes in your /etc/httpd/conf/httpd.conf file (restart httpd if you do so)

.
.
.
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 4
MinSpareServers 2
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 1000
</IfModule>
.
.
.






, I'm guessing this is a virtual machine (that sort of info is useful to post)

try a

/etc/init.d/httpd restart && swapoff -a && swapon -a

to see if your bar graph looks a little less strained.
 

gonzalezgjaime

Joined
Nov 10, 2008
Messages
23
Likes
0
Points
0
#7
Very well then, your info was very helpful, thank you very much, i will play with httpd.conf so i can reduce memory usage. I did make a note that i am using a VM on my last post, but there was a lot of info on that post so maybe it was hard to see.

Thanks again for your help.

Regards.

Jaime Gonzalez.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
Yes I see now:


.
.
Just to make a note this is a virtual machine that has only 249mb of ram, but the other elastix box i have has 2gb and does the same thing
.
.

Whilst I would not be concerned with the VM machine (apart from limiting the httpd processes, and probably add some memory), I would however be very suspicious of a machine with 2g of memory using it all.
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,901
Messages
130,885
Members
17,562
Latest member
colak
Top