Hari ini lihat penggunaan memory disalah satu webserver sangat besar sekali, untuk melihat penggunaan memory ini saya menggunakan comman TOP
top – 06:48:24 up 1 day, 15:33, 2 users, load average: 0.04, 0.05, 0.03
Tasks: 98 total, 2 running, 96 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2061712k total, 1786264k used, 275448kfree, 5480k buffers
Swap: 5863704k total, 0k used, 5863704k free, 107816k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19620 root 20 0 2448 1176 912 R 0 0.1 0:01.02 top
1 root 20 0 1908 888 668 S 0 0.0 0:01.41 init
2 root 15 -5 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root RT -5 0 0 0 S 0 0.0 0:00.05 migration/0
4 root 15 -5 0 0 0 S 0 0.0 0:01.21 ksoftirqd/0
5 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/0
6 root RT -5 0 0 0 S 0 0.0 0:00.07 migration/1
7 root 15 -5 0 0 0 S 0 0.0 0:00.53 ksoftirqd/1
8 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/1
9 root 15 -5 0 0 0 S 0 0.0 0:00.03 events/0
10 root 15 -5 0 0 0 S 0 0.0 0:00.01 events/1
11 root 15 -5 0 0 0 S 0 0.0 0:00.00 khelper
12 root RT -5 0 0 0 S 0 0.0 0:00.00 kstop/0
13 root RT -5 0 0 0 S 0 0.0 0:00.00 kstop/1
14 root 15 -5 0 0 0 S 0 0.0 0:00.00 kintegrityd/0
15 root 15 -5 0 0 0 S 0 0.0 0:00.00 kintegrityd/1
16 root 15 -5 0 0 0 S 0 0.0 0:00.00 kblockd/0
17 root 15 -5 0 0 0 S 0 0.0 0:00.00 kblockd/1
18 root 15 -5 0 0 0 S 0 0.0 0:00.00 kacpid
19 root 15 -5 0 0 0 S 0 0.0 0:00.00 kacpi_notify
20 root 15 -5 0 0 0 S 0 0.0 0:00.00 cqueue
21 root 15 -5 0 0 0 S 0 0.0 0:00.00 ata/0
22 root 15 -5 0 0 0 S 0 0.0 0:00.00 ata/1
23 root 15 -5 0 0 0 S 0 0.0 0:00.00 ata_aux
24 root 15 -5 0 0 0 S 0 0.0 0:00.00 ksuspend_usbd
25 root 15 -5 0 0 0 S 0 0.0 0:00.00 khubd
26 root 15 -5 0 0 0 S 0 0.0 0:00.00 kseriod
27 root 15 -5 0 0 0 S 0 0.0 0:00.00 kmmcd
28 root 15 -5 0 0 0 S 0 0.0 0:00.00 btaddconn
29 root 15 -5 0 0 0 S 0 0.0 0:00.00 btdelconn
30 root 20 0 0 0 0 S 0 0.0 0:03.38 pdflush
31 root 20 0 0 0 0 S 0 0.0 0:01.73 pdflush
Dari hasil perintah top diatas terlihat jelas bahwa penggunaan memory sangat besar sekali, padahal proses yang di tunjukkan tidak ada yang memakan memory terlalu besar, entah proses mana yang biki memory habis. untuk mengtasi hal itu bisa dilakukan dengan memberikan command sebagai berikut:
# sync && echo 2 | tee /proc/sys/vm/drop_caches
Setelah perintah diatas, jumlah free memorynya langsung meningkat drastis. Angka 2 diatas saya gunakan karena saya menggunakan memory sebesar 2 giga







