服务器负载很高,是配置太低了么?
b1ueray
|
1#
b1ueray 发表于 2008-06-29 17:21
服务器负载很高,是配置太低了么?
一台服务器专门用作图片存放,最近放了些flv视频文件上去,负载马上就上去了,想请教一下各位大大是不是配置太低了
tasks 在500+的时候,负载在10+ 在600~700的时候,负载会彪到100+ ------------------------------------------------------------------------------------------------------------- 主机配置 AMD Sempron(tm) Processor 3100+ 1G内存 ------------------------------------------------------------------------------------------------------------- /usr/local/apache/bin/apachectl status Apache Server Status for localhost Server Version: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.5 Server Built: Jun 27 2008 17:44:29 _________________________________________________________________ Current Time: Sunday, 29-Jun-2008 07:50:09 EDT Restart Time: Saturday, 28-Jun-2008 11:59:14 EDT Parent Server Generation: 1 Server uptime: 19 hours 50 minutes 55 seconds Total accesses: 4220740 - Total Traffic: 990.5 GB CPU Usage: u21.15 s47.86 cu0 cs0 - .0966% CPU load 59.1 requests/sec - 14.2 MB/second - 246.1 kB/request 251 requests currently being processed, 44 idle workers .KK.CKWWKK.CWKWWW_.KK_KWWWKKK__W.KW.WWW._K.KWCWWKKK.K.KKK..K.W_K WKW.W.K_W_WWKK.KKWKKWKWKWWK_WWWCCK_KKKKKCKW.W.WK_CCWCKKWKKWWW_KK K_CWK.KWK_K___WC_KWCKKKWKK._WWWWWC..WWKKW_WW_WKKK_WKWKKWW_WKK..W KKWKKWW_W.KWWW.KKW.KW_WKW.W_W.CWKW.K_.K.W.K.KKK.W.C...K..K_..... K_...KK_K_.CW..C..KK.K.._K......WWK..K..K...C....K_KK.CW.KK._... W._K_.KKWWWKC.__..WKWW_.W_WC....WKK....WKW..._.W..KK.K.KW.K....W ........_W.K..._.C.._..WW.....CWWW..KW...KK..W.W................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................ Scoreboard Key: "_" Waiting for Connection, "S" Starting up, "R" Reading Request, "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup, "C" Closing connection, "L" Logging, "G" Gracefully finishing, "I" Idle cleanup of worker, "." Open slot with no current process --------------------------------------------------------------------------------------------------------------- top -b -n 1 | awk '{if (NR <=7) print; else if ($8 == "D") {print; count++} } END {print "Total status D: "count}' top - 05:06:48 up 20:27, 1 user, load average: 4.66, 4.41, 6.56 Tasks: 478 total, 3 running, 475 sleeping, 0 stopped, 0 zombie Cpu(s): 3.5%us, 5.3%sy, 0.1%ni, 36.1%id, 48.1%wa, 1.2%hi, 5.7%si, 0.0%st Mem: 1026936k total, 1012924k used, 14012k free, 10636k buffers Swap: 2031608k total, 15856k used, 2015752k free, 612160k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 24569 nobody 15 0 34956 14m 3196 D 0.0 1.4 0:00.03 httpd Total status D: 1 ------------------------------------------------------------------------------------------------------------- vmstat 1 10 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 0 9 15856 14376 10524 588108 3 0 2838 179 357 238 4 12 36 48 0 1 0 15856 13800 10536 588324 0 0 2588 0 8996 973 4 13 18 65 0 0 2 15856 14728 10488 586844 0 0 3060 0 8498 1010 3 12 14 70 0 0 6 15856 14880 10480 587344 0 0 2768 0 8203 866 4 12 44 41 0 0 3 15856 13984 10492 588784 0 0 2840 884 8296 882 2 13 11 74 0 0 0 15856 15008 10460 588120 0 0 3020 4 8088 988 3 11 7 79 0 0 3 15856 13076 10484 590620 0 0 2532 0 8294 964 3 10 27 60 0 0 0 15856 15256 10408 589096 0 0 2452 0 8295 942 4 11 30 55 0 0 0 15856 13888 10432 590796 0 0 1740 0 8521 902 3 13 45 39 0 0 1 15856 13724 10436 591296 0 0 2784 760 7909 940 4 11 23 62 0 ------------------------------------------------------------------------------------------------------------- free -m total used free shared buffers cached Mem: 1002 989 13 0 10 605 -/+ buffers/cache: 374 628 Swap: 1983 15 1968 ------------------------------------------------------------------------------------------------------------- sar Linux 2.6.18-53.1.14.el5 06/29/2008 12:00:02 AM CPU %user %nice %system %iowait %steal %idle 12:10:07 AM all 2.82 0.00 11.59 39.72 0.00 45.87 12:20:02 AM all 2.68 0.01 11.71 45.05 0.00 40.55 12:30:06 AM all 2.97 0.00 11.71 46.14 0.00 39.18 12:40:05 AM all 3.45 0.00 13.58 50.49 0.00 32.48 12:50:06 AM all 3.16 0.00 14.13 73.72 0.00 8.98 01:00:05 AM all 2.94 0.00 14.58 69.31 0.00 13.17 01:10:06 AM all 2.93 2.29 14.07 69.02 0.00 11.68 01:20:09 AM all 2.90 0.00 13.59 64.20 0.00 19.30 01:30:09 AM all 3.33 0.00 14.51 65.17 0.00 16.98 01:40:09 AM all 4.09 0.00 15.29 69.19 0.00 11.43 01:50:07 AM all 3.40 0.00 15.17 79.43 0.00 1.99 02:00:06 AM all 3.25 0.01 14.51 65.77 0.00 16.46 02:10:05 AM all 3.49 0.00 14.12 78.14 0.00 4.26 02:20:07 AM all 3.45 0.00 15.47 79.22 0.00 1.84 02:30:06 AM all 4.25 0.00 16.07 73.22 0.00 6.45 02:40:07 AM all 4.02 0.00 15.71 75.77 0.00 4.49 02:50:10 AM all 3.60 0.00 15.85 80.22 0.00 0.32 03:00:05 AM all 3.62 0.00 15.52 76.18 0.00 4.68 03:10:08 AM all 3.95 0.00 14.84 75.91 0.00 5.29 03:20:07 AM all 3.83 0.00 14.19 71.72 0.00 10.25 03:30:05 AM all 3.92 0.00 15.29 78.68 0.00 2.11 03:40:07 AM all 3.44 0.00 12.88 73.20 0.00 10.48 03:50:11 AM all 5.87 0.00 15.46 70.90 0.00 7.77 04:00:03 AM all 4.83 0.06 13.78 76.93 0.00 4.40 04:10:09 AM all 6.07 0.01 14.92 77.31 0.00 1.69 04:20:05 AM all 4.54 0.07 12.62 82.77 0.00 0.00 04:30:06 AM all 5.89 0.01 16.20 77.90 0.00 0.00 04:40:05 AM all 6.92 0.01 17.72 75.36 0.00 0.00 04:50:06 AM all 9.02 0.01 17.91 73.07 0.00 0.00 05:00:03 AM all 8.02 0.00 18.17 68.55 0.00 5.26 05:10:03 AM all 3.43 0.00 12.54 62.39 0.00 21.63 05:20:07 AM all 3.31 0.07 14.02 61.49 0.00 21.11 Average: all 4.17 0.08 14.62 69.56 0.00 11.58 12:00:02 AM tps rtps wtps bread/s bwrtn/s 12:10:07 AM 303.64 255.14 48.50 10788.28 673.22 12:20:02 AM 336.70 287.71 48.99 11412.73 686.90 12:30:06 AM 320.67 271.06 49.61 10901.49 687.39 12:40:05 AM 338.58 286.50 52.09 11648.38 726.62 12:50:06 AM 400.44 349.55 50.89 14705.40 707.90 01:00:05 AM 385.06 336.54 48.52 14423.69 674.94 01:10:06 AM 371.41 324.32 47.09 13726.16 650.57 01:20:09 AM 366.92 320.81 46.11 13078.50 638.99 01:30:09 AM 372.14 320.58 51.56 13781.94 713.37 01:40:09 AM 401.58 345.29 56.28 15531.78 783.90 01:50:07 AM 431.08 375.13 55.95 17217.18 779.59 02:00:06 AM 368.66 317.68 50.98 14898.21 707.05 02:10:05 AM 403.05 349.08 53.97 16825.02 750.50 02:20:07 AM 410.96 358.11 52.85 17370.38 739.58 02:30:06 AM 405.86 349.88 55.98 15808.15 779.02 02:40:07 AM 415.44 356.35 59.10 15698.97 818.36 02:50:10 AM 444.68 392.74 51.93 19771.40 717.38 03:00:05 AM 430.08 376.96 53.12 16810.86 733.06 03:10:08 AM 422.97 364.91 58.06 16657.97 807.58 03:20:07 AM 407.67 346.74 60.93 14233.65 853.18 03:30:05 AM 428.62 370.24 58.38 16803.99 818.78 03:40:07 AM 410.41 351.30 59.11 14560.93 824.64 03:50:11 AM 431.12 365.22 65.90 14841.99 919.35 04:00:03 AM 427.68 363.39 64.29 16107.03 894.63 04:10:09 AM 460.96 381.06 79.90 15669.43 1098.52 04:20:05 AM 396.44 324.81 71.63 13260.06 974.30 04:30:06 AM 426.06 356.01 70.04 15472.60 960.49 04:40:05 AM 407.77 346.48 61.29 16284.16 874.92 04:50:06 AM 426.72 354.65 72.06 13364.68 1025.14 05:00:03 AM 384.60 322.83 61.77 12270.63 861.76 05:10:03 AM 361.92 303.17 58.75 11713.34 801.28 05:20:07 AM 354.67 298.64 56.02 13364.53 766.84 Average: 395.43 338.19 57.24 14655.41 795.24 ------------------------------------------------------------------------------------------------------------- |