Hi all, we have developed an Apache web aplication. We started testing and we are
very disapointed with CPU Performance. Could anybody help us?
The characteristics of testing probes are following:
Host configuration:
2 CPU 800Mhz.
Mem: 4Gbytes
OS: Linux 2.4.18-24.7.xsmp #1 SMP i686 unknown
Apache 1.3.27
mod_perl: 1.27
Apache::ASP: 2.49
Apache configuration:
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
MinSpareServers 30
MaxSpareServers 30
StartServers 30
MaxClients 30
MaxRequestsPerChild 0 (this parameter is set to 0, only for testing's saking)
Test Configuration:
30 concurrent users, doing a simple web navigation.
10 minutes
During test, we have monitorized CPU, mem, and traces of every Apache process, and get the
following results.
CPU0 Idle Average: 12.96%
CPU0 System Average: 36.13%
CPU1 Idle Average: 13.48%
CPU1 System Average: 38.08%
load average: 3.82
The memory comsumption is not problem.
With strace command, we have monitorized every Apache process. The result is shown next:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
22.85 148.776377 195 764440 60346 read
11.08 72.139571 77 935954 rt_sigprocmask
7.40 48.220412 113 425955 68 write
6.90 44.956895 278 161597 flock
6.58 42.860031 142
302821 1733 open
6.35 41.331908 59 697111 lseek
4.96 32.271819 88 367516 88 close
4.10 26.689564 411 64885 accept
3.94 25.629518 122 210030 8524 stat64
3.76 24.490300 113 217240 rt_sigaction
3.25
21.192485 82 257046 time
3.04 19.774617 142 138885 2 select
2.31 15.014555 79 189898 gettimeofday
2.12 13.781016 969 14217 6 writev
2.05 13.357971 71 189440 umask
1.58 10.270957 63
164195 fstat64
1.22 7.918802 150 52944 mmap2
1.20 7.832404 148 52776 munmap
1.09 7.090875 109 64913 getsockname
1.06 6.922265 107 64885 setsockopt
0.95 6.211160 96
64858 4514 shutdown
0.90 5.834045 60 96556 times
0.78 5.084936 58 87154 fcntl64
0.17 1.139187 97 11752 chdir
0.16 1.056600 100 10558 dup2
0.05 0.302155 122
2484 brk
0.04 0.250578 177 1416 44 connect
0.03 0.215873 8995 24 fork
0.03 0.206451 110 1878 unlink
0.03 0.183788 130 1416 socket
0.01 0.035057 73
482 getdents64
0.00 0.031805 60 528 176 _llseek
0.00 0.017768 243 73 24 send
0.00 0.016789 95 176 old_mmap
0.00 0.012988 116 112 getpid
0.00 0.012207 16
761 39 wait4
0.00 0.011792 131 90 getgroups32
0.00 0.011429 130 88 mprotect
0.00 0.007192 37 195 139 access
0.00 0.005496 70 78 getcwd
0.00 0.005427
97 56 56 ioctl
0.00 0.004834 62 78 getuid32
0.00 0.004300 226 19 uname
0.00 0.002776 63 44 pipe
0.00 0.000444 16 28 readv
0.00
0.000393 56 7 sigreturn
------ ----------- ----------- --------- --------- ----------------
100.00 651.187812 5617659 75759 total
żIs it normal the amount of CPU consumption for such a so simple test case (just 4 pages are navigated for each user's session)?
Thanks in advanced,
best regards.