Estou tendo um problema com meu servidor linux, procurei muitas vezes, mas não consegui encontrar um caso como o meu.
Eu tenho um servidor linux com 32GB de RAM, tudo bem quando ele inicializa, mas depois de alguns dias em execução a RAM é usada para basicamente nada.
Abaixo está o que o htop mostra depois que eu paro quase todos os serviços.
16GB está sendo usado por algo que eu não sei, 2GB está sendo usado por buffers e 0.6GB por caches. Todas as 45 tarefas estão listadas aqui, o que aconteceu com minha RAM?
Eabaixoestáoqueparecequandoreiniciaosistemaeinterrompetodooprocessologoapósainicialização.
EurealmentenãoseioqueestáacontecendocomaRAM...
Editar:Deixeioservidorrodandopor3diasdepoisqueposteiisso,pareiquasetodososserviçosnovamenteeexecuteiosseguintescomandossugeridos:
htop
free-m
totalusedfreesharedbufferscachedMem:320681824313824025421138-/+buffers/cache:1456317505Swap:420454199
cat/proc/meminfo
MemTotal:32837972kBMemFree:14153316kBBuffers:2603212kBCached:1167872kBSwapCached:964kBActive:2591368kBInactive:1187300kBActive(anon):6492kBInactive(anon):1304kBActive(file):2584876kBInactive(file):1185996kBUnevictable:0kBMlocked:0kBSwapTotal:4305416kBSwapFree:4300244kBDirty:28kBWriteback:4kBAnonPages:6968kBMapped:6220kBShmem:212kBSlab:14685364kBSReclaimable:14646664kBSUnreclaim:38700kBKernelStack:1544kBPageTables:1936kBNFS_Unstable:0kBBounce:0kBWritebackTmp:0kBCommitLimit:20724400kBCommitted_AS:73192kBVmallocTotal:34359738367kBVmallocUsed:133928kBVmallocChunk:34359506832kBHardwareCorrupted:0kBAnonHugePages:0kBHugePages_Total:0HugePages_Free:0HugePages_Rsvd:0HugePages_Surp:0Hugepagesize:2048kBDirectMap4k:4096kBDirectMap2M:2084864kBDirectMap1G:31457280kB
psaux|sort-k4
root9160.00.000?SNNov070:00[kipmi0]root1010.00.000?SNNov070:00[ksmd]root1020.00.000?SNNov070:22[khugepaged]root1030.00.000?SNov070:00[aio/0]root1040.00.000?SNov070:00[aio/1]root1050.00.000?SNov070:00[aio/2]root1060.00.000?SNov070:00[aio/3]root1070.00.000?SNov070:00[aio/4]root1080.00.000?SNov070:00[aio/5]root1090.00.000?SNov070:00[aio/6]root1100.00.000?SNov070:00[aio/7]root460.00.000?SNov070:00[async/mgr]root690.00.000?SNov070:00[ata_aux]root700.00.000?SNov070:00[ata_sff/0]root710.00.000?SNov070:00[ata_sff/1]root720.00.000?SNov070:00[ata_sff/2]root730.00.000?SNov070:00[ata_sff/3]root740.00.000?SNov070:00[ata_sff/4]root750.00.000?SNov070:00[ata_sff/5]root760.00.000?SNov070:00[ata_sff/6]root770.00.000?SNov070:00[ata_sff/7]root490.00.000?SNov070:00[bdi-default]root430.00.000?SNov070:00[cgroup]root1110.00.000?SNov070:00[crypto/0]root1120.00.000?SNov070:00[crypto/1]root1130.00.000?SNov070:00[crypto/2]root1140.00.000?SNov070:00[crypto/3]root1150.00.000?SNov070:00[crypto/4]root1160.00.000?SNov070:00[crypto/5]root1170.00.000?SNov070:00[crypto/6]root1180.00.000?SNov070:00[crypto/7]root1370.00.000?SNov070:00[deferwq]root10260.00.000?SNov070:00[ext4-dio-unwrit]root660.00.000?SNov070:00[kacpid]root680.00.000?SNov070:00[kacpi_hotplug]root670.00.000?SNov070:00[kacpi_notify]root10680.00.000?SNov070:00[kauditd]root1680.00.000?SNov070:00[kdmremove]root440.00.000?SNov070:00[khelper]root790.00.000?SNov070:00[khubd]root990.00.000?SNov070:00[khungtaskd]root500.00.000?SNov070:00[kintegrityd/0]root510.00.000?SNov070:00[kintegrityd/1]root520.00.000?SNov070:00[kintegrityd/2]root530.00.000?SNov070:00[kintegrityd/3]root540.00.000?SNov070:00[kintegrityd/4]root550.00.000?SNov070:00[kintegrityd/5]root560.00.000?SNov070:00[kintegrityd/6]root570.00.000?SNov070:00[kintegrityd/7]root10210.00.000?SNov070:00[kjournald]root1350.00.000?SNov070:00[kpsmoused]root800.00.000?SNov070:00[kseriod]root1690.00.000?SNov070:00[kstriped]root780.00.000?SNov070:00[ksuspend_usbd]root20.00.000?SNov070:00[kthreadd]root1260.00.000?SNov070:00[kthrotld/0]root1270.00.000?SNov070:00[kthrotld/1]root1280.00.000?SNov070:00[kthrotld/2]root1290.00.000?SNov070:00[kthrotld/3]root1300.00.000?SNov070:00[kthrotld/4]root1310.00.000?SNov070:00[kthrotld/5]root1320.00.000?SNov070:00[kthrotld/6]root1330.00.000?SNov070:00[kthrotld/7]root970.00.000?SNov070:00[linkwatch]root810.00.000?SNov070:00[md/0]root820.00.000?SNov070:00[md/1]root830.00.000?SNov070:00[md/2]root840.00.000?SNov070:00[md/3]root850.00.000?SNov070:00[md/4]root860.00.000?SNov070:00[md/5]root870.00.000?SNov070:00[md/6]root880.00.000?SNov070:00[md/7]root890.00.000?SNov070:00[md_misc/0]root900.00.000?SNov070:00[md_misc/1]root910.00.000?SNov070:00[md_misc/2]root920.00.000?SNov070:00[md_misc/3]root930.00.000?SNov070:00[md_misc/4]root940.00.000?SNov070:00[md_misc/5]root950.00.000?SNov070:00[md_misc/6]root960.00.000?SNov070:00[md_misc/7]root450.00.000?SNov070:00[netns]root470.00.000?SNov070:00[pm]root3600.00.000?SNov070:00[scsi_eh_0]root3610.00.000?SNov070:00[scsi_eh_1]root3620.00.000?SNov070:00[scsi_eh_2]root3630.00.000?SNov070:00[scsi_eh_3]root3640.00.000?SNov070:00[scsi_eh_4]root3650.00.000?SNov070:00[scsi_eh_5]root50.00.000?SNov070:00[stopper/0]root80.00.000?SNov070:00[stopper/1]root120.00.000?SNov070:00[stopper/2]root160.00.000?SNov070:00[stopper/3]root200.00.000?SNov070:00[stopper/4]root240.00.000?SNov070:00[stopper/5]root280.00.000?SNov070:00[stopper/6]root320.00.000?SNov070:00[stopper/7]root480.00.000?SNov070:00[sync_supers]root1360.00.000?SNov070:00[usbhid_resumer]root60.00.000?SNov070:00[watchdog/0]root100.00.000?SNov070:00[watchdog/1]root140.00.000?SNov070:00[watchdog/2]root180.00.000?SNov070:00[watchdog/3]root220.00.000?SNov070:00[watchdog/4]root260.00.000?SNov070:00[watchdog/5]root300.00.000?SNov070:00[watchdog/6]root340.00.000?SNov070:00[watchdog/7]root110.00.000?SNov070:04[migration/2]root10220.00.000?SNov070:05[kjournald]root30.00.000?SNov070:05[migration/0]root70.00.000?SNov070:05[migration/1]root150.00.000?SNov070:05[migration/3]root600.00.000?SNov070:06[kblockd/2]root640.00.000?SNov070:06[kblockd/6]root620.00.000?SNov070:07[kblockd/4]root190.00.000?SNov070:07[migration/4]root590.00.000?SNov070:08[kblockd/1]root310.00.000?SNov070:08[migration/7]root610.00.000?SNov070:10[kblockd/3]root650.00.000?SNov070:10[kblockd/7]root630.00.000?SNov070:12[kblockd/5]root270.00.000?SNov070:12[migration/6]root580.00.000?SNov070:13[kblockd/0]root230.00.000?SNov070:16[migration/5]root380.00.000?SNov070:18[events/3]root290.00.000?SNov070:18[ksoftirqd/6]root130.00.000?SNov070:19[ksoftirqd/2]root370.00.000?SNov070:20[events/2]root400.00.000?SNov070:20[events/5]root410.00.000?SNov070:20[events/6]root210.00.000?SNov070:22[ksoftirqd/4]root360.00.000?SNov070:23[events/1]root420.00.000?SNov070:24[events/7]root90.00.000?SNov070:24[ksoftirqd/1]root350.00.000?SNov070:27[events/0]root12210.00.000?SNov070:58[flush-8:0]root170.00.000?SNov071:01[ksoftirqd/3]root10250.00.000?SNov071:08[jbd2/sdb1-8]root40.00.000?SNov071:11[ksoftirqd/0]root250.00.000?SNov071:13[ksoftirqd/5]root330.00.000?SNov071:24[ksoftirqd/7]root390.00.000?SNov072:28[events/4]root4500.00.000?SNov072:49[kjournald]root13410.00.000?SNov073:22[kondemand/6]root13370.00.000?SNov073:47[kondemand/2]root13390.00.000?SNov073:57[kondemand/4]root13360.00.000?SNov074:05[kondemand/1]root13420.00.000?SNov074:38[kondemand/7]root13400.00.000?SNov074:39[kondemand/5]root13380.00.000?SNov074:47[kondemand/3]root13350.00.000?SNov075:10[kondemand/0]root1000.10.000?SNov077:53[kswapd0]root12160.00.010812236?S<Nov070:00/sbin/udevd-droot12170.00.010812236?S<Nov070:00/sbin/udevd-droot5440.00.010816268?S<sNov070:00/sbin/udevd-droot277620.00.01102321120pts/1R+05:330:00psauxroot271880.00.01110244440pts/1Ss05:210:00-bashroot271840.00.01120085076?Ss05:210:00sshd:root@pts/1root19490.00.0112584844?SsNov070:00abrt-dump-oops-d/var/spool/abrt-rwx/var/log/messagesroot19410.00.0114704940?SsNov070:00/usr/sbin/abrtdroot25580.00.0116856728?SsNov070:02crondroot18730.00.011912576?SNov070:00/usr/lib64/couriertcpd-address=0-maxprocs=40-maxperip=4-nodnslookup-noidentlookup143/usr/sbin/imaplogin/usr/bin/imapdMaildirroot277630.00.0155428852pts/1S+05:330:00sort-k46817850.00.018008692?SNov070:00hald-addon-acpi:listeningonacpidsocket/var/run/acpid.socketroot13640.00.018316548?SsNov070:25irqbalance--pid=/var/run/irqbalance.pidroot10.00.0193561156?SsNov070:00/sbin/initroot17450.00.020400664?SNov070:00hald-runnerroot25840.00.021104304?SsNov070:00/usr/sbin/atddbus17020.00.021432772?SsNov070:00dbus-daemon--systemroot18490.00.021716768?SsNov070:00xinetd-stayalive-pidfile/var/run/xinetd.pidroot17770.00.022520612?SNov070:00hald-addon-input:Listeningon/dev/input/event4/dev/input/event0/dev/input/event1/dev/input/event2root13120.00.02490881872?SlNov070:01/sbin/rsyslogd-i/var/run/syslogd.pid-c56817440.00.0380521824?SslNov070:01haldroot26110.00.04064464tty1Ss+Nov070:00/sbin/mingetty/dev/tty1root26130.00.04064464tty2Ss+Nov070:00/sbin/mingetty/dev/tty2root26150.00.04064464tty3Ss+Nov070:00/sbin/mingetty/dev/tty3root26170.00.04064464tty4Ss+Nov070:00/sbin/mingetty/dev/tty4root26190.00.04064464tty5Ss+Nov070:00/sbin/mingetty/dev/tty5root26210.00.04064464tty6Ss+Nov070:00/sbin/mingetty/dev/tty6root18720.00.04068408?SNov070:00/usr/sbin/courierlogger-name=imapd-pid=/var/run/imapd.pid-lockfile=/var/lock/subsys/courier-imapd-start-name=courier-imapd/usr/lib64/couriertcpd-address=0-maxprocs=40-maxperip=4-nodnslookup-noidentlookup143/usr/sbin/imaplogin/usr/bin/imapdMaildirroot17340.00.04080488?SsNov070:00/usr/sbin/acpidroot15960.00.04576224?SsNov070:00mdadm--monitor--scan-f--pid-file=/var/run/mdadm/mdadm.pidroot18400.00.066216508?SsNov070:00/usr/sbin/sshdroot12820.00.093156720?S<slNov070:00auditdUSERPID%CPU%MEMVSZRSSTTYSTATSTARTTIMECOMMAND
vmstat-s-SM|grepmem
32068Mtotalmemory18243Musedmemory2530Mactivememory1157Minactivememory13824Mfreememory2542Mbuffermemory
Depoisdisso,noteiqueessesgrandesnúmerosem/proc/meminfo:
Slab:14685364kBSReclaimable:14646664kBCommitLimit:20724400kBVmallocTotal:34359738367kBVmallocChunk:34359506832kBDirectMap1G:31457280kB
Oquepossofazerparacorrigiressealtousodememória?
Editar:Depoisdepesquisarsobrevazamentodememóriadeplacas,descobriquepoderiaserumdriveroualgorelacionadoaokernelequeoslabtoppoderiaajudar,noteiqueissoaconteceem20minutosdeexecução.Estoucomeçandoapensarqueestárelacionadoaomeucrontabdebackupqueusaorsnapshotecriamuitoshardlinks.Voutestá-lo.
slabtop