Question

I have a website with 10000+ unique visitors daily. The server is using lighttpd with PHP FastCGI. When the concurrent online visitors reach high number (i.e. over 180). The server encounters higher load and very slow response. I have enabled Xcache, and using Php5.3. Server load: 23.74, 18.78, 10.97

Can some experts please have a look my configuration and suggest what I shall do?

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" 

                 )))

The statistics from Lighttpd for fastCGI is as followings:

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:
Was it helpful?

Solution

Just found out, it was a function in PHP script that calls glob function, when there exist a large number of files, the speed becomes very slow can causes trouble

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top