Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
InvisionHQ Posted November 5, 2014 Posted November 5, 2014 No problem before I upgraded mysql from 5.1 to 5.5 on my forum, but after I upgrade I've more than 500ms and slow queries. For Example this simple query: UPDATE ibf_nexus_ads SET ad_clicks=? WHERE ad_id=? sometimes take more of 3.000ms... I now switch to MariaDB and convert some tables to innoDB and it's better of Mysql55 but not fast as Mysql51. I try also to take another server and replicate the same settings and it's slow too. I'm going crazy... any help?
InvisionHQ Posted November 5, 2014 Author Posted November 5, 2014 Another IPB forum on the same server have acceptable ms:
ASTRAPI Posted November 5, 2014 Posted November 5, 2014 Hard to say without checking from inside :sad: Can you please post here your sql settings? (my.cnf)
InvisionHQ Posted November 6, 2014 Author Posted November 6, 2014 [mysqld] open_files_limit=60000 table_open_cache = 20000 table_definition_cache = 10000 thread_cache_size=16 key_buffer_size=8G tmp_table_size = 800M max_heap_table_size = 3G MySQL Version 10.0.14-MariaDB x86_64 Uptime = 1 days 9 hrs 48 min 45 sec Avg. qps = 278 Total Questions = 33919567 Threads Connected = 4 Warning: Server has not been running for at least 48hrs. It may not be safe to use these recommendations To find out more information on how each of these runtime variables effects performance visit: http://dev.mysql.com/doc/refman/10.0/en/server-system-variables.html Visit http://www.mysql.com/products/enterprise/advisors.html for info about MySQL's Enterprise Monitoring and Advisory Service SLOW QUERIES The slow query log is NOT enabled. Current long_query_time = 10.000000 sec. You have 2254 out of 33919588 that take longer than 10.000000 sec. to complete Your long_query_time seems to be fine BINARY UPDATE LOG The binary update log is NOT enabled. You will not be able to do point in time recovery See http://dev.mysql.com/doc/refman/10.0/en/point-in-time-recovery.html WORKER THREADS Current thread_cache_size = 16 Current threads_cached = 14 Current threads_per_sec = 0 Historic threads_per_sec = 0 Your thread_cache_size is fine MAX CONNECTIONS Current max_connections = 151 Current threads_connected = 3 Historic max_used_connections = 59 The number of used connections is 39% of the configured maximum. Your max_connections variable seems to be fine. No InnoDB Support Enabled! MEMORY USAGE Max Memory Ever Allocated : 8.30 G Configured Max Per-thread Buffers : 419 M Configured Max Global Buffers : 8.14 G Configured Max Memory Limit : 8.55 G Physical Memory : 62.94 G Max memory limit seem to be within acceptable norms KEY BUFFER Current MyISAM index space = 3.43 G Current key_buffer_size = 8.00 G Key cache miss rate is 1 : 2502 Key buffer free ratio = 76 % Your key_buffer_size seems to be fine QUERY CACHE Query cache is supported but not enabled Perhaps you should set the query_cache_size SORT OPERATIONS Current sort_buffer_size = 2 M Current read_rnd_buffer_size = 256 K Sort buffer seems to be fine JOINS Current join_buffer_size = 132.00 K You have had 90783 queries where a join could not use an index properly You have had 8893 joins without keys that check for key usage after each row You should enable "log-queries-not-using-indexes" Then look for non indexed joins in the slow query log. If you are unable to optimize your queries you may want to increase your join_buffer_size to accommodate larger joins in one pass. Note! This script will still suggest raising the join_buffer_size when ANY joins not using indexes are found. OPEN FILES LIMIT Current open_files_limit = 60000 files The open_files_limit should typically be set to at least 2x-3x that of table_cache if you have heavy MyISAM usage. Your open_files_limit value seems to be fine TABLE CACHE Current table_open_cache = 20000 tables Current table_definition_cache = 10000 tables You have a total of 4392 tables You have 8705 open tables. The table_cache value seems to be fine TEMP TABLES Current max_heap_table_size = 3.00 G Current tmp_table_size = 800 M Of 803773 temp tables, 15% were created on disk Created disk tmp tables ratio seems fine TABLE SCANS Current read_buffer_size = 128 K Current table scan ratio = 579 : 1 read_buffer_size seems to be fine TABLE LOCKING Current Lock Wait ratio = 1 : 263 You may benefit from selective use of InnoDB. If you have long running SELECT's against MyISAM tables and perform frequent updates consider setting 'low_priority_updates=1' If you have a high concurrency of inserts on Dynamic row-length tables consider setting 'concurrent_insert=ALWAYS'.
ASTRAPI Posted November 6, 2014 Posted November 6, 2014 Nothing else in the my.cnf than: [mysqld] open_files_limit=60000 table_open_cache = 20000 table_definition_cache = 10000 thread_cache_size=16 key_buffer_size=8G tmp_table_size = 800M max_heap_table_size = 3G ?
AlexJ Posted November 6, 2014 Posted November 6, 2014 You need to optimize your config for InnoDB. wget mysqltuner.pl perl mysqltuner.pl Post the output here.
InvisionHQ Posted November 6, 2014 Author Posted November 6, 2014 After a night of test and optimization with ASTRAPI (Thanks) and installing zendopcache now I've this: I think that I've some problem with this installation of IPB, I've opened a ticket this morning because I notice that if I try to disable an hook (one random hook) it take many MINUTES to make the action (last time 15min) and in this meantime the site is unreachable.I think this is something related to DB and this forum installation.I notice also that some simple queries like:SELECT * FROM ibf_nexus_ads WHERE ad_id=?sometimes take more then 3.000ms to run.The other IPB forum on the same server work well, without this problem.DB is not corrupted and optimized, move some tables to innodb increase a bit the performance but the problem persist.
ASTRAPI Posted November 6, 2014 Posted November 6, 2014 Yes after a first face of optimization (not full) the server is working faster as InvisionHQ confirms but this problem with the current forum installation seems to be related to IPB forum and not to server side.... :smile: From 850ms we go down to 550ms :) It was a pleasure to help you :smile: Thanks
Recommended Posts
Archived
This topic is now archived and is closed to further replies.