2013-08-06 57 views
1

我有一個網站,每天有超過10000個獨立訪問者。該服務器正在使用lighttpd和PHP FastCGI。 當併發在線訪問者達到高數量(即超過180)時。服務器遇到更高的負載和非常慢的響應。我已經啓用了Xcache,並使用Php5.3。 服務器負載:23.74,18.78,10.97配置Lighttpd FastCGI在高流量下

有些專家請看看我的配置,並建議我該怎麼辦?

fastcgi.server = (".php" => ((
        "bin-path" => "/usr/bin/php5-cgi", 
        "socket" => "/tmp/php.socket", 
      "min-procs" => 1, 
     "max-procs" => 5, 
     # "max-load-per-proc" => 8, 
      "idle-timeout" => 30, 
      "bin-environment" => (
       "PHP_FCGI_CHILDREN" => "10", 
       "PHP_FCGI_MAX_REQUESTS" => "500" 
     ), 
    "broken-scriptfilename" => "enable" 

       ))) 

從Lighttpd的用於FASTCGI統計是如下:

fastcgi.active-requests: 174 
fastcgi.backend.0.0.connected: 2764 
fastcgi.backend.0.0.died: 0 
fastcgi.backend.0.0.disabled: 0 
fastcgi.backend.0.0.load: 34 
fastcgi.backend.0.0.overloaded: 0 
fastcgi.backend.0.1.connected: 3698 
fastcgi.backend.0.1.died: 0 
fastcgi.backend.0.1.disabled: 0 
fastcgi.backend.0.1.load: 35 
fastcgi.backend.0.1.overloaded: 0 
fastcgi.backend.0.2.connected: 4993 
fastcgi.backend.0.2.died: 0 
fastcgi.backend.0.2.disabled: 0 
fastcgi.backend.0.2.load: 35 
fastcgi.backend.0.2.overloaded: 0 
fastcgi.backend.0.3.connected: 6811 
fastcgi.backend.0.3.died: 0 
fastcgi.backend.0.3.disabled: 0 
fastcgi.backend.0.3.load: 35 
fastcgi.backend.0.3.overloaded: 0 
fastcgi.backend.0.4.connected: 8629 
fastcgi.backend.0.4.died: 0 
fastcgi.backend.0.4.disabled: 0 
fastcgi.backend.0.4.load: 35 
fastcgi.backend.0.4.overloaded: 0 
fastcgi.backend.0.load: 174 
fastcgi.requests: 26895 

SERVER RAM:64GB

cpuinfo中:

processor : 7 
vendor_id : GenuineIntel 
cpu family : 6 
model  : 45 
model name : Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz 
stepping : 7 
cpu MHz  : 3600.056 
cache size : 10240 KB 
physical id : 0 
siblings : 8 
core id  : 3 
cpu cores : 4 
apicid  : 7 
initial apicid : 7 
fpu  : yes 
fpu_exception : yes 
cpuid level : 13 
wp  : yes 
flags  : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid 
bogomips : 7200.11 
clflush size : 64 
cache_alignment : 64 
address sizes : 46 bits physical, 48 bits virtual 
power management: 

回答

1

剛剛發現,這是一個PHP腳本中的函數,調用glob函數,當存在大量文件時,速度變得很慢會導致問題

相關問題