Re: very poor performance of opening tables
Posted by:
J G
Date: September 25, 2005 09:45AM
Today I've run truss with timestampts. From truss(1): "The truss utility traces the system calls called by the specified process or program."
I've discovered that *sometimes* there is a long time period before accessing file. Like here:
[...]
3.057735271 gettimeofday({1127657586 20266},0x0) = 0 (0x0)
3.057868807 gettimeofday({1127657586 20421},0x0) = 0 (0x0)
3.058022179 shutdown(0x14,0x2) = 0 (0x0)
3.058140630 close(20) = 0 (0x0)
3.058276960 sigprocmask(0x3,0x0,0xa9dffa20) = 0 (0x0)
SIGNAL 31 (SIGUSR2)
4.769136860 sigsuspend(0xa9dffa20) ERR#4 'Interrupted system call'
SIGNAL 31 (SIGUSR2)
SIGNAL 31 (SIGUSR2)
4.769671564 sigreturn(0xa9dff700) ERR#4 'Interrupted system call'
4.769779958 setsockopt(0x3e,0xffff,0x8,0xa9dffa94,0x4) = 0 (0x0)
4.769992276 write(62,0x112cc000,43) = 43 (0x2b)
4.770097317 read(0x3e,0x112cc000,0x4) ERR#35 'Resource temporarily unavailable'
4.770239793 gettimeofday({1127657587 732803},0x0) = 0 (0x0)
4.770458536 sigprocmask(0x1,0xa9dff980,0xa9dff9c0) = 0 (0x0)
4.770754384 kill(0x6933,0xe) = 0 (0x0)
4.770975082 kill(0x6933,0x1f) = 0 (0x0)
4.771068390 sigprocmask(0x3,0xa9dff980,0x0) = 0 (0x0)
4.771166447 fcntl(62,F_SETFL,0x2) = 0 (0x0)
4.771244111 read(0x3e,0x112cc000,0x4) = 4 (0x4)
4.771324288 read(0x3e,0x112cc000,0x12) = 18 (0x12)
4.771393292 sigprocmask(0x1,0xa9dff990,0xa9dff9c0) = 0 (0x0)
4.771467044 sigprocmask(0x3,0xa9dff990,0x0) = 0 (0x0)
4.771549736 fcntl(62,F_SETFL,0x6) = 0 (0x0)
4.771681596 write(62,0x112cc000,9) = 9 (0x9)
4.771865419 gettimeofday({1127657587 734418},0x0) = 0 (0x0)
4.771971298 read(0x3e,0x112cc000,0x4) = 4 (0x4)
4.772053152 read(0x3e,0x112cc000,0x4) = 4 (0x4)
4.772129978 gettimeofday({1127657587 734698},0x0) = 0 (0x0)
4.772467171 access("./somefile",0) = 0 (0x0)
As you can see there is about 1.5 secs delay after SIGNAL 31 (SIGUSR2).
What means SIGUSR2 for MySQL? Is it because of error or unsufficient resources? Or maybe it's normal way to respawn mysql threads by parent process?