We know that MySQL generallog is temporarily opened for debugging or tracking convenience. If online business requests are frequent, a large number of logs are generated instantly, which affects IOPS performance to a certain extent. In addition, we also have a work und, that is, to open slowquerylog and set 0, so that we can record all
We know that the general log of MySQL is temporarily opened for debugging or tracking convenience. If online business requests are frequent, a large number of logs are generated instantly, which affects IOPS performance to a certain extent. In addition, we also have a work und, that is, to open the slow query log and set it to = 0, so that we can record all
We know that the general log of MySQL is temporarily opened for debugging or tracking convenience. If online business requests are frequent, a large number of logs are generated instantly, which affects IOPS performance to a certain extent.
In addition, we also have a work und, that is, to open the slow query log and set it to = 0, so that all request logs can be recorded, in addition, the recorded log is smaller than the general log, and the IOPS performance may be less affected than the direct Open general log. Is that true? Let's compare and test it.
MySQL version: 5.5.5-10.0.11-MariaDB-log MariaDB Server
Test Tool: tpcc-mysql
Number of test Warehouse: 100
Warmup time: 60 s
Run time: 600 s
Concurrent threads: 512
For comparison of test results, see:
In "general scenarios", I set long_query_time = 1 and disable general log.
When all general logs are logged, The TpmC is about 73.28% of the records when the log is not opened, and the TpmC is about 59.53% of the records when all slow logs are logged. It can be seen that the direct opening of general log has less impact on TpmC, and the log generated in this mode is actually smaller. Isn't it a little ruined, haha O (?_ =) O ~
In addition, if log-output = TABLE is returned, please test it by yourself :)
Note: Only MySQL 5.1 and later versions support setting long_query_time to 0 s. In earlier versions, the minimum value is 1 s.
This entry was published on. Belongs to the database category and is labeled with FAQ, mariadb, MySQL, MySQL FAQ, and slowlog. The author is yejr. [MySQL FAQ] a large number of binlog dump records appear in the series-slow log