J
Jaydeep Chovatia
Hi,
In my c++ (Linux) application I am seeing high CPU utilization (almost 90%)and it that sys-cpu:user-cpu ratio is 8:2. I then tried to run “strace” command and found that around 80% of time is being spent in “futex”system call, please see snippet of strace here:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
80.66 100.007743 1567 63806 22761 futex
9.15 11.340274 96925 117 4 restart_syscall
5.60 6.939598 4401 1577 poll
Initially I though this is because of pthread_lock, unlock, condition timedwait, condition wait, etc. system calls I am using in the application, to prove that I have overridden pthread_lock, unlock, condition timedwait, condition wait, unlock, etc. using LD_PRELOAD functionality and concluded that not many threads are waiting here (mutex->__data.__nusers remains less than5 most of the time), so it doesn’t seem that these sys calls are part ofthe problem.
Now I am running out of clue about how to find out code location/system call which is causing this futex high utilization, any help on this would be appreciated.
Thank you,
Jaydeep
In my c++ (Linux) application I am seeing high CPU utilization (almost 90%)and it that sys-cpu:user-cpu ratio is 8:2. I then tried to run “strace” command and found that around 80% of time is being spent in “futex”system call, please see snippet of strace here:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
80.66 100.007743 1567 63806 22761 futex
9.15 11.340274 96925 117 4 restart_syscall
5.60 6.939598 4401 1577 poll
Initially I though this is because of pthread_lock, unlock, condition timedwait, condition wait, etc. system calls I am using in the application, to prove that I have overridden pthread_lock, unlock, condition timedwait, condition wait, unlock, etc. using LD_PRELOAD functionality and concluded that not many threads are waiting here (mutex->__data.__nusers remains less than5 most of the time), so it doesn’t seem that these sys calls are part ofthe problem.
Now I am running out of clue about how to find out code location/system call which is causing this futex high utilization, any help on this would be appreciated.
Thank you,
Jaydeep