mysql strace fsync,fdatasync

Posted zengkefu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql strace fsync,fdatasync相关的知识,希望对你有一定的参考价值。

[[email protected] test]# strace -f -F -e trace=fdatasync,fsync -p 4043

Process 8703 attached with 23 threads - interrupt to quit
[pid 7089] fsync(9) = 0
[pid 4063] fsync(9) = 0
[pid 4063] fsync(9) = 0
[pid 4061] fsync(4) = 0
[pid 4050] fsync(4) = 0
[pid 4050] fsync(20) = 0
[pid 4061] fsync(4) = 0
[pid 4050] fsync(12) = 0
[pid 4061] fsync(4) = 0
[pid 4050] fsync(14) = 0
[pid 4061] fsync(4) = 0
[pid 4050] fsync(4) = 0
[pid 4061] fsync(4) = 0
[pid 4052] fsync(4) = 0
[pid 4061] fsync(4) = 0
[pid 4053] fsync(4) = 0
[pid 4045] fsync(9) = 0




 

[[email protected] test]# strace -f -F -c -p 4043  
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 60.99    0.154980        1084       143           io_getevents
 23.66    0.060119         911        66        16 futex
 10.23    0.025997        1625        16           select
  2.36    0.006000        1200         5         4 restart_syscall
  1.97    0.005000         625         8           fsync
  0.39    0.001000          40        25           clock_gettime
  0.39    0.000999         250         4           pwrite
  0.00    0.000000           0         1           write
  0.00    0.000000           0         4           sched_yield
  0.00    0.000000           0         1           sendto
  0.00    0.000000           0         3         1 recvfrom
  0.00    0.000000           0         4           io_submit
------ ----------- ----------- --------- --------- ----------------
100.00    0.254095                   280        21 total

 

以上是关于mysql strace fsync,fdatasync的主要内容,如果未能解决你的问题,请参考以下文章

mysql fsync

strace 命令分析mysql的相关的问题

MySQL两阶段提交

利用strace和perf分析MySQL运行

strace分析启动流程

MySQL崩溃恢复与组提交