Memory optimizations
Paulo Roncon
paulo-m-roncon at ptinovacao.pt
Mon Jul 6 13:01:18 IST 2009
Hello,
I have a server with 8 cpus and 16G RAM. Currently the server is using 14G RAM, 0 SWAP, 3G cache free (about 5G free)
-I reduced the MailScanner childs to 8
- milter-greylist - memory used: 4G
- about 160 sendmail instances running
- clamav
-Centos 5.3 x64
-yum up-to-date
What can I do to reduce the memory occupation?
I have another server with 12G of RAM, same config (this have 16 MailScanner childs) and it only uses about 7G RAM...
free -m
total used free shared buffers cached
Mem: 16051 14662 1388 0 538 1133
-/+ buffers/cache: 12990 3060
Swap: 18047 0 18047
iostat
Linux 2.6.18-128.el5 07/06/2009
avg-cpu: %user %nice %system %iowait %steal %idle
4.62 0.01 1.40 0.69 0.00 93.29
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 17.86 11.29 2009.51 47709698 8491294338
sda1 0.00 0.00 0.01 2628 42546
sda2 17.86 11.29 2009.50 47706758 8491251792
dm-0 251.30 11.29 2009.50 47704514 8491252128
dm-1 0.00 0.00 0.00 1472 232
top - 12:58:00 up 48 days, 21:46, 3 users, load average: 4.74, 4.79, 4.39
Tasks: 374 total, 4 running, 370 sleeping, 0 stopped, 0 zombie
Cpu(s): 26.3%us, 7.4%sy, 0.0%ni, 56.2%id, 10.0%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 16436736k total, 15441228k used, 995508k free, 553288k buffers
Swap: 18481144k total, 116k used, 18481028k free, 1208512k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12118 root 25 0 190m 171m 948 R 58.7 1.1 0:01.77 clamscan
12132 root 25 0 190m 171m 948 R 48.8 1.1 0:01.47 clamscan
12148 root 25 0 171m 153m 852 R 37.2 1.0 0:01.12 clamscan
12161 root 18 0 370m 224m 2056 S 4.6 1.4 0:00.14 MailScanner
11969 root 15 0 69492 3832 1724 S 4.3 0.0 0:00.15 sendmail
3705 root 16 0 370m 225m 3576 S 2.3 1.4 0:30.73 MailScanner
3392 root 19 0 328m 183m 3584 S 1.7 1.1 0:29.09 MailScanner
805 root 10 -5 0 0 0 S 1.3 0.0 56:01.30 kjournald
3582 root 17 0 324m 180m 3588 S 1.3 1.1 0:32.58 MailScanner
3815 root 17 0 318m 173m 3572 S 0.7 1.1 0:25.27 MailScanner
3984 root 16 0 332m 187m 3572 D 0.7 1.2 0:28.52 MailScanner
12059 root 15 0 12868 1312 808 R 0.7 0.0 0:00.03 top
26244 smmsp 15 0 4442m 2.2g 724 S 0.7 14.3 35:41.12 milter-greylist
32230 root 15 0 67096 2568 868 S 0.7 0.0 34:16.49 sendmail
3918 root 16 0 323m 178m 3588 S 0.3 1.1 0:29.76 MailScanner
12110 root 21 0 63868 1124 952 S 0.3 0.0 0:00.01 clamav-wrapper
12126 root 20 0 63868 1124 952 S 0.3 0.0 0:00.01 clamav-wrapper
12144 root 20 0 63868 1124 952 S 0.3 0.0 0:00.01 clamav-wrapper
32060 root 15 0 5904 692 552 S 0.3 0.0 5:48.71 syslogd
1 root 15 0 10344 636 544 S 0.0 0.0 0:20.96 init
2 root RT -5 0 0 0 S 0.0 0.0 0:02.51 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:02.48 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.05 watchdog/0
5 root RT -5 0 0 0 S 0.0 0.0 0:01.57 migration/1
6 root 34 19 0 0 0 S 0.0 0.0 0:00.45 ksoftirqd/1
7 root RT -5 0 0 0 S 0.0 0.0 0:00.06 watchdog/1
8 root RT -5 0 0 0 S 0.0 0.0 0:02.25 migration/2
9 root 34 19 0 0 0 S 0.0 0.0 0:00.34 ksoftirqd/2
10 root RT -5 0 0 0 S 0.0 0.0 0:00.03 watchdog/2
11 root RT -5 0 0 0 S 0.0 0.0 0:01.82 migration/3
12 root 34 19 0 0 0 S 0.0 0.0 0:00.41 ksoftirqd/3
13 root RT -5 0 0 0 S 0.0 0.0 0:00.02 watchdog/3
pstree
init─┬─MailScanner
├─MailScanner─┬─3*[MailScanner───MailScanner]
│ ├─4*[MailScanner───clamav-wrapper───clamscan]
│ └─MailScanner
├─acpid
├─atd
├─auditd─┬─audispd───{audispd}
│ └─{auditd}
├─automount───7*[{automount}]
├─avahi-daemon───avahi-daemon
├─crond───crond───Vispan
├─dbus-daemon
├─events/0
├─events/1
├─events/2
├─events/3
├─events/4
├─events/5
├─events/6
├─events/7
├─gpm
├─hald───hald-runner─┬─hald-addon-acpi
│ └─hald-addon-stor
├─hcid
├─hidd
├─irqbalance
├─khelper
├─klogd
├─krfcommd
├─ksoftirqd/0
├─ksoftirqd/1
├─ksoftirqd/2
├─ksoftirqd/3
├─ksoftirqd/4
├─ksoftirqd/5
├─ksoftirqd/6
├─ksoftirqd/7
├─kthread─┬─aacraid
│ ├─aio/0
│ ├─aio/1
│ ├─aio/2
│ ├─aio/3
│ ├─aio/4
│ ├─aio/5
│ ├─aio/6
│ ├─aio/7
│ ├─ata/0
│ ├─ata/1
│ ├─ata/2
│ ├─ata/3
│ ├─ata/4
│ ├─ata/5
│ ├─ata/6
│ ├─ata/7
│ ├─ata_aux
│ ├─bond0
│ ├─bond1
│ ├─cqueue/0
│ ├─cqueue/1
│ ├─cqueue/2
│ ├─cqueue/3
│ ├─cqueue/4
│ ├─cqueue/5
│ ├─cqueue/6
│ ├─cqueue/7
│ ├─kacpid
│ ├─kauditd
│ ├─kblockd/0
│ ├─kblockd/1
│ ├─kblockd/2
│ ├─kblockd/3
│ ├─kblockd/4
│ ├─kblockd/5
│ ├─kblockd/6
│ ├─kblockd/7
│ ├─kedac
│ ├─khubd
│ ├─2*[kjournald]
│ ├─kmpath_handlerd
│ ├─kmpathd/0
│ ├─kmpathd/1
│ ├─kmpathd/2
│ ├─kmpathd/3
│ ├─kmpathd/4
│ ├─kmpathd/5
│ ├─kmpathd/6
│ ├─kmpathd/7
│ ├─kondemand/0
│ ├─kondemand/1
│ ├─kondemand/2
│ ├─kondemand/3
│ ├─kondemand/4
│ ├─kondemand/5
│ ├─kondemand/6
│ ├─kondemand/7
│ ├─kpsmoused
│ ├─kseriod
│ ├─ksnapd
│ ├─kstriped
│ ├─kswapd0
│ ├─nfsd4
│ ├─2*[pdflush]
│ ├─rpciod/0
│ ├─rpciod/1
│ ├─rpciod/2
│ ├─rpciod/3
│ ├─rpciod/4
│ ├─rpciod/5
│ ├─rpciod/6
│ ├─rpciod/7
│ └─scsi_eh_0
├─lockd
├─login───bash
├─migration/0
├─migration/1
├─migration/2
├─migration/3
├─migration/4
├─migration/5
├─migration/6
├─migration/7
├─milter-greylist───178*[{milter-greylist}]
├─5*[mingetty]
├─8*[nfsd]
├─portmap
├─rpc.idmapd
├─rpc.mountd
├─rpc.rquotad
├─rpc.statd
├─sdpd
├─sendmail───181*[sendmail]
├─2*[sendmail]
├─smartd
├─sshd─┬─sshd───bash───pstree
│ └─sshd───bash
├─syslogd
├─udevd
├─watchdog/0
├─watchdog/1
├─watchdog/2
├─watchdog/3
├─watchdog/4
├─watchdog/5
├─watchdog/6
├─watchdog/7
└─xinetd
More information about the MailScanner
mailing list