When i perform a strace on apache process, i see many gettimeofday before & after GET request, even when Apache returns a static file like an image file. It results in a long downtime period before Apache 2.4 (with php 5.6, fcgid) answers the GET request.
1616 0.000048 read(156, "GET / HTTP/1.1\r\n", 8000) = 16 1616 0.000099 gettimeofday({1430592206, 931114}, NULL) = 0 1616 0.000044 gettimeofday({1430592206, 931156}, NULL) = 0 1616 0.000035 read(156, 0x7f01d4007018, 8000) = -1 EAGAIN (Resource temporarily unavailable) 1616 0.000042 poll([{fd=156, events=POLLIN}], 1, 7915439 1670 0.020724 <... epoll_wait resumed> {}, 100, 100) = 0 1670 0.000039 gettimeofday({1430592206, 951998}, NULL) = 0 1670 0.000037 gettimeofday({1430592206, 952034}, NULL) = 0 1670 0.000033 gettimeofday({1430592206, 952066}, NULL) = 0 1670 0.000032 epoll_wait(155, {}, 100, 100) = 0 1670 0.100265 gettimeofday({1430592207, 52366}, NULL) = 0 1670 0.000041 gettimeofday({1430592207, 52405}, NULL) = 0 1670 0.000033 gettimeofday({1430592207, 52437}, NULL) = 0 1670 0.000033 epoll_wait(155, {}, 100, 100) = 0 1670 0.100324 gettimeofday({1430592207, 152804}, NULL) = 0 1670 0.000066 gettimeofday({1430592207, 152865}, NULL) = 0 1670 0.000073 gettimeofday({1430592207, 152941}, NULL) = 0 1670 0.000060 epoll_wait(155, {}, 100, 100) = 0 1670 0.100251 gettimeofday({1430592207, 253247}, NULL) = 0 1670 0.000039 gettimeofday({1430592207, 253284}, NULL) = 0 1670 0.000032 gettimeofday({1430592207, 253316}, NULL) = 0 1670 0.000032 epoll_wait(155, {}, 100, 100) = 0 1670 0.100241 gettimeofday({1430592207, 353597}, NULL) = 0 1670 0.000061 gettimeofday({1430592207, 353653}, NULL) = 0 1670 0.000071 gettimeofday({1430592207, 353727}, NULL) = 0 1670 0.000045 epoll_wait(155, {}, 100, 100) = 0There are a lot of them before the server actually returns the response to GET.
What i have done:
- I have setup ExtendedStatus off in httpd.conf just in case.
- I have followed the advice of red Hat team by doing a
echo "kernel.vsyscall64 = 2" >> /etc/sysctl.conf
& editing sysctl afterwards. - echo 1 > /proc/sys/kernel/vsyscall64
That slightly increased the reponse speed of Apache 2.4 but it is still slow and there is a lot of Gettimeofday. I have no modsecurity and only standard modules of Apache. Nevertheless, i suspect a module.
I have checked whether it was ioncube 5.0.2 but it wasn't.
Is it normal? If no, do you think it could come from a module from Apache?
edit: it looks like it matches with 3 timestamps copied to 3 logs, writing down three errors/warnings.
thank y.
0 Answers