While load testing I am getting almost 100% CPU usage by Apache processes. To find out the root cause I attached Apache process with strace and found slow calls.
11840 0.000063 accept4(3, {sa_family=AF_INET, sin_port=htons(34640), sin_addr=inet_addr("54.208.xxx.xxx")}, [16], SOCK_CLOEXEC) = 17
11840 12.680738 getsockname(17, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("192.168.xxx.xxx")}, [16]) = 0
Apache configured with mod_php module. I think switching to mod_fastcgi might solve the problem but it's the final decision. Any ideas how to fix this issue?