When 777ms are still not good enough
Over the past couple of months, I've been a rampage optimising a Joomla website that I'm managing. When I first started, the homepage opened in around 30-40 seconds. After religiously following all the instructions of the like of GT Matrix, PingdomTools and alike, I was able to bring it down to around 800ms using (using JCH-optimise, .ht-access caching and compression settings, and MaxCDN) and I'm now stuck in optimising my my.cnf settings. The fastest I'm getting the homepage to open is 777ms after refresh.
The dedicated server configuration is this:
2 Quads, 128GB, 2x480GB SSD RAID
CloudLinux/Cpanel/VHM
Apache/MariaDB
all tables converted to InnoDB
The traffic is 10,000 and 20,000 visitors per day, with around 200,000 pageviews.
These are my my.cnf settings. My goal is to bring the pagespeed to under 600ms, which should be possible with this kind of hardware, provided it is tuned the right way.
Any comments and/or suggestions for improvements?
[mysqld]
local-infile=0
max_connections=10000
max_user_connections=1000
max_connect_errors=20
key_buffer_size=1G
join_buffer_size=1G
bulk_insert_buffer_size=1G
max_allowed_packet=1G
slow_query_log=1
slow_query_log_file="diskar/mysql-slow.log"
long_query_time=40
connect_timeout=120
wait_timeout=20
interfactive_timeout=25
back_log=500
query_cache_type=1
query_cache_size=512M
query_cache_limit=512K
query_cache_min_res_unit=2K
sort_buffer_size=1G
thread_cache_size=16
open_files_limit=10000
tmp_table_size=8G
thread_handling=pool-of-threads
thread_stack=512M
thread_pool_size=12
thread_pool_idle_timeout=500
thread_cache_size=1000
table_open_cache=52428
table_definition_cache=8192
default-storage-engine=InnoDB
[innodb]
memlock
innodb_buffer_pool_size=96G
innodb_buffer_pool_instances=12
innodb_additional_mem_pool_size=4G
innodb_log_bugger_size=1G
innodb_open_files=300
innodb_data_file_path=ibdata1:400M:autoextend
innodb_use_native_aio=1
innodb_doublewrite=0
innodb_user_atomic_writes=1
innodb_flus_log_at_trx_commit=2
innodb_compression_level=6
innodb_compression_algorithm=2
innodb_flus_method=O_DIRECT
innodb_log_file_size=4G
innodb_log_files_in_group=3
innodb_buffer_pool_instances=16
innodb_adaptive_hash_index_partitions=16
innodb_thread_concurrency
innodb_thread_concurrency=24
innodb_write_io_threads=24
innodb_read_io_threads=32
innodb_adaptive_flushing=1
innodb_flush_neighbors=0
innodb_io_capacity=20000
innodb_io_capacity_max=40000
innodb_lru_scan_depth=20000
innodb_purge_threads=1
innodb_randmon_read_ahead=1
innodb_read_io_threads=64
innodb_write_io_threads=64
innodb_use_fallocate=1
innodb_use_atomic_writes=1
inndb_use_trim=1
innodb_mtflush_threads=16
innodb_use_mfflush=1
innodb_file_per_table=1
innodb_file_format=Barracuda
innodb_fast_shutdown=1
Any comments and/or suggestions for improvements?
-
I forgot to mention that I tried Memcached and APCU, but it didn't work. The site actually runs 2-3 times faster with 'Files' as the caching handler in Joomla's Global Configuration. And yes, I ran my-sqltuner, but that was of no help. 0 -
Hello :) I'm not sure the general advice that's often offered here will help you to reduce the load time to the levels you need. You may want to consult with a qualified system administrator with experience optimizing MySQL. Thank you. 0
Please sign in to leave a comment.
Comments
2 comments