- Posts: 3
- Thank you received: 0
Kunena 7.0.9 & Kunena 6.4.14 – Security Updates Released
The Kunena team has announce the arrival of Kunena 7.0.9 [K 7.0.9] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0
Before posting new topics in this category
K 1.5.x Support: Please read this first.
Question Kunena 1.5.11 Query optimization to improve performance of large forum
16 years 2 weeks ago #62027
by unixoid
Replied by unixoid on topic Re: Kunena 1.5.11 Query optimization to improve performance of large forum
Do you have any insight on your server set up, especially to support this table. Would MyISAM be preferrable or Innodb, how large are your buffers?
By breaking up the query I was thinking for ways to mysql to not use filesort. It is my understanding that the group by clause is forcing mysql to not use in-memory temp tables, but write them to disk, then sort the entries there.
If I have 2 queries and join them in php I was hoping that neither one would be processed with filesort.
By breaking up the query I was thinking for ways to mysql to not use filesort. It is my understanding that the group by clause is forcing mysql to not use in-memory temp tables, but write them to disk, then sort the entries there.
If I have 2 queries and join them in php I was hoping that neither one would be processed with filesort.
Please Log in or Create an account to join the conversation.
16 years 1 week ago #62315
by Matias
Replied by Matias on topic Re: Kunena 1.5.11 Query optimization to improve performance of large forum
I would take InnoDB for many reasons:
1) it doesn't get corrupted on power failures (lost all data in MyISAM table -- a few times)
2) you can keep large parts of the tables in memory
3) it's generally faster, except on SELECT COUNT(*)
It does have some limitations, but there's no need to use InnoDB in all your tables.
1) it doesn't get corrupted on power failures (lost all data in MyISAM table -- a few times)
2) you can keep large parts of the tables in memory
3) it's generally faster, except on SELECT COUNT(*)
It does have some limitations, but there's no need to use InnoDB in all your tables.
Please Log in or Create an account to join the conversation.
16 years 1 week ago #62325
by fxstein
We love stars on the Joomla Extension Directory .
Replied by fxstein on topic Re: Kunena 1.5.11 Query optimization to improve performance of large forum
InnoDB is absolutely the choice for concurrency. Table level locks in MyISAM will kill your site when concurrence increases. InnoDB might be slower on some single stream queries, but when you add mixed read/write and concurrent users, InnoDB is the clear choice.
What I would suggest to start is to check you MySQL server setup. See here: www.day32.com/MySQL/
Make sure you have enough memory for the buffers in the RIGHT places. Also enable query caching in MySQL.
To improve that particual query the easiest thing would be to profile your data and see how much is really every going to be needed. If you have 2M records in that table, how many new get added every day/week/month.
How many pages of threads do you really need in showcat. Will people every go to page #200+ to look up threads or is it more likely that they will use search for that.
If so a simple timelimit on that page might be all it takes to make it run very fast. I would experiment with 1 year, 6 month and 3 month time limits. For now this could be hard coded in there if that works for you.
For Kunena 1.7 (already in development) the new thread structures will eliminate that type of query alltogether.
Hope this helps!
What I would suggest to start is to check you MySQL server setup. See here: www.day32.com/MySQL/
Make sure you have enough memory for the buffers in the RIGHT places. Also enable query caching in MySQL.
To improve that particual query the easiest thing would be to profile your data and see how much is really every going to be needed. If you have 2M records in that table, how many new get added every day/week/month.
How many pages of threads do you really need in showcat. Will people every go to page #200+ to look up threads or is it more likely that they will use search for that.
If so a simple timelimit on that page might be all it takes to make it run very fast. I would experiment with 1 year, 6 month and 3 month time limits. For now this could be hard coded in there if that works for you.
For Kunena 1.7 (already in development) the new thread structures will eliminate that type of query alltogether.
Hope this helps!
We love stars on the Joomla Extension Directory .
The following user(s) said Thank You: unixoid
Please Log in or Create an account to join the conversation.
16 years 1 week ago - 16 years 1 week ago #62330
by fxstein
We love stars on the Joomla Extension Directory .
Replied by fxstein on topic Re: Kunena 1.5.11 Query optimization to improve performance of large forum
Here are our current stats:
Hope this helps!
Code:
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 5.0.90-log x86_64
Uptime = 78 days 19 hrs 16 min 52 sec
Avg. qps = 138
Total Questions = 944369290
Threads Connected = 12
Server has been running for over 48hrs.
It should be safe to follow these recommendations
To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.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 enabled.
Current long_query_time = 1 sec.
You have 48519 out of 944369312 that take longer than 1 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/5.0/en/point-in-time-recovery.html
WORKER THREADS
Current thread_cache_size = 10
Current threads_cached = 9
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 256
Current threads_connected = 9
Historic max_used_connections = 99
The number of used connections is 38% of the configured maximum.
Your max_connections variable seems to be fine.
MEMORY USAGE
Max Memory Ever Allocated : 963 M
Configured Max Per-thread Buffers : 1 G
Configured Max Global Buffers : 506 M
Configured Max Memory Limit : 1 G
Physical Memory : 3.86 G
Max memory limit seem to be within acceptable norms
KEY BUFFER
Current MyISAM index space = 64 M
Current key_buffer_size = 24 M
Key cache miss rate is 1 : 875488
Key buffer fill ratio = 55.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere
QUERY CACHE
Query cache is enabled
Current query_cache_size = 96 M
Current query_cache_used = 69 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 72.68 %
Current query_cache_min_res_unit = 2 K
MySQL won't cache query results that are larger than query_cache_limit in 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 = 2.00 M
You have had 242444 queries where a join could not use an index properly
You have had 820 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 = 8458 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_cache value = 4096 tables
You have a total of 1233 tables
You have 2479 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 128 M
Current tmp_table_size = 32 M
Of 28316715 temp tables, 19% were created on disk
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 311 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 1339
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=2'.
Hope this helps!
We love stars on the Joomla Extension Directory .
Last edit: 16 years 1 week ago by fxstein.
Please Log in or Create an account to join the conversation.
Time to create page: 0.245 seconds