I have a PHP application to provide virtual labs for C Programming.
It runs on an AWS m4.large type instance which is having 100% cpu utilization and very high load average,almost all the time.Below are the top 2 cpu intensive processes given by top command(these are the C compilation processes):
24982 apache 20 0 6504 504 420 R 99.9 0.0 409:36.82 a.out
24611 apache 20 0 6504 500 416 R 99.5 0.0 411:13.45 a.out
Both of these processes are using almost 100% cpu. Now running on lsof -p pid command for these 2 processes,I got
a.out 24611 apache mem REG 202,1 1920936 264214 /lib64/libc-2.12.so
a.out 24611 apache mem REG 202,1 596272 264222 /lib64/libm-2.12.so
a.out 24611 apache mem REG 202,1 154664 264207 /lib64/ld-2.12.so
and
a.out 24982 apache mem REG 202,1 1920936 264214 /lib64/libc-2.12.so
a.out 24982 apache mem REG 202,1 596272 264222 /lib64/libm-2.12.so
a.out 24982 apache mem REG 202,1 154664 264207 /lib64/ld-2.12.so
strace command output is filled with these lines
write(1, " Mode= 0 Mode= 0 Mode= 0 Mode= 0"..., 4096) = -1 EPIPE (Broken pipe)
--- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=24611, si_uid=48} ---
Need to know the reason for the high load average and cpu utilization.