Today MySQL at Facebook posted the following about MySQL performance:
Today we found a performance problem in a completely unexpected place – if TIMESTAMP data type is being used and MySQL is configured to use system time zone, it will hit a code in Linux C library which has a global mutex. To add insult to an injury, MySQL's internal time zone support (using mysql.time_zone* tables) is ~30% faster at single thread workload.
With 30 client threads MySQL's internal timezone conversion is 30x faster.
The day started with something that looked like a MySQL bug, but apparently it is a MySQL victory. — domas
How can I determine whether my MySQL instance is using the slower system time zone or whether it's using the faster mysql.time_zone*
tables? i.e. which MySQL config parameters should I check?
(we actually use Amazon RDS rather than hosting our own database however I don't think that matters other than instead of checking my.cnf
, I'll need to use the RDS parameter group to check or change config variables. )
Best Answer
From the linked article
You can determine the global.time_zone setting with