Samples of TOP command
Posted by: teguh123
Posted on: 2008-04-14 03:54:00
Can I see samples of TOP results from another typical user?
Mine is strange...
Is it normal to have 40 sleeping process? I mean if I see my sites, my sites are generated in less than 1 seconds. After that I expect memory to be released... But no... There are so many sleeping processes that's running for a long time...
What's going on? Is there a way that after my program finishes generating site and my site response to the get command from the other server, that it just quit and releases memory?
Can I show others' user typical top request?
I think that's the main problem... Somehow it takes a while for memories to get released even though my program has finished a very long time...
That being said, I don't think that kind of memory will affect server's performance... SWAP memories are cheap and only take hard disk space... Most of the time, those sleeping processes only take on swap memories...
I do recommend that you increase the ratio between SWAP and real memories.
Teguh
Here is my TOP request:
top - 03:53:41 up 3 days, 3:59, 2 users, load average: 0.26, 1.22, 1.74
Tasks: 40 total, 3 running, 34 sleeping, 0 stopped, 3 zombie
Cpu(s): 10.4% us, 3.7% sy, 0.0% ni, 85.6% id, 0.0% wa, 0.0% hi, 0.3% si
Mem: 417792k total, 340764k used, 77028k free, 0k buffers
Swap: 417792k total, 0k used, 417792k free, 0k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ PPID SWAP TIME CODE DATA COMMAND
26280 teguh123 16 0 0 0 0 Z 1.7 0.0 0:00.05 23805 0 0:00 0 0 php5.cgi <defunct>
26282 teguh123 17 0 20568 8808 4680 R 1.7 2.1 0:00.05 26281 11m 0:00 6504 3492 php5.cgi
26270 teguh123 15 0 20364 8912 4920 S 1.3 2.1 0:00.04 22845 11m 0:00 6504 3232 php5.cgi
26274 obd 16 0 0 0 0 Z 1.3 0.0 0:00.04 23507 0 0:00 0 0 php5.cgi <defunct>
26276 teguh123 16 0 0 0 0 Z 1.3 0.0 0:00.04 24293 0 0:00 0 0 php5.cgi <defunct>
22845 dhapache 15 0 31864 18m 3864 S 0.3 4.6 0:00.35 2445 12m 0:00 316 15m apache2-teguh12
22854 dhapache 15 0 32048 18m 3868 S 0.3 4.6 0:00.29 2445 12m 0:00 316 15m apache2-teguh12
24101 dhapache 15 0 31968 18m 3864 S 0.3 4.6 0:00.21 2445 12m 0:00 316 15m apache2-teguh12
24293 dhapache 15 0 32048 18m 3864 S 0.3 4.6 0:00.18 2445 12m 0:00 316 15m apache2-teguh12
24299 dhapache 15 0 31968 18m 3864 S 0.3 4.6 0:00.15 2445 12m 0:00 316 15m apache2-teguh12
25849 dhapache 15 0 31904 18m 3860 S 0.3 4.6 0:00.05 2445 12m 0:00 316 15m apache2-teguh12
1 root 15 0 1848 576 496 S 0.0 0.1 0:01.85 0 1272 0:01 32 280 init
2407 root 22 0 2820 1512 676 S 0.0 0.4 0:15.56 1 1308 0:15 276 960 syslog-ng
2445 root 15 0 31468 20m 5840 S 0.0 4.9 0:23.31 1 10m 0:23 316 14m apache2-teguh12
2461 root 15 0 1616 480 420 S 0.0 0.1 0:00.03 1 1136 0:00 20 232 inetd
2572 root 23 0 3044 1156 980 S 0.0 0.3 0:01.22 1 1888 0:01 24 264 master
2577 postfix 17 0 3084 1228 1016 S 0.0 0.3 0:01.13 2572 1856 0:01 40 264 qmgr
2582 root 15 0 3548 928 696 S 0.0 0.2 0:00.63 1 2620 0:00 276 456 sshd
2593 nobody 18 0 2464 832 472 S 0.0 0.2 0:00.14 1 1632 0:00 428 580 proftpd
2596 daemon 18 0 1768 388 308 S 0.0 0.1 0:00.00 1 1380 0:00 16 248 atd
2599 root 19 0 1824 756 608 S 0.0 0.2 0:03.53 1 1068 0:03 28 248 cron
2609 root 18 0 1572 448 388 S 0.0 0.1 0:00.04 1 1124 0:00 16 232 ud
9612 teguh123 15 0 2132 1068 836 S 0.0 0.3 0:04.20 31248 1064 0:04 48 280 top
16508 dhapache 24 0 31468 15m 1196 S 0.0 3.8 0:00.00 2445 15m 0:00 316 14m apache2-teguh12
23507 dhapache 15 0 31880 18m 3864 S 0.0 4.6 0:00.23 2445 12m 0:00 316 15m apache2-teguh12
23634 dhapache 15 0 31960 18m 3864 S 0.0 4.6 0:00.25 2445 12m 0:00 316 15m apache2-teguh12
23805 dhapache 15 0 31992 18m 3864 S 0.0 4.6 0:00.25 2445 12m 0:00 316 15m apache2-teguh12
24282 dhapache 15 0 31860 18m 4024 S 0.0 4.6 0:00.18 2445 12m 0:00 316 15m apache2-teguh12
24296 dhapache 15 0 31864 18m 3864 S 0.0 4.6 0:00.16 2445 12m 0:00 316 15m apache2-teguh12
25812 root 15 0 6124 1540 1244 S 0.0 0.4 0:00.00 2582 4584 0:00 276 456 sshd
25848 dhapache 15 0 31920 18m 3864 S 0.0 4.6 0:00.03 2445 12m 0:00 316 15m apache2-teguh12
25850 dhapache 15 0 32008 18m 3864 S 0.0 4.6 0:00.06 2445 12m 0:00 316 15m apache2-teguh12
25866 teguh123 15 0 6108 1216 912 R 0.0 0.3 0:00.00 25812 4892 0:00 276 456 sshd
25871 teguh123 15 0 2608 1384 1128 S 0.0 0.3 0:00.00 25866 1224 0:00 592 228 bash
25890 teguh123 15 0 2132 1040 836 R 0.0 0.2 0:00.00 25871 1092 0:00 48 280 top
26281 dhapache 16 0 31736 18m 3768 S 0.0 4.5 0:00.00 2445 12m 0:00 316 15m apache2-teguh12
29694 postfix 19 0 3052 1172 992 S 0.0 0.3 0:00.00 2572 1880 0:00 8 264 pickup
31130 root 15 0 6124 1536 1240 S 0.0 0.4 0:00.00 2582 4588 0:00 276 456 sshd
31243 teguh123 15 0 6108 1220 912 S 0.0 0.3 0:01.60 31130 4888 0:01 276 456 sshd
31248 teguh123 15 0 2608 1384 1128 S 0.0 0.3 0:00.00 31243 1224 0:00 592 228 bash