Has anyone noticed the fact that lots of CPU time used by the FAH is running in systime mode and probably just be wasted?
Let's take a look at a typical result of top while FAH is running (on a 12C24T dual Xeon E5645):
where we can see the sy percent is 6.7% at the moment, and it varies in the range of 5% to 10%.
The sy number represents the cputime percent that CPU is doing system calls. In my opinion the observed result is too bad for FAH, since FAH is a program doing pure floating calculations, I think a reasonable number for it would be as low as 0.0%-0.1%.
Then I try to find out what the exact syscall the FAH client calling is. I use strace to diagnose and found out the answer is sched_yield(), which was called by every FAH thread at a rate of several thousand times per second.
The sched_yield() is a syscall that causes the calling thread to relinquish the CPU. I don't think it's necessary for FAH since we are usually running only one FAH thread on one CPU core and don't need to relinguish the CPU at all.
As we know that thekraken is able to deal with the syscalls and signals invoking from the FAH clients, so is it possible to develop something like thekraken to eliminite all these probably useless sched_yield() syscalls?
Let's take a look at a typical result of top while FAH is running (on a 12C24T dual Xeon E5645):
Code:
top - 14:07:51 up 19 days, 23:49, 3 users, load average: 22.45, 8.64, 3.37
Tasks: 170 total, 1 running, 169 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 6.7%sy, 93.3%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 49554076k total, 17380604k used, 32173472k free, 563156k buffers
Swap: 0k total, 0k used, 0k free, 14413228k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32242 root 39 19 3323m 1.8g 2988 S 2396.2 3.7 34:56.11 thekraken-FahCo
28625 root 20 0 0 0 0 S 0.3 0.0 1:28.69 kworker/0:2
1 root 20 0 19164 1464 1216 S 0.0 0.0 0:09.42 init
where we can see the sy percent is 6.7% at the moment, and it varies in the range of 5% to 10%.
The sy number represents the cputime percent that CPU is doing system calls. In my opinion the observed result is too bad for FAH, since FAH is a program doing pure floating calculations, I think a reasonable number for it would be as low as 0.0%-0.1%.
Then I try to find out what the exact syscall the FAH client calling is. I use strace to diagnose and found out the answer is sched_yield(), which was called by every FAH thread at a rate of several thousand times per second.
The sched_yield() is a syscall that causes the calling thread to relinquish the CPU. I don't think it's necessary for FAH since we are usually running only one FAH thread on one CPU core and don't need to relinguish the CPU at all.
As we know that thekraken is able to deal with the syscalls and signals invoking from the FAH clients, so is it possible to develop something like thekraken to eliminite all these probably useless sched_yield() syscalls?
Last edited: