Reputation: 378
I am trying to solve the high CPU issue, when tracing one of lsphp process, I see the command getppid() take more than 1 second each execution. See trace log below:
strace: Process 21945 attached
0.000000 select(5, 0x7fffadebf9e0, NULL, NULL, 0x7fffadebf9d0) = 0 (Timeout)
0.992306 getppid() = 31441
0.000169 select(5, 0x7fffadebf9e0, NULL, NULL, 0x7fffadebf9d0) = 1 (in [4], left 0x7fffadebf9d0)
0.714351 accept(4, 0x7fffadebf920, 0x7fffadebf91c) = -1 EAGAIN (Resource temporarily unavailable)
0.000121 select(5, 0x7fffadebf9e0, NULL, NULL, 0x7fffadebf9d0) = 0 (Timeout)
1.000415 getppid() = 31441
0.000030 select(5, 0x7fffadebf9e0, NULL, NULL, 0x7fffadebf9d0) = 0 (Timeout)
1.001052 getppid() = 31441
0.000030 select(5, 0x7fffadebf9e0, NULL, NULL, 0x7fffadebf9d0) = 0 (Timeout)
1.000785 getppid() = 31441
0.000083 select(5, 0x7fffadebf9e0, NULL, NULL, 0x7fffadebf9d0) = 0 (Timeout)
1.000875 getppid() = 31441
0.000038 select(5, 0x7fffadebf9e0, NULL, NULL, 0x7fffadebf9d0) = 0 (Timeout)
Can somebody tell me how can I reduce the time spent for this command?
Upvotes: 1
Views: 34