-1

i am facing high epoll_wait time when i used this command to check the page execution.

    strace -o output.txt -f -r -s4096 -p 21605

the outout was big txt file but i was interested in this piece of data and unable to find out the reason of this. the data is for a dynamic php page and its not too heavy so i dont expect this much long response time

21605      0.000043 semop(38830083, {{0, -1, SEM_UNDO}}, 1) = 0
21605      0.611909 epoll_wait(30, {{EPOLLIN, {u32=25218632, u64=25218632}}}, 4, 10000) = 1
21605      0.103429 accept4(3, {sa_family=AF_INET, sin_port=htons(56826), sin_addr=inet_addr("ip address")}, [16], SOCK_CLOEXEC) = 33
21605      0.000059 semop(38830083, {{0, 1, SEM_UNDO}}, 1) = 0

i am really unhappy with this 0.611909 time in epoll and 0.103429 accept4 . any help to improve these performance will be great

Steeve
  • 423
  • 2
  • 9
  • 23

1 Answers1

0

Speed up the other end. This is time spent waiting to accept a connection or receive data from the other side.

David Schwartz
  • 179,497
  • 17
  • 214
  • 278
  • means mysql connection or something plz explain little, i have really no idea . my all mysql queries are completely optimized and server load is less than 1 always – Steeve Apr 05 '17 at 17:18
  • how can i break this time and know the real problem – Steeve Apr 05 '17 at 17:28
  • @Steevee Maybe add logging to your code so you can find out where it's spending its time. – David Schwartz Apr 05 '17 at 17:32
  • is this memory issue ? or plain php issue? i am 99% sure that my php and mysql are optimised. thanks for ur advise., i will try to log time – Steeve Apr 05 '17 at 17:34
  • can u please guide little.i am really unable to find the starting point. i searched cd /proc/10217/fd/ and found fd 10 and there was 2million lines of data in two days time., is this the culprit as it will search for those 2 million and take 2-3 seconds to search those fd.is it advisable to clear those fd every hour so that less no of files are searched ?? – Steeve Apr 09 '17 at 10:06
  • @Steeve Start by adding logging to your PHP code so you can find out where it's spending its time. Also, look at the logs for your database. – David Schwartz Apr 09 '17 at 21:13
  • thanks. php i already tried it was taking 5 ms. i will check mysql logs but i think fd is the problem as reading 2 million records and then going back will definitely take more than second – Steeve Apr 10 '17 at 09:37